mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Update web-platform-tests to revision 8fed98324bc133df221d778c62cbff210d43b0ce
This commit is contained in:
parent
be902d56c0
commit
8a6476740e
246 changed files with 15482 additions and 1281 deletions
|
@ -0,0 +1,28 @@
|
|||
<!doctype html>
|
||||
<title>Aborting fetch for javascript:string navigation</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#navigate">
|
||||
<link rel="help" href="https://github.com/whatwg/html/issues/2590">
|
||||
<div id="log"></div>
|
||||
<iframe src="support/iframe-and-links.html"></iframe>
|
||||
<script>
|
||||
async_test(test => {
|
||||
onload = () => {
|
||||
const child = document.querySelector('iframe').contentWindow;
|
||||
child.document.querySelector("#slowLink").click();
|
||||
// The step below is in a timeout. The framed page can't communicate back mid-parse because that
|
||||
// would involve running script, which makes that navigation "mature", and we need to do this
|
||||
// before it matures.
|
||||
test.step_timeout(() => {
|
||||
child.document.querySelector("#javascriptStringLink").click();
|
||||
child.document.querySelector("iframe").onload = test.step_func_done(() => {
|
||||
assert_false(child.childLoaded, 'child.childLoaded');
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
window.javascriptStringDocLoaded = test.step_func(() => {
|
||||
assert_unreached("javascript: URL doc replaced the document, should be targeted to child iframe.");
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype html>
|
||||
<title>Not aborting fetch for javascript:undefined navigation</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#navigate">
|
||||
<link rel="help" href="https://github.com/whatwg/html/issues/2590">
|
||||
<div id="log"></div>
|
||||
<iframe src="support/iframe-and-links.html"></iframe>
|
||||
<script>
|
||||
async_test(test => {
|
||||
onload = () => {
|
||||
const child = document.querySelector('iframe').contentWindow;
|
||||
child.document.querySelector("#slowLink").click();
|
||||
// The step below is in a timeout. The framed page can't communicate back mid-parse because that
|
||||
// would involve running script, which makes that navigation "mature", and we need to do this
|
||||
// before it matures.
|
||||
test.step_timeout(() => {
|
||||
child.document.querySelector("#javascriptUndefinedLink").click();
|
||||
child.document.querySelector("iframe").onload = test.step_func_done(() => {
|
||||
assert_true(child.childLoaded, 'child.childLoaded');
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
|
||||
<iframe name="iframe"></iframe>
|
||||
|
||||
<!-- slow link's response is delayed by 1 second -->
|
||||
<!-- https://wptserve.readthedocs.io/en/latest/pipes.html#trickle -->
|
||||
<a target="iframe" href="set-child-loaded.html?pipe=trickle(d1)" id="slowLink">slow link</a>
|
||||
<a target="iframe" href="javascript:'javascript:string <script> parent.javascriptStringDocLoaded(); </script>'" id="javascriptStringLink">javascript:string link</a>
|
||||
<a target="iframe" href="javascript:undefined" id="javascriptUndefinedLink">javascript:undefined link</a>
|
||||
|
||||
<script>
|
||||
// set-child-loaded.html (the slow link) sets this to true.
|
||||
window.childLoaded = false;
|
||||
|
||||
// Do nothing when the javascript:string doc has loaded, if it's correctly targeted to the above iframe.
|
||||
// However, if it replaces this document, it needs to fail the test (handled in the parent).
|
||||
function javascriptStringDocLoaded() {}
|
||||
</script>
|
|
@ -0,0 +1,5 @@
|
|||
<!doctype html>
|
||||
set-child-loaded.html
|
||||
<script>
|
||||
parent.childLoaded = true;
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue