OLD | NEW |
1 #library('SerializedScriptValueTest'); | 1 #library('SerializedScriptValueTest'); |
2 #import('../../pkg/unittest/lib/unittest.dart'); | 2 #import('../../pkg/unittest/unittest.dart'); |
3 #import('../../pkg/unittest/lib/html_config.dart'); | 3 #import('../../pkg/unittest/html_config.dart'); |
4 #import('dart:html'); | 4 #import('dart:html'); |
5 | 5 |
6 main() { | 6 main() { |
7 useHtmlConfiguration(); | 7 useHtmlConfiguration(); |
8 | 8 |
9 test('MessageEvent.initMessageEvent', () { | 9 test('MessageEvent.initMessageEvent', () { |
10 final event = document.$dom_createEvent('MessageEvent'); | 10 final event = document.$dom_createEvent('MessageEvent'); |
11 event.initMessageEvent('type', false, true, 'data', 'origin', 'lastEventId
', window, []); | 11 event.initMessageEvent('type', false, true, 'data', 'origin', 'lastEventId
', window, []); |
12 expect(event.type, equals('type')); | 12 expect(event.type, equals('type')); |
13 expect(event.bubbles, isFalse); | 13 expect(event.bubbles, isFalse); |
14 expect(event.cancelable, isTrue); | 14 expect(event.cancelable, isTrue); |
15 expect(event.data, equals('data')); | 15 expect(event.data, equals('data')); |
16 expect(event.origin, equals('origin')); | 16 expect(event.origin, equals('origin')); |
17 expect(event.lastEventId, equals('lastEventId')); | 17 expect(event.lastEventId, equals('lastEventId')); |
18 expect(event.source, same(window)); | 18 expect(event.source, same(window)); |
19 // TODO(antonm): accessing ports is not supported yet. | 19 // TODO(antonm): accessing ports is not supported yet. |
20 }); | 20 }); |
21 } | 21 } |
OLD | NEW |