xpcshell-shutdown-necko
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 68 49c5ee4b50b4e29f7da5e637a83b47436455034d
permissions -rw-r--r--
State as of now

Have the unit tests take necko offline before shutting down. This mimics the behavior in the browser, which shuts down necko when shutting down the profile, but it still seems a bit hacky. Hrmph.

diff --git a/tools/test-harness/xpcshell-simple/head.js b/tools/test-harness/xpcshell-simple/head.js
--- a/tools/test-harness/xpcshell-simple/head.js
+++ b/tools/test-harness/xpcshell-simple/head.js
@@ -73,6 +73,9 @@ function _do_main() {
 
   while (!_quit)
     thr.processNextEvent(true);
+
+  Components.classes["@mozilla.org/network/io-service;1"].
+    getService(Components.interfaces.nsIIOService).offline = true;
 
   while (thr.hasPendingEvents())
     thr.processNextEvent(true);