Update web-platform-tests to revision 2d68590d46a990bf28a08d6384a59962d2e56bf6

This commit is contained in:
WPT Sync Bot 2019-03-14 21:30:32 -04:00
parent bc03d32142
commit ad4cc3691e
135 changed files with 1613 additions and 341 deletions

View file

@ -12,7 +12,8 @@
<script src="/resources/testdriver-vendor.js"></script>
</head>
<body>
<h1>User activation can be transferred to a cross-origin child frame via a postMessage option.</h1>
<h1>User activation can be transferred to a cross-origin child frame
via a postMessage option.</h1>
<ol id="instructions">
<li>Click this instruction text.
</ol>
@ -35,6 +36,8 @@
} else if (msg.type == 'child-four-report') {
assert_true(msg.isActive);
assert_true(msg.hasBeenActive);
// check sender's activation state again
assert_false(navigator.userActivation.isActive);
assert_false(navigator.userActivation.hasBeenActive);
t.done();
@ -45,7 +48,12 @@
assert_true(navigator.userActivation.hasBeenActive);
// transfer user activation to the child frame
child.contentWindow.postMessage("transfer_user_activation", {targetOrigin: "*", transferUserActivation: true});
child.contentWindow.postMessage("transfer_user_activation",
{targetOrigin: "*", transferUserActivation: true});
// sender's activation state is updated synchronously
assert_false(navigator.userActivation.isActive);
assert_false(navigator.userActivation.hasBeenActive);
}));
child.src = "http://{{domains[www]}}:{{ports[http][0]}}/html/user-activation/resources/child-four.html";
}, "Cross-origin user activation transfer through postMessages");

View file

@ -12,7 +12,8 @@
<script src="/resources/testdriver-vendor.js"></script>
</head>
<body>
<h1>User activation can be transferred to a child frame via a postMessage option.</h1>
<h1>User activation can be transferred to a child frame
via a postMessage option.</h1>
<ol id="instructions">
<li>Click this instruction text.
</ol>
@ -35,6 +36,8 @@
} else if (msg.type == 'child-four-report') {
assert_true(msg.isActive);
assert_true(msg.hasBeenActive);
// check sender's activation state again
assert_false(navigator.userActivation.isActive);
assert_false(navigator.userActivation.hasBeenActive);
t.done();
@ -45,7 +48,12 @@
assert_true(navigator.userActivation.hasBeenActive);
// transfer user activation to the child frame
child.contentWindow.postMessage("transfer_user_activation", {transferUserActivation: true});
child.contentWindow.postMessage("transfer_user_activation",
{transferUserActivation: true});
// sender's activation state is updated synchronously
assert_false(navigator.userActivation.isActive);
assert_false(navigator.userActivation.hasBeenActive);
}));
child.src = "resources/child-four.html";
}, "User activation transfer through postMessages");