| Index: third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/messageevent-constructor.https.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/messageevent-constructor.html b/third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/messageevent-constructor.https.html
|
| similarity index 82%
|
| rename from third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/messageevent-constructor.html
|
| rename to third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/messageevent-constructor.https.html
|
| index 47b536d2198ab0773c1d380f54ccf95194f0860e..8a8a8f67f22fe81479331680944b9dca71f4643b 100644
|
| --- a/third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/messageevent-constructor.html
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/messageevent-constructor.https.html
|
| @@ -2,6 +2,7 @@
|
| <title>MessageEvent constructor</title>
|
| <script src="/resources/testharness.js"></script>
|
| <script src="/resources/testharnessreport.js"></script>
|
| +<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
| <script>
|
| test(function() {
|
| var ev = new MessageEvent("test")
|
| @@ -75,4 +76,21 @@ test(function() {
|
| }, "Calling initMessageEvent with only 7 parameters should throw a TypeError")
|
| }, "All parameters to initMessageEvent should be mandatory")
|
|
|
| +promise_test(function(t) {
|
| + var worker_url = "/service-workers/service-worker/resources/empty-worker.js";
|
| + var scope = "/service-workers/service-worker/resources/";
|
| + var registration;
|
| +
|
| + return service_worker_unregister_and_register(t, worker_url, scope)
|
| + .then(function(r) {
|
| + registration = r;
|
| + return wait_for_state(t, r.installing, "activated");
|
| + })
|
| + .then(function() {
|
| + var ev = new MessageEvent("test", { source: registration.active });
|
| + assert_equals(ev.source, registration.active, "source attribute should return the ServiceWorker");
|
| + service_worker_unregister(t, scope);
|
| + });
|
| + }, "Passing ServiceWorker for source member");
|
| +
|
| </script>
|
|
|