blob: b9fe19a746ffbbe63740df67a77da8a894b573ae [file] [log] [blame]
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body style="background: lightgrey;">
<h1>Grandchild frame</h1>
<script>
async_test(function(t) {
assert_false(navigator.userActivation.isActive);
assert_false(navigator.userActivation.hasBeenActive);
window.addEventListener("message", event => {
if (event.source === parent && event.data === 'check-request') {
// Grandchild shouldn't be active after child is clicked.
assert_false(navigator.userActivation.isActive);
assert_false(navigator.userActivation.hasBeenActive);
// Notify top frame that checks are done.
parent.parent.postMessage('checked', '*');
t.done();
}
});
}, "Grandchild test");
</script>
</body>