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

Unified Diff: tests/html/url_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/url_test.dart
diff --git a/tests/html/url_test.dart b/tests/html/url_test.dart
index a4d8e4ddf8f6ef0215799d5bbcc8783db900eb3b..58cdf09b3f18d937f30284769be9e0ebc1b51eb7 100644
--- a/tests/html/url_test.dart
+++ b/tests/html/url_test.dart
@@ -6,6 +6,7 @@ library url_test;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_config.dart';
import 'dart:html';
+import 'dart:typeddata';
main() {
useHtmlConfiguration();
@@ -23,8 +24,8 @@ main() {
var byteString = window.atob(dataUri.split(',')[1]);
var mimeString = dataUri.split(',')[0].split(':')[1].split(';')[0];
- var arrayBuffer = new ArrayBuffer(byteString.length);
- var dataArray = new Uint8Array.fromBuffer(arrayBuffer);
+ var arrayBuffer = new Uint8List(byteString.length);
+ var dataArray = new Uint8List.view(arrayBuffer.buffer);
for (var i = 0; i < byteString.length; i++) {
dataArray[i] = byteString.codeUnitAt(i);
}

Powered by Google App Engine
This is Rietveld 408576698