Bug 996019 - Fix browser_bug435325.js to not connect to example.com. r=ehsan, a=test-only
authorNathan Froyd <froydnj@mozilla.com>
Tue, 15 Apr 2014 16:14:10 -0400
changeset 183802 6bfce9c619d1
parent 183801 5944b238bd76
child 183803 6431641fb1b6
push id3492
push userryanvm@gmail.com
push date2014-04-18 14:38 +0000
Treeherderresults
reviewersehsan, test-only
bugs996019, 435325
milestone29.0
Bug 996019 - Fix browser_bug435325.js to not connect to example.com. r=ehsan, a=test-only
browser/base/content/test/general/browser_bug435325.js
--- a/browser/base/content/test/general/browser_bug435325.js
+++ b/browser/base/content/test/general/browser_bug435325.js
@@ -46,23 +46,27 @@ function test() {
 function checkPage() {
   ok(Services.io.offline, "Setting Services.io.offline to true.");
   is(gBrowser.contentDocument.documentURI.substring(0,27),
     "about:neterror?e=netOffline", "Loading the Offline mode neterror page.");
 
   // Now press the "Try Again" button
   ok(gBrowser.contentDocument.getElementById("errorTryAgain"),
     "The error page has got a #errorTryAgain element");
+
+  // Re-enable the proxy so example.com is resolved to localhost, rather than
+  // the actual example.com.
+  Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
+
   gBrowser.contentDocument.getElementById("errorTryAgain").click();
 
   ok(!Services.io.offline, "After clicking the Try Again button, we're back " +
                            "online.");
 
   finish();
 }
 
 registerCleanupFunction(function() {
-  Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
   Services.prefs.setBoolPref("browser.cache.disk.enable", true);
   Services.prefs.setBoolPref("browser.cache.memory.enable", true);
   Services.io.offline = false;
   gBrowser.removeCurrentTab();
 });