Skip to content

Commit

Permalink
[html] Convert srcdoc_change_hash.html to promise_test
Browse files Browse the repository at this point in the history
This is an alternative to adding `setup({ single_test: true })` in
#19918.
  • Loading branch information
foolip authored and jugglinmike committed Oct 28, 2019
1 parent 23c1462 commit 2127be7
Showing 1 changed file with 3 additions and 8 deletions.
@@ -1,12 +1,10 @@
<!--
Test same-document navigation inside an srcdoc iframe using location.hash
-->
<title>same-document navigation inside an srcdoc iframe using location.hash</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
async function test() {
promise_test(async () => {
// Wait until 'document' is available.
await new Promise(resolve => window.addEventListener('load', resolve));

Expand Down Expand Up @@ -66,8 +64,5 @@
await hash_changed;
assert_equals(iframe.contentWindow.location.href, "about:srcdoc#2");
}

done();
}
test();
});
</script>

0 comments on commit 2127be7

Please sign in to comment.