Bug 1355060 - Fix error from assert outside step in history traversal test, r=ato
MozReview-Commit-ID: DJAmjteB4EC
--- 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>