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

Unified Diff: tests/html/utils.dart

Issue 21303002: Adding additional tests for serialized script value conversions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
« no previous file with comments | « tests/html/serialized_script_value_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/utils.dart
diff --git a/tests/html/utils.dart b/tests/html/utils.dart
index 24e77117db277415330e0f9fe225c6f664d4c552..38ed07337551b56388a02579581ede014c9080c3 100644
--- a/tests/html/utils.dart
+++ b/tests/html/utils.dart
@@ -41,6 +41,16 @@ verifyGraph(expected, actual) {
eItems.add(expected);
aItems.add(actual);
+ if (expected is Blob) {
+ expect(actual is Blob, isTrue,
+ reason: '$actual is Blob');
+ expect(expected.type, equals(actual.type),
+ reason: message(path, '.type'));
+ expect(expected.size, equals(actual.size),
+ reason: message(path, '.size'));
+ return;
+ }
+
if (expected is ByteBuffer) {
expect(actual is ByteBuffer, isTrue,
reason: '$actual is ByteBuffer');
@@ -51,6 +61,26 @@ verifyGraph(expected, actual) {
return;
}
+ if (expected is DateTime) {
+ expect(actual is DateTime, isTrue,
+ reason: '$actual is DateTime');
+ expect(expected.millisecondsSinceEpoch,
+ equals(actual.millisecondsSinceEpoch),
+ reason: message(path, '.millisecondsSinceEpoch'));
+ return;
+ }
+
+ if (expected is ImageData) {
+ expect(actual is ImageData, isTrue,
+ reason: '$actual is ImageData');
+ expect(expected.width, equals(actual.width),
+ reason: message(path, '.width'));
+ expect(expected.height, equals(actual.height),
+ reason: message(path, '.height'));
+ walk('$path.data', expected.data, actual.data);
+ return;
+ }
+
if (expected is TypedData) {
expect(actual is TypedData, isTrue,
reason: '$actual is TypedData');
« no previous file with comments | « tests/html/serialized_script_value_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698