Index: LayoutTests/fast/events/constructors/message-event-constructor.html |
diff --git a/LayoutTests/fast/events/constructors/message-event-constructor.html b/LayoutTests/fast/events/constructors/message-event-constructor.html |
index 20155cdbc4c9faa9bed80573ebbb6e21e2a0be53..4e6e5ee4dcd1f3376a98c270029ad72080334c44 100644 |
--- a/LayoutTests/fast/events/constructors/message-event-constructor.html |
+++ b/LayoutTests/fast/events/constructors/message-event-constructor.html |
@@ -71,9 +71,14 @@ shouldThrow("new MessageEvent('eventType', { get data() { throw 'MessageEvent Er |
shouldBe("new MessageEvent('eventType', { source: window }).source", "window"); |
shouldBe("new MessageEvent('eventType', { source: this }).source", "this"); |
+// MessagePort objects. |
+var channel = new MessageChannel(); |
+shouldBe("new MessageEvent('eventType', { ports: [channel.port1], source: channel.port1 }).source", "null"); |
do-not-use
2013/08/19 20:47:55
I added this check as well since I assume this is
|
+ |
// Non-window objects. |
shouldBe("new MessageEvent('eventType', { source: test_object }).source", "null"); |
shouldBe("new MessageEvent('eventType', { source: document }).source", "null"); |
+shouldBe("new MessageEvent('eventType', { source: document.body }).source", "null"); |
do-not-use
2013/08/19 20:47:55
Added a Node check as suggested.
|
shouldBe("new MessageEvent('eventType', { source: undefined }).source", "null"); |
shouldBe("new MessageEvent('eventType', { source: null }).source", "null"); |
shouldBe("new MessageEvent('eventType', { source: false }).source", "null"); |
@@ -90,7 +95,6 @@ shouldThrow("new MessageEvent('eventType', { get source() { throw 'MessageEvent |
// ports is passed. |
// Valid message ports. |
-var channel = new MessageChannel(); |
var channel2 = new MessageChannel(); |
shouldBe("new MessageEvent('eventType', { ports: [channel.port1, channel.port2, channel2.port1] }).ports[0]", "channel.port1"); |
shouldBe("new MessageEvent('eventType', { ports: [channel.port1, channel.port2, channel2.port1] }).ports[1]", "channel.port2"); |