Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/constructors/message-event-constructor.html

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 8
9 description("This tests the constructor for the MessageEvent DOM class."); 9 description("This tests the constructor for the MessageEvent DOM class.");
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 shouldThrow("new MessageEvent('eventType', { ports: true }).ports"); 112 shouldThrow("new MessageEvent('eventType', { ports: true }).ports");
113 shouldThrow("new MessageEvent('eventType', { ports: '' }).ports"); 113 shouldThrow("new MessageEvent('eventType', { ports: '' }).ports");
114 shouldThrow("new MessageEvent('eventType', { ports: 'chocolate' }).ports"); 114 shouldThrow("new MessageEvent('eventType', { ports: 'chocolate' }).ports");
115 shouldThrow("new MessageEvent('eventType', { ports: 12345 }).ports"); 115 shouldThrow("new MessageEvent('eventType', { ports: 12345 }).ports");
116 shouldThrow("new MessageEvent('eventType', { ports: 18446744073709551615 }).port s"); 116 shouldThrow("new MessageEvent('eventType', { ports: 18446744073709551615 }).port s");
117 shouldThrow("new MessageEvent('eventType', { ports: NaN }).ports"); 117 shouldThrow("new MessageEvent('eventType', { ports: NaN }).ports");
118 shouldThrow("new MessageEvent('eventType', { get ports() { return 123; } }).port s"); 118 shouldThrow("new MessageEvent('eventType', { get ports() { return 123; } }).port s");
119 shouldThrow("new MessageEvent('eventType', { get ports() { throw 'MessageEvent E rror'; } })"); 119 shouldThrow("new MessageEvent('eventType', { get ports() { throw 'MessageEvent E rror'; } })");
120 // Note that valueOf() is not called, when the left hand side is evaluated. 120 // Note that valueOf() is not called, when the left hand side is evaluated.
121 shouldThrow("new MessageEvent('eventType', { ports: {valueOf: function () { retu rn [channel.port1, channel.port2, channel.port2]; } } }).ports[0]"); 121 shouldThrow("new MessageEvent('eventType', { ports: {valueOf: function () { retu rn [channel.port1, channel.port2, channel.port2]; } } }).ports[0]");
122 shouldThrow("new MessageEvent('eventType', { bubbles: true, cancelable: true, da ta: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: {length: 3, 0: channel.port1, 1: channel.port2, 2: channel2.port1} }).por ts[2]");
122 123
123 // All initializers are passed. 124 // All initializers are passed.
124 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).bubbles", "true"); 125 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).bubbles", "true");
125 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).cancelable", "true"); 126 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).cancelable", "true");
126 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).data", "test_object"); 127 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).data", "test_object");
127 shouldBeEqualToString("new MessageEvent('eventType', { bubbles: true, cancelable : true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source : window, ports: [channel.port1, channel.port2, channel2.port1] }).origin", "won derful"); 128 shouldBeEqualToString("new MessageEvent('eventType', { bubbles: true, cancelable : true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source : window, ports: [channel.port1, channel.port2, channel2.port1] }).origin", "won derful");
128 shouldBeEqualToString("new MessageEvent('eventType', { bubbles: true, cancelable : true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source : window, ports: [channel.port1, channel.port2, channel2.port1] }).lastEventId", "excellent"); 129 shouldBeEqualToString("new MessageEvent('eventType', { bubbles: true, cancelable : true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source : window, ports: [channel.port1, channel.port2, channel2.port1] }).lastEventId", "excellent");
129 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).source", "window"); 130 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).source", "window");
130 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).ports[0]", "channel.port1" ); 131 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).ports[0]", "channel.port1" );
131 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).ports[1]", "channel.port2" ); 132 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).ports[1]", "channel.port2" );
132 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).ports[2]", "channel2.port1 "); 133 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: [channel.port1, channel.port2, channel2.port1] }).ports[2]", "channel2.port1 ");
133 shouldBe("new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, por ts: {length: 3, 0: channel.port1, 1: channel.port2, 2: channel2.port1} }).ports[ 2]", "channel2.port1");
134 </script> 134 </script>
135 </body> 135 </body>
136 </html> 136 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698