Bug 1601469 - Set mailnews.mark_message_read.auto to false for folder-display/browser_messageCommands.js. r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 06 Dec 2019 12:55:39 +0200
changeset 37706 b541827125625433174e3e4a4e9371812516ca0b
parent 37705 73aab51bd41d038d49e02f1e8b70cdb61f59bf59
child 37707 ae164299b9c7fb70ba3398e5dfe6bb201ebd44a8
push id397
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:16:13 +0000
reviewersmkmelin
bugs1601469
Bug 1601469 - Set mailnews.mark_message_read.auto to false for folder-display/browser_messageCommands.js. r=mkmelin
mail/test/browser/folder-display/browser_messageCommands.js
--- a/mail/test/browser/folder-display/browser_messageCommands.js
+++ b/mail/test/browser/folder-display/browser_messageCommands.js
@@ -46,18 +46,22 @@ var { MailServices } = ChromeUtils.impor
 var { MailUtils } = ChromeUtils.import("resource:///modules/MailUtils.jsm");
 
 var unreadFolder, shiftDeleteFolder, threadDeleteFolder;
 var archiveSrcFolder = null;
 var archiveURI;
 
 var acctMgr;
 var tagArray;
+var gAutoRead;
 
 add_task(function setupModule(module) {
+  gAutoRead = Services.prefs.getBoolPref("mailnews.mark_message_read.auto");
+  Services.prefs.setBoolPref("mailnews.mark_message_read.auto", false);
+
   unreadFolder = create_folder("UnreadFolder");
   shiftDeleteFolder = create_folder("ShiftDeleteFolder");
   threadDeleteFolder = create_folder("ThreadDeleteFolder");
   archiveSrcFolder = create_folder("ArchiveSrc");
 
   make_new_sets_in_folder(unreadFolder, [{ count: 2 }]);
   make_new_sets_in_folder(shiftDeleteFolder, [{ count: 3 }]);
   add_sets_to_folders(
@@ -624,9 +628,10 @@ add_task(function test_tag_keys_disabled
   check_tag_in_message(curMessage, tagArray[0], false);
 
   mc.tabmail.closeTab(tab);
 });
 
 registerCleanupFunction(function teardownModule() {
   // Make sure archiving is enabled at the end
   enable_archiving(true);
+  Services.prefs.setBoolPref("mailnews.mark_message_read.auto", gAutoRead);
 });