mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 74d709131e3c91d09f1708378648a01957c47b38
This commit is contained in:
parent
e4657c1496
commit
81f079c722
77 changed files with 2043 additions and 524 deletions
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>New page</title>
|
||||
</head>
|
||||
<body>This is a new page.</body>
|
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>Old page</title>
|
||||
</head>
|
||||
<body>This is an old page.</body>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>iframe_history_go_0</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe></iframe>
|
||||
<script>
|
||||
promise_test(async (t) => {
|
||||
let iframe = null;
|
||||
const OLD_URL = 'blank-old.html';
|
||||
const NEW_URL = 'blank-new.html';
|
||||
|
||||
await new Promise(resolve => {
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.onload = () => resolve();
|
||||
iframe.src = OLD_URL;
|
||||
document.body.appendChild(iframe);
|
||||
t.add_cleanup(() => iframe.remove());
|
||||
});
|
||||
|
||||
assert_equals(iframe.contentDocument.body.textContent, 'This is an old page.\n');
|
||||
|
||||
await new Promise(resolve => {
|
||||
iframe.onload = () => resolve();
|
||||
iframe.src = NEW_URL;
|
||||
});
|
||||
|
||||
assert_equals(iframe.contentDocument.body.textContent, 'This is a new page.\n');
|
||||
|
||||
await new Promise(resolve => {
|
||||
iframe.onload = () => resolve();
|
||||
iframe.contentWindow.history.go(0);
|
||||
});
|
||||
|
||||
assert_equals(iframe.contentDocument.body.textContent, 'This is a new page.\n');
|
||||
}, 'iframe\'s history.go(0) performs a location.reload()');
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue