Index: tests/html/postmessage_structured_test.dart |
=================================================================== |
--- tests/html/postmessage_structured_test.dart (revision 14114) |
+++ tests/html/postmessage_structured_test.dart (working copy) |
@@ -19,6 +19,8 @@ |
main() { |
useHtmlConfiguration(); |
+ var isMap = new isInstanceOf<Map>('Map'); |
+ |
test('js-to-dart-postmessage', () { |
// Pass an object literal from JavaScript. It should be seen as a Dart |
// Map. |
@@ -34,7 +36,7 @@ |
guardAsync(() { |
var data = e.data; |
if (data is String) return; // Messages from unit test protocol. |
- expect(data is Map); |
+ expect(data, isMap); |
expect(data['eggs'], equals(3)); |
onSuccess(e); |
}); |
@@ -66,7 +68,7 @@ |
guardAsync(() { |
var data = e.data; |
if (data is String) return; // Messages from unit test protocol. |
- expect(data is Map); |
+ expect(data, isMap); |
if (data['recipient'] != 'DART') return; // Hearing the sent message. |
expect(data['peas'], equals(50)); |
onSuccess(e); |
@@ -98,7 +100,7 @@ |
guardAsync(() { |
var data = e.data; |
if (data is String) return; // Messages from unit test protocol. |
- expect(data is Map); |
+ expect(data, isMap); |
if (data['recipient'] != 'DART') return; // Not for me. |
var returnedValue = data['data']; |