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

Unified Diff: tests/html/crypto_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/crypto_test.dart
diff --git a/tests/html/crypto_test.dart b/tests/html/crypto_test.dart
index 57a293024acd83152e0028e8c694e13a87f14745..d0ee241f55b66ade5267eb724962862ea230a406 100644
--- a/tests/html/crypto_test.dart
+++ b/tests/html/crypto_test.dart
@@ -6,6 +6,7 @@ library crypto_test;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
+import 'dart:typeddata';
main() {
useHtmlIndividualConfiguration();
@@ -27,7 +28,7 @@ main() {
test('successful call', () {
var crypto = window.crypto;
- var data = new Uint8Array(100);
+ var data = new Uint8List(100);
expect(data.every((e) => e == 0), isTrue);
crypto.getRandomValues(data);
// In theory this is flaky. However, in practice you will get 100 zeroes
@@ -38,7 +39,7 @@ main() {
test('type mismatch', () {
var crypto = window.crypto;
- var data = new Float32Array(100);
+ var data = new Float32List(100);
expect(() {
crypto.getRandomValues(data);
}, throws, reason: 'Only typed array views with integer types allowed');

Powered by Google App Engine
This is Rietveld 408576698