Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/browsing-the-web/history-traversal/pagereveal/order-in-new-document-navigation.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>pagereveal event fires and in correct order on new-document navigation</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering">
<link rel="author" href="mailto:bokan@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
const event_log = [];
addEventListener('pageshow', () => event_log.push('pageshow'));
addEventListener('pagereveal', () => event_log.push('pagereveal'));
requestAnimationFrame(() => event_log.push('rAF'));
promise_test(async () => {
await new Promise(resolve => requestAnimationFrame(resolve));
assert_equals(event_log.toString(),'pageshow,pagereveal,rAF');
});
</script>