Index: third_party/WebKit/LayoutTests/imported/wpt/workers/constructors/SharedWorker/connect-event.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/workers/constructors/SharedWorker/connect-event.html b/third_party/WebKit/LayoutTests/imported/wpt/workers/constructors/SharedWorker/connect-event.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a9719d9dea651f75858e652389ae905a4d1b2a32 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/workers/constructors/SharedWorker/connect-event.html |
@@ -0,0 +1,26 @@ |
+<!-- |
+onconnect = function(e) { |
+ e.ports[0].postMessage([e.data === '', e instanceof MessageEvent, e.ports.length == 1]); |
+}; |
+/* |
+--> |
+<!doctype html> |
+<title>connect event</title> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<div id="log"></div> |
+<script> |
+(async_test()).step(function() { |
+ var worker = new SharedWorker('#'); |
+ worker.port.addEventListener('message', this.step_func(function(e) { |
+ assert_true(e.data[0], "e.data === ''"); |
+ assert_true(e.data[1], "e instanceof MessageEvent"); |
+ assert_true(e.data[2], "e.ports.length == 1"); |
+ this.done(); |
+ }), false); |
+ worker.port.start(); |
+}); |
+</script> |
+<!-- |
+*/ |
+//--> |