Bug 1311197 - Remove CPOWs from urlbar tests. r=Gijs
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 18 Oct 2016 14:10:37 -0700
changeset 351636 144e317c6fb29c7390731be0fc31e1601ada841e
parent 351635 eb3c939c1c2245dc88f84ad88a434f287d096008
child 351637 b9d180c51943b413f2819cb481fdd25e48574950
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1311197
milestone52.0a1
Bug 1311197 - Remove CPOWs from urlbar tests. r=Gijs MozReview-Commit-ID: 2th2PYo0Pmf
browser/base/content/test/urlbar/browser_bug623155.js
--- a/browser/base/content/test/urlbar/browser_bug623155.js
+++ b/browser/base/content/test/urlbar/browser_bug623155.js
@@ -103,19 +103,20 @@ var gWebProgressListener = {
 };
 
 function delayed(aIsSelectedTab) {
   // Switch tab and confirm URL bar.
   if (!aIsSelectedTab) {
     gBrowser.selectedTab = gNewTab;
   }
 
-  ok(isRedirectedURISpec(content.location.href),
+  let currentURI = gBrowser.selectedBrowser.currentURI.spec;
+  ok(isRedirectedURISpec(currentURI),
      "The content area is redirected. aIsSelectedTab:" + aIsSelectedTab);
-  is(gURLBar.value, content.location.href,
+  is(gURLBar.value, currentURI,
      "The URL bar shows the content URI. aIsSelectedTab:" + aIsSelectedTab);
 
   if (!aIsSelectedTab) {
     // If this was a background request, go on a foreground request.
     gBrowser.selectedBrowser.loadURI(REDIRECT_FROM + "#FG");
   }
   else {
     // Othrewise, nothing to do remains.