Bug 1311197 - Remove CPOWs from browser_bug655270.js. r=Gijs
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 18 Oct 2016 13:59:06 -0700
changeset 321589 d30948200f1867b97e669bc7d5592dc51532cf0a
parent 321588 fbd597046674eae52e0dcfefb725070794682858
child 321590 eb3c939c1c2245dc88f84ad88a434f287d096008
push id30931
push userkwierso@gmail.com
push dateTue, 08 Nov 2016 21:58:36 +0000
treeherdermozilla-central@783356f1476e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1311197, 655270
milestone52.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 1311197 - Remove CPOWs from browser_bug655270.js. r=Gijs MozReview-Commit-ID: 1GuTsuHMd6g
docshell/test/browser/browser_bug655270.js
--- a/docshell/test/browser/browser_bug655270.js
+++ b/docshell/test/browser/browser_bug655270.js
@@ -26,17 +26,21 @@ function test() {
 
   let observer = {
     onPageChanged: function(aURI, aWhat, aValue) {
       if (aWhat != Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON)
         return;
 
       if (aURI.spec == origURL) {
         is(aValue, faviconURL, 'FaviconURL for original URI');
-        tab.linkedBrowser.contentWindow.history.pushState('', '', '?new_page');
+        // Ignore the promise returned here and wait for the next
+        // onPageChanged notification.
+        ContentTask.spawn(tab.linkedBrowser, null, function() {
+          content.history.pushState('', '', '?new_page');
+        });
       }
 
       if (aURI.spec == newURL) {
         is(aValue, faviconURL, 'FaviconURL for new URI');
         gBrowser.removeTab(tab);
         PlacesUtils.history.removeObserver(this);
         finish();
       }