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

Unified Diff: tests/html/transferables_test.dart

Issue 14367012: Move to new dart:typeddata types for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert generated files for html lib Created 7 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 side-by-side diff with in-line comments
Download patch
Index: tests/html/transferables_test.dart
diff --git a/tests/html/transferables_test.dart b/tests/html/transferables_test.dart
index 7162fab5998efcd4bc9a82198a7e4d61655a727b..88d744f0a13c739f85cf3aa227dd7fb11be343bc 100644
--- a/tests/html/transferables_test.dart
+++ b/tests/html/transferables_test.dart
@@ -6,19 +6,20 @@ library TransferableTest;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_config.dart';
import 'dart:html';
+import 'dart:typeddata';
main() {
useHtmlConfiguration();
- var isArrayBuffer =
- predicate((x) => x is ArrayBuffer, 'is an ArrayBuffer');
+ var isByteBuffer =
+ predicate((x) => x is ByteBuffer, 'is an ByteBuffer');
test('TransferableTest', () {
if (!Platform.supportsTypedData) {
return;
}
- final buffer = (new Float32Array(3)).buffer;
+ final buffer = (new Float32List(3)).buffer;
window.postMessage({
'id': 'transferable data',
'buffer': buffer
@@ -28,7 +29,7 @@ main() {
(e) {
return e.data is Map && e.data['id'] == 'transferable data';
}).then((messageEvent) {
- expect(messageEvent.data['buffer'], isArrayBuffer);
+ expect(messageEvent.data['buffer'], isByteBuffer);
});
});
}

Powered by Google App Engine
This is Rietveld 408576698