Bug 1355060 - Fix error from assert outside step in history traversal test, r=ato
authorJames Graham <james@hoppipolla.co.uk>
Sun, 02 Apr 2017 12:54:48 +0100
changeset 559705 34728e1c9ab2d41460c9792d5638cd207d9879c9
parent 559704 cdc1e00156c73a89cbfa0d2fe8987fd1857368dc
child 559706 912ac451146b9cbf4c87863cfb7d39f46e8658c2
child 559792 30a186a0ac48e272d0009ae9f51ec7319003adbf
push id53170
push userbmo:james@hoppipolla.co.uk
push dateMon, 10 Apr 2017 12:36:36 +0000
reviewersato
bugs1355060
milestone55.0a1
Bug 1355060 - Fix error from assert outside step in history traversal test, r=ato MozReview-Commit-ID: DJAmjteB4EC
testing/web-platform/meta/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini
testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html
--- a/testing/web-platform/meta/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini
+++ b/testing/web-platform/meta/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini
@@ -1,6 +1,5 @@
 [scroll-restoration-fragment-scrolling-cross-origin.html]
   type: testharness
-  expected: ERROR
   [Manual scroll restoration should take precedent over scrolling to fragment in cross origin navigation]
-    expected: TIMEOUT
+    expected: FAIL
 
--- a/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html
@@ -42,26 +42,25 @@
         // navigate to a new page from a different origin
         iframe.src = iframe.src.replace("http://", "http://www.").replace("page-with-fragment.html#fragment", "blank1.html");
       }, function() {
         // going back causes the iframe to traverse back
         history.back();
       }, function() {
         // coming back from history, scrollRestoration should be set to manual and respected
         assert_equals(iframe.contentWindow.location.href, baseURL + '/resources/page-with-fragment.html#fragment', 'should be back on page-with-fragment page');
-        iframe.contentWindow.requestAnimationFrame(function() {
+        iframe.contentWindow.requestAnimationFrame(t.step_func_done(function() {
           assert_equals(iframe.contentWindow.history.scrollRestoration, 'manual', 'navigating back should retain scrollRestoration value');
           assert_equals(iframe.contentWindow.scrollX, 0, 'should not scroll to fragment');
           assert_equals(iframe.contentWindow.scrollY, 0, 'should not scroll to fragment');
-          t.done();
-        });
+        }));
       }
     ];
 
     var stepCount = 0;
     var next = t.step_func(function() {
       steps[stepCount++]();
     });
 
     iframe.onload = next;
     next();
   }, 'Manual scroll restoration should take precedent over scrolling to fragment in cross origin navigation');
-</script>
\ No newline at end of file
+</script>