Bug 1137285 - Replace content.location = ... by a navigateTo request r=pbrosset
☠☠ backed out by 69a16a89c8bf ☠ ☠
authorAlexandre Poirot <poirot.alex@gmail.com>
Wed, 15 Apr 2015 13:55:29 +0200
changeset 239323 120d272971a6f3746e701744694d387b14ced429
parent 239322 145f6347bb119c65198bb1e7f105574413e2c0bf
child 239324 998c4e53c1f8aa60109d752d65e775e286ba0eaf
push id28589
push userryanvm@gmail.com
push dateWed, 15 Apr 2015 19:13:10 +0000
treeherdermozilla-central@24ccca4707eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbrosset
bugs1137285
milestone40.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 1137285 - Replace content.location = ... by a navigateTo request r=pbrosset
browser/devtools/inspector/test/browser_inspector_destroy-after-navigation.js
browser/devtools/inspector/test/browser_inspector_navigation.js
browser/devtools/inspector/test/head.js
--- a/browser/devtools/inspector/test/browser_inspector_destroy-after-navigation.js
+++ b/browser/devtools/inspector/test/browser_inspector_destroy-after-navigation.js
@@ -8,17 +8,17 @@
 const URL_1 = "data:text/plain;charset=UTF-8,abcde";
 const URL_2 = "data:text/plain;charset=UTF-8,12345";
 
 add_task(function* () {
   let { toolbox } = yield openInspectorForURL(URL_1);
 
   info("Navigating to different URL.");
   let navigated = toolbox.target.once("navigate");
-  content.location = URL_2;
+  navigateTo(toolbox, URL_2);
 
   info("Waiting for 'navigate' event from toolbox target.");
   yield navigated;
 
   info("Destroying toolbox");
   try {
     yield toolbox.destroy();
     ok(true, "Toolbox destroyed");
--- a/browser/devtools/inspector/test/browser_inspector_navigation.js
+++ b/browser/devtools/inspector/test/browser_inspector_navigation.js
@@ -15,17 +15,17 @@ const TEST_URL_2 = "http://test2.example
 
 add_task(function* () {
   let { inspector } = yield openInspectorForURL(TEST_URL_1);
   let markuploaded = inspector.once("markuploaded");
 
   yield selectNode("#i1", inspector);
 
   info("Navigating to a different page.");
-  content.location = TEST_URL_2;
+  yield navigateTo(toolbox, TEST_URL_2);
 
   info("Waiting for markup view to load after navigation.");
   yield markuploaded;
 
   ok(true, "New page loaded");
   yield selectNode("#i1", inspector);
 
   markuploaded = inspector.once("markuploaded");
--- a/browser/devtools/inspector/test/head.js
+++ b/browser/devtools/inspector/test/head.js
@@ -73,16 +73,21 @@ let addTab = Task.async(function* (url) 
   browser.messageManager.loadFrameScript(FRAME_SCRIPT_URL, false);
 
   yield once(browser, "load", true);
   info("URL '" + url + "' loading complete");
 
   return tab;
 });
 
+let navigateTo = function (toolbox, url) {
+  let activeTab = toolbox.target.activeTab;
+  return activeTab.navigateTo(url);
+};
+
 /**
  * Simple DOM node accesor function that takes either a node or a string css
  * selector as argument and returns the corresponding node
  * @param {String|DOMNode} nodeOrSelector
  * @param {Object} options
  *        An object containing any of the following options:
  *        - document: HTMLDocument that should be queried for the selector.
  *                    Default: content.document.