| Index: tests/html/postmessage_structured_test.dart
|
| diff --git a/tests/html/postmessage_structured_test.dart b/tests/html/postmessage_structured_test.dart
|
| index 32daa2a0a34fb7c3f5e3e563b4a3b50ec710d0ea..c42cfedbffca7b7d3d9f997712d2c9919319a5aa 100644
|
| --- a/tests/html/postmessage_structured_test.dart
|
| +++ b/tests/html/postmessage_structured_test.dart
|
| @@ -78,33 +78,6 @@ main() {
|
| injectSource(JS_CODE);
|
| });
|
|
|
| - test('js-to-dart--null-prototype-eventdata', () {
|
| - // Pass an object with a null prototype from JavaScript.
|
| - // It should be seen as a Dart Map.
|
| - final JS_CODE = """
|
| - // Call anonymous function to create a local scope.
|
| - (function() {
|
| - var o = Object.create(null);
|
| - o.eggs = 3;
|
| - var foo = new MessageEvent('stuff', {data: o});
|
| - window.dispatchEvent(foo);
|
| - })();
|
| - """;
|
| - var completed = false;
|
| - var subscription = null;
|
| - subscription = window.on['stuff'].listen(expectAsyncUntil(
|
| - (MessageEvent e) {
|
| - var data = e.data;
|
| - if (data is String) return; // Messages from unit test protocol.
|
| - completed = true;
|
| - subscription.cancel();
|
| - expect(data, isMap);
|
| - expect(data['eggs'], equals(3));
|
| - },
|
| - () => completed));
|
| - injectSource(JS_CODE);
|
| - });
|
| -
|
| test('dart-to-js-to-dart-postmessage', () {
|
| // Pass dictionaries between Dart and JavaScript.
|
|
|
| @@ -163,6 +136,35 @@ main() {
|
| go('cyclic_list', cyclic_list);
|
| });
|
|
|
| + group('more_primitives', () {
|
| + test('js-to-dart-null-prototype-eventdata', () {
|
| + // Pass an object with a null prototype from JavaScript.
|
| + // It should be seen as a Dart Map.
|
| + final JS_CODE = """
|
| + // Call anonymous function to create a local scope.
|
| + (function() {
|
| + var o = Object.create(null);
|
| + o.eggs = 3;
|
| + var foo = new MessageEvent('stuff', {data: o});
|
| + window.dispatchEvent(foo);
|
| + })();
|
| + """;
|
| + var completed = false;
|
| + var subscription = null;
|
| + subscription = window.on['stuff'].listen(expectAsyncUntil(
|
| + (MessageEvent e) {
|
| + var data = e.data;
|
| + if (data is String) return; // Messages from unit test protocol.
|
| + completed = true;
|
| + subscription.cancel();
|
| + expect(data, isMap);
|
| + expect(data['eggs'], equals(3));
|
| + },
|
| + () => completed));
|
| + injectSource(JS_CODE);
|
| + });
|
| + });
|
| +
|
| group('typed_arrays', () {
|
| var array_buffer = new Uint8List(16).buffer;
|
| var view_a = new Float32List.view(array_buffer, 0, 4);
|
|
|