Bug 1555461 - clean up mozmill/folder-display/test-invalid-db-folder-load.js. r=jorgk
authoraceman <acelists@atlas.sk>
Wed, 29 May 2019 12:38:00 +0200
changeset 35713 f5addc9ca311ff981e651dba9b1cf33752714145
parent 35712 5c0f43def1f3bcb2f0a487a006338ef056e084b2
child 35714 bb64c0fb051bef86799f52ea8256432ce88c52aa
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1555461
Bug 1555461 - clean up mozmill/folder-display/test-invalid-db-folder-load.js. r=jorgk
mail/test/mozmill/folder-display/test-invalid-db-folder-load.js
--- a/mail/test/mozmill/folder-display/test-invalid-db-folder-load.js
+++ b/mail/test/mozmill/folder-display/test-invalid-db-folder-load.js
@@ -10,47 +10,41 @@
 
 "use strict";
 
 /* import-globals-from ../shared-modules/test-folder-display-helpers.js */
 /* import-globals-from ../shared-modules/test-window-helpers.js */
 
 var MODULE_NAME = "test-invalid-db-folder-load";
 var RELATIVE_ROOT = "../shared-modules";
-var MODULE_REQUIRES = ["folder-display-helpers", "window-helpers"];
+var MODULE_REQUIRES = ["folder-display-helpers"];
 
 var folder;
 var setA;
-var curMessage;
-
-var nsMsgViewSortType = Ci.nsMsgViewSortType;
 
 function setupModule(module) {
   let fdh = collector.getModule("folder-display-helpers");
   fdh.installInto(module);
-  let wh = collector.getModule("window-helpers");
-  wh.installInto(module);
 
   folder = create_folder("InvalidMSF");
   [setA] = make_new_sets_in_folder(folder, [{count: 3}]);
 }
 
 /**
- *
+ * Check if the db of a folder assumed to be invalid can be restored.
  */
 function test_load_folder_with_invalidDB() {
-  folder.msgDatabase.dBFolderInfo.sortType = nsMsgViewSortType.bySubject;
+  folder.msgDatabase.dBFolderInfo.sortType = Ci.nsMsgViewSortType.bySubject;
   folder.msgDatabase.summaryValid = false;
   folder.msgDatabase.ForceClosed();
   folder.msgDatabase = null;
-  dump("entering invalidmsf folder\n");
   be_in_folder(folder);
 
   assert_messages_in_view(setA);
-  curMessage = select_click_row(0);
+  var curMessage = select_click_row(0);
   assert_selected_and_displayed(curMessage);
 }
 
 function test_view_sort_maintained() {
-  if (mc.dbView.sortType != nsMsgViewSortType.bySubject)
+  if (mc.dbView.sortType != Ci.nsMsgViewSortType.bySubject)
       throw new Error("view sort type not restored from invalid db");
 }