Update web-platform-tests to revision be959408023fe02cf79abe70f6018598a7004a88

This commit is contained in:
WPT Sync Bot 2018-06-11 21:57:51 -04:00
parent a76777b115
commit 761c8bc2a9
171 changed files with 2434 additions and 907 deletions

View file

@ -0,0 +1,10 @@
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<script>
document.location = "window-name-navigation.sub.html?hostname={{domains[www1]}}&shouldhavename=false&sendmessage=true";
</script>
</body>
</html>

View file

@ -1,6 +1,7 @@
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script>
setup({explicit_done: true})
function process_test_result(passed, test_name) {
if ({{GET[sendmessage]}}) {
if (window.opener) {
@ -12,6 +13,7 @@
test(function(t) {
assert_equals(passed, true);
}, test_name);
done();
}
}

View file

@ -1,13 +1,24 @@
<!DOCTYPE HTML>
<html>
<head>
<!-- window.name should equal "" after a cross-origin main frame navigation. -->
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<button id="button" onclick="popup();">open popup</button>
<script>
document.location = "support/window-name-navigation.sub.html?hostname={{domains[www1]}}&shouldhavename=false&sendmessage=false";
function popup() {
window.popupWin = window.open('support/window-name-after-cross-origin-main-frame-navigation-popup.sub.html', '_blank');
}
async_test(t => {
t.add_cleanup(() => {
popupWin.close();
})
document.getElementById('button').click();
onmessage = t.step_func(e => {
assert_true(e.data);
});
}, 'window.name should equal "" after a cross-origin main frame navigation');
</script>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html style="writing-mode: vertical-lr;">
<head>
<meta charset="UTF-8">
<title>Fragment Navigation: Scroll to block start position in vertical-lr writing mode</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="test" style="position: absolute; top: 5px; left: 7px; margin: 5px 7px; border-style: solid; border-width: 5px 7px; padding: 5px 7px; height: 5px; width: 7px;"></div>
<div style="width: 200vw;"></div>
<script>
async_test(function (t) {
on_event(window, 'load', function () {
t.step(function () {
window.scrollTo(0, 0);
location.hash = 'test';
assert_equals(window.scrollX, 14, 'Scroll to the left border edge of #test');
});
t.done();
});
}, '');
</script>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html style="writing-mode: vertical-rl;">
<head>
<meta charset="UTF-8">
<title>Fragment Navigation: Scroll to block start position in vertical-rl writing mode</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="test" style="position: absolute; top: 5px; right: 7px; margin: 5px 7px; border-style: solid; border-width: 5px 7px; padding: 5px 7px; height: 5px; width: 7px;"></div>
<div style="width: 200vw;"></div>
<script>
async_test(function (t) {
on_event(window, 'load', function () {
t.step(function () {
window.scrollTo(0, 0);
location.hash = 'test';
assert_equals(window.scrollX, -14, 'Scroll to the right border edge of #test');
});
t.done();
});
}, '');
</script>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Fragment Navigation: Scroll to block start position</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="test" style="position: absolute; top: 5px; left: 7px; margin: 5px 7px; border-style: solid; border-width: 5px 7px; padding: 5px 7px; height: 5px; width: 7px;"></div>
<div style="height: 200vh;"></div>
<script>
async_test(function (t) {
on_event(window, 'load', function () {
t.step(function () {
window.scrollTo(0, 0);
location.hash = 'test';
assert_equals(window.scrollY, 10, 'Scroll to the top border edge of #test');
});
t.done();
});
}, '');
</script>
</body>
</html>