Bug 1151864 - Remove CPOWs from browser_action_keyword.js. r=mconley
authorDão Gottwald <dao@mozilla.com>
Thu, 03 Mar 2016 23:33:39 +0100
changeset 322946 b8297417dfc432d000211b91ac8ea2a6187a0e1c
parent 322945 81091bc7558f165e3cad9fe247c466f647f8e4d0
child 322947 b5774ec699c9678535e082d16238a331073e272c
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1151864
milestone47.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 1151864 - Remove CPOWs from browser_action_keyword.js. r=mconley
browser/base/content/test/general/browser_action_keyword.js
--- a/browser/base/content/test/general/browser_action_keyword.js
+++ b/browser/base/content/test/general/browser_action_keyword.js
@@ -63,28 +63,28 @@ add_task(function*() {
   is(span.childNodes[0].data, "something", "Node should contain the query for the keyword");
 
   is_element_hidden(result._url, "URL element should be hidden");
 
   // Click on the result
   info("Normal click on result");
   let tabPromise = promiseTabLoadEvent(tab);
   EventUtils.synthesizeMouseAtCenter(result, {});
-  let loadEvent = yield tabPromise;
-  is(loadEvent.target.location.href, "http://example.com/?q=something", "Tab should have loaded from clicking on result");
+  yield tabPromise;
+  is(tab.linkedBrowser.currentURI.spec, "http://example.com/?q=something", "Tab should have loaded from clicking on result");
 
   // Middle-click on the result
   info("Middle-click on result");
   result = yield promise_first_result("keyword somethingmore");
   isnot(result, null, "Expect a keyword result");
   // We need to make a real URI out of this to ensure it's normalised for
   // comparison.
   uri = NetUtil.newURI(result.getAttribute("url"));
   is(uri.spec, makeActionURI("keyword", {url: "http://example.com/?q=somethingmore", input: "keyword somethingmore"}).spec, "Expect correct url");
 
   tabPromise = promiseWaitForEvent(gBrowser.tabContainer, "TabOpen");
   EventUtils.synthesizeMouseAtCenter(result, {button: 1});
   let tabOpenEvent = yield tabPromise;
   let newTab = tabOpenEvent.target;
   tabs.push(newTab);
-  loadEvent = yield promiseTabLoadEvent(newTab);
-  is(loadEvent.target.location.href, "http://example.com/?q=somethingmore", "Tab should have loaded from middle-clicking on result");
+  yield promiseTabLoadEvent(newTab);
+  is(newTab.linkedBrowser.currentURI.spec, "http://example.com/?q=somethingmore", "Tab should have loaded from middle-clicking on result");
 });