| Aleksey Shvayka | 9dc0854 | 2019-06-12 00:16:40 | [diff] [blame] | 1 | <!doctype html> |
| 2 | <title>visibilitychange event bubbles when fired on unload</title> |
| 3 | <script src="/resources/testharness.js"></script> |
| 4 | <script src="/resources/testharnessreport.js"></script> |
| 5 | <div id="log"></div> |
| 6 | <script> |
| 7 | async_test(function(t) { |
| Aleksey Shvayka | 1df71f3 | 2019-06-12 00:20:30 | [diff] [blame] | 8 | var w = window.open("resources/unload-bubbles.html"); |
| Aleksey Shvayka | 9dc0854 | 2019-06-12 00:16:40 | [diff] [blame] | 9 | window.onmessage = t.step_func(function(event) { |
| 10 | if (event.data === "close") { |
| 11 | w.close(); |
| 12 | return; |
| 13 | } |
| 14 | assert_equals(event.data, "hidden"); |
| 15 | t.done(); |
| 16 | }); |
| 17 | }); |
| 18 | </script> |