mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Update web-platform-tests to revision 60220357131c65146444da1f54624d5b54d0975d
This commit is contained in:
parent
c45192614c
commit
775b784f79
2144 changed files with 58115 additions and 29658 deletions
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
Tentative due to:
|
||||
https://github.com/whatwg/html/issues/1983
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Clicking on document sets user activation even after setTimeout</h1>
|
||||
<p>Click anywhere in the document.</p>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
assert_false(navigator.userActivation.hasBeenActive);
|
||||
assert_false(navigator.userActivation.isActive);
|
||||
window.addEventListener("click", event => {
|
||||
t.step_timeout(() => {
|
||||
assert_true(navigator.userActivation.hasBeenActive);
|
||||
assert_true(navigator.userActivation.isActive);
|
||||
|
||||
// Opening a window should consume the activation.
|
||||
window.open('404.html');
|
||||
assert_true(navigator.userActivation.hasBeenActive);
|
||||
assert_false(navigator.userActivation.isActive);
|
||||
t.done();
|
||||
}, 0);
|
||||
});
|
||||
test_driver.click(document.body);
|
||||
}, "Values adjust on activity");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue