| 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');
|
|
|