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 192975 df47bd31176c42aaed221285cc5a8b3270b746de
parent 192974 aeef8814b03c0ae4d2286187c7c55359b87b325a
child 192976 65aecee8b0696e2a84cfe722d15b9d65af046bf8
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, test-only
bugs996019, 435325
milestone30.0a2
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();
 });