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