Bug 1054411 - Cancel the HTTP requests in browser_keywordSearch.js to avoid making network contact. r=adw
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Fri, 15 Aug 2014 16:48:06 -0700
changeset 199886 563f7421eeaa97538294aba91be72eebb07803ce
parent 199885 0d13e179eacb2139be0d31f94cba0df4fda47e2f
child 199887 4068cffc03fcc48aa87a75b06d4d681de3b88b30
push id27324
push userryanvm@gmail.com
push dateSat, 16 Aug 2014 21:18:56 +0000
treeherdermozilla-central@9a2152d29d8a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1054411
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1054411 - Cancel the HTTP requests in browser_keywordSearch.js to avoid making network contact. r=adw
browser/base/content/test/general/browser_keywordSearch.js
--- a/browser/base/content/test/general/browser_keywordSearch.js
+++ b/browser/base/content/test/general/browser_keywordSearch.js
@@ -46,19 +46,21 @@ function test() {
         return;
 
       info("received document start");
 
       ok(req instanceof Ci.nsIChannel, "req is a channel");
       is(req.originalURI.spec, gCurrTest.searchURL, "search URL was loaded");
       info("Actual URI: " + req.URI.spec);
 
+      req.cancel(Components.results.NS_ERROR_FAILURE);
+
       executeSoon(nextTest);
     }
-  }
+  };
   gBrowser.addProgressListener(listener);
 
   registerCleanupFunction(function () {
     Services.ww.unregisterNotification(windowObserver);
 
     gBrowser.removeProgressListener(listener);
     gBrowser.removeTab(tab);
   });