Update web-platform-tests to revision 74d709131e3c91d09f1708378648a01957c47b38

This commit is contained in:
WPT Sync Bot 2018-10-13 21:57:40 -04:00
parent e4657c1496
commit 81f079c722
77 changed files with 2043 additions and 524 deletions

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<head>
<title>New page</title>
</head>
<body>This is a new page.</body>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<head>
<title>Old page</title>
</head>
<body>This is an old page.</body>

View file

@ -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>