Follow up to bug 533776, tweak the unit test to disable automatic managing of offline status to ensure it always starts in offline mode. r=asuth over irc
authorMark Banner <bugzilla@standard8.plus.com>
Wed, 17 Mar 2010 07:25:01 +0000
changeset 5191 79666fdca182c3bb90b8627b83fcd83746b90030
parent 5190 06c2c95bdcc6e66a46075717c1ab9c04a161dfa2
child 5192 a65be94303220eeca31da68a11c8af3dbf989fde
push idunknown
push userunknown
push dateunknown
reviewersasuth
bugs533776
Follow up to bug 533776, tweak the unit test to disable automatic managing of offline status to ensure it always starts in offline mode. r=asuth over irc
mailnews/db/gloda/test/unit/test_startup_offline.js
--- a/mailnews/db/gloda/test/unit/test_startup_offline.js
+++ b/mailnews/db/gloda/test/unit/test_startup_offline.js
@@ -37,19 +37,20 @@
 
 
 /*
  * Test gloda starts up with indexing suppressed when offline at startup.
  */
 
 // We must do this before the first load otherwise gloda is started without
 // picking up the necessary initialisation.
-Components.classes["@mozilla.org/network/io-service;1"]
-          .getService(Components.interfaces.nsIIOService)
-          .offline = true;
+var ioService = Components.classes["@mozilla.org/network/io-service;1"]
+                          .getService(Components.interfaces.nsIIOService2);
+ioService.manageOfflineStatus = false;
+ioService.offline = true;
 
 load("resources/glodaTestHelper.js");
 
 /**
  * Make sure that if we have to reparse a local folder we do not hang or
  *  anything.  (We had a regression where we would hang.)
  */
 function test_gloda_offline_startup() {