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

Unified Diff: tests/html/indexeddb_2_test.dart

Issue 10868067: dart2js dart:html conversions for serialized script values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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/html.status ('k') | tests/html/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/indexeddb_2_test.dart
diff --git a/tests/html/indexeddb_2_test.dart b/tests/html/indexeddb_2_test.dart
index f99589286942cb227bdc8b63ddd2ec8927e543f5..74d0963a5a401c11258f440793d8e9cb29ee0c7a 100644
--- a/tests/html/indexeddb_2_test.dart
+++ b/tests/html/indexeddb_2_test.dart
@@ -75,7 +75,9 @@ testReadWrite(key, value, check,
};
-tests_dynamic() {
+main() {
+ useHtmlConfiguration();
+
var obj1 = {'a': 100, 'b': 's'};
var obj2 = {'x': obj1, 'y': obj1}; // DAG.
@@ -87,14 +89,33 @@ tests_dynamic() {
obj4['a'] = 100;
obj4['b'] = 's';
- test('test_simple', testReadWrite(123, obj1, verifyGraph));
- test('test_DAG', testReadWrite(123, obj2, verifyGraph));
- test('test_cycle', testReadWrite(123, obj3, verifyGraph));
- test('test_simple_splay', testReadWrite(123, obj4, verifyGraph));
-}
+ var cyclic_list = [1, 2, 3];
+ cyclic_list[1] = cyclic_list;
-main() {
- useHtmlConfiguration();
+ go(name, data) => test(name, testReadWrite(123, data, verifyGraph));
+
+ test('test_verifyGraph', () {
+ // Nice to know verifyGraph is working before we rely on it.
+ Expect.mapEquals(obj4, obj4);
+ verifyGraph(obj4, obj4);
+ verifyGraph(obj1, new Map.from(obj1));
+ verifyGraph(obj4, new Map.from(obj4));
+
+ var l1 = [1,2,3];
+ var l2 = [const [1, 2, 3], const [1, 2, 3]];
+ verifyGraph([l1, l1], l2);
+ Expect.throws(() => verifyGraph([[1, 2, 3], [1, 2, 3]], l2));
+
+ verifyGraph(cyclic_list, cyclic_list);
+ });
- tests_dynamic();
+ go('test_simple', obj1);
+ go('test_DAG', obj2);
+ go('test_cycle', obj3);
+ go('test_simple_splay', obj4);
+ go('const_array_1', const [const [1], const [2]]);
+ go('const_array_dag', const [const [1], const [1]]);
+ go('array_deferred_copy', [1,2,3, obj3, obj3, 6]);
+ go('array_deferred_copy_2', [1,2,3, [4, 5, obj3], [obj3, 6]]);
+ go('cyclic_list', cyclic_list);
}
« no previous file with comments | « tests/html/html.status ('k') | tests/html/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698