| Index: tests/html/utils.dart
|
| diff --git a/tests/html/utils.dart b/tests/html/utils.dart
|
| index 3257661e93ae9f514045b9bd150ecfe06901f54c..cac5559d8cd88a509d61a38681b16cfe4ba2a918 100644
|
| --- a/tests/html/utils.dart
|
| +++ b/tests/html/utils.dart
|
| @@ -2,6 +2,7 @@ library TestUtils;
|
|
|
| import 'dart:async';
|
| import 'dart:html';
|
| +import 'dart:typeddata';
|
| import '../../pkg/unittest/lib/unittest.dart';
|
|
|
| /**
|
| @@ -40,24 +41,24 @@ verifyGraph(expected, actual) {
|
| eItems.add(expected);
|
| aItems.add(actual);
|
|
|
| - if (expected is ArrayBuffer) {
|
| - expect(actual is ArrayBuffer, isTrue,
|
| - reason: '$actual is ArrayBuffer');
|
| - expect(expected.byteLength, equals(actual.byteLength),
|
| - reason: message(path, '.byteLength'));
|
| + if (expected is ByteBuffer) {
|
| + expect(actual is ByteBuffer, isTrue,
|
| + reason: '$actual is ByteBuffer');
|
| + expect(expected.lengthInBytes, equals(actual.lengthInBytes),
|
| + reason: message(path, '.lengthInBytes'));
|
| // TODO(antonm): one can create a view on top of those
|
| // and check if contents identical. Let's do it later.
|
| return;
|
| }
|
|
|
| - if (expected is ArrayBufferView) {
|
| - expect(actual is ArrayBufferView, isTrue,
|
| - reason: '$actual is ArrayBufferView');
|
| + if (expected is TypedData) {
|
| + expect(actual is TypedData, isTrue,
|
| + reason: '$actual is TypedData');
|
| walk('$path/.buffer', expected.buffer, actual.buffer);
|
| - expect(expected.byteOffset, equals(actual.byteOffset),
|
| - reason: message(path, '.byteOffset'));
|
| - expect(expected.byteLength, equals(actual.byteLength),
|
| - reason: message(path, '.byteLength'));
|
| + expect(expected.offsetInBytes, equals(actual.offsetInBytes),
|
| + reason: message(path, '.offsetInBytes'));
|
| + expect(expected.lengthInBytes, equals(actual.lengthInBytes),
|
| + reason: message(path, '.lengthInBytes'));
|
| // And also fallback to elements check below.
|
| }
|
|
|
|
|