diff --git a/mailnews/base/resources/content/dbviewtest.js b/mailnews/base/resources/content/dbviewtest.js
index 94516aeeecf..f4797bab78a 100644
--- a/mailnews/base/resources/content/dbviewtest.js
+++ b/mailnews/base/resources/content/dbviewtest.js
@@ -1,6 +1,30 @@
+var dbview;
+var nsMsgViewSortType = Components.interfaces.nsMsgViewSortType;
+var nsMsgViewSortOrder = Components.interfaces.nsMsgViewSortOrder;
-function doit()
+function createView()
{
- var dbview = Components.classes["@mozilla.org/messenger/msgdbview;1?type=threaded"].createInstance(Components.interfaces.nsIMsgDBView);
+ dbview = Components.classes["@mozilla.org/messenger/msgdbview;1?type=threaded"].createInstance(Components.interfaces.nsIMsgDBView);
dump("dbview = " + dbview + "\n");
}
+
+
+function sortDateAscending()
+{
+ dbview.sort(nsMsgViewSortType.byDate,nsMsgViewSortOrder.ascending);
+}
+
+function sortDateDescending()
+{
+ dbview.sort(nsMsgViewSortType.byDate,nsMsgViewSortOrder.descending);
+}
+
+function sortThreadedAscending()
+{
+ dbview.sort(nsMsgViewSortType.byThread,nsMsgViewSortOrder.ascending);
+}
+
+function sortThreadedDescending()
+{
+ dbview.sort(nsMsgViewSortType.byThread,nsMsgViewSortOrder.descending);
+}
diff --git a/mailnews/base/resources/content/dbviewtest.xul b/mailnews/base/resources/content/dbviewtest.xul
index a4328450ab8..f108ea05158 100644
--- a/mailnews/base/resources/content/dbviewtest.xul
+++ b/mailnews/base/resources/content/dbviewtest.xul
@@ -5,6 +5,12 @@
-
+
+
+
+
+
+
+