author | Lucas Furukawa Gadani <lfg@chromium.org> |
Thu, 31 Jan 2019 18:30:49 +0000 | |
changeset 457950 | d3aea0b0ff9c3f08a931992bc9289de144c26611 |
parent 457949 | 4aae84fccf6e629617f0f3537b74ca819c34b77f |
child 457951 | 46cc96f83b8ec6158c93597d8395992040d4a3e7 |
push id | 35518 |
push user | opoprus@mozilla.com |
push date | Fri, 08 Feb 2019 09:55:14 +0000 |
treeherder | mozilla-central@3a3e393396f4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | testonly |
bugs | 1518222, 14740, 914122, 1396449, 621708 |
milestone | 67.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
new file mode 100644 --- /dev/null +++ b/testing/web-platform/tests/portals/portal-activate-event.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Tests that the PortalActivateEvent is dispatched when a portal is activated</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + async_test(function(t) { + var bc = new BroadcastChannel("test"); + bc.onmessage = t.step_func_done(function(e) { + assert_equals(e.data, "passed"); + bc.close(); + }); + window.open("resources/portal-activate-event-window.html"); + }, "Tests that the PortalActivateEvent is dispatched when a portal is activated."); +</script>
new file mode 100644 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-event-portal.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<title>Tests that the PortalActivateEvent is dispatched when a portal is activated</title> +<script> + window.addEventListener("portalactivate", function(e) { + var bc = new BroadcastChannel("test"); + bc.postMessage("passed"); + bc.close(); + }); + + var bc = new BroadcastChannel("portal"); + bc.postMessage("loaded"); + bc.close(); +</script>
new file mode 100644 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-event-window.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<script> + var bc = new BroadcastChannel("portal"); + bc.onmessage = function(e) { + document.querySelector("portal").activate(); + bc.close(); + } +</script> +<body> + <portal src="portal-activate-event-portal.html"></portal> +</body>