Bug 1828622, try to stabilize test_focus.xhtml a bit, r=farre a=test-only
Differential Revision: https://phabricator.services.mozilla.com/D259856
This commit is contained in:
committed by
rvandermeulen@mozilla.com
parent
7c55e1efc2
commit
99a150a008
@@ -1572,8 +1572,13 @@ function doFrameHistoryTests()
|
|||||||
resolve({ location: content.location.href, persisted });
|
resolve({ location: content.location.href, persisted });
|
||||||
}, { once: true });
|
}, { once: true });
|
||||||
});
|
});
|
||||||
// make sure that loading a new page and then going back maintains the focus
|
// Make sure that loading a new page and then going back maintains the focus,
|
||||||
content.location = "data:text/html,<script>window.onload=function() {setTimeout(function () { history.back() }, 0);}</script>";
|
// but try to stabilize the page first so that it can enter bfcache.
|
||||||
|
content.requestAnimationFrame(() => {
|
||||||
|
content.requestAnimationFrame(() => {
|
||||||
|
content.location = "data:text/html,<script>window.onload=function() {setTimeout(function () { history.back() }, 0);}</script>";
|
||||||
|
});
|
||||||
|
});
|
||||||
return goneBack;
|
return goneBack;
|
||||||
});
|
});
|
||||||
}).then(({ location, persisted }) => {
|
}).then(({ location, persisted }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user