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

Side by Side Diff: tests/html/websql_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/typed_arrays_5_test.dart ('k') | tests/html/xhr_cross_origin_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library WebDBTest; 1 library WebDBTest;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart'; 3 import '../../pkg/unittest/lib/html_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 void fail(message) { 6 void fail(message) {
7 guardAsync(() { 7 guardAsync(() {
8 expect(false, isTrue, reason: message); 8 expect(false, isTrue, reason: message);
9 }); 9 });
10 } 10 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 final tableName = 'test_table'; 92 final tableName = 'test_table';
93 final columnName = 'test_data'; 93 final columnName = 'test_data';
94 94
95 final db = window.openDatabase('test_db', '1.0', 'test_db', 1024 * 1024); 95 final db = window.openDatabase('test_db', '1.0', 'test_db', 1024 * 1024);
96 96
97 expect(db, isNotNull, reason: 'Unable to open database'); 97 expect(db, isNotNull, reason: 'Unable to open database');
98 98
99 createTransaction(db) 99 createTransaction(db)
100 // Attempt to clear out any tables which may be lurking from previous 100 // Attempt to clear out any tables which may be lurking from previous
101 // runs. 101 // runs.
102 .chain(dropTable(tableName, true)) 102 .then(dropTable(tableName, true))
103 .chain(createTable(tableName, columnName)) 103 .then(createTable(tableName, columnName))
104 .chain(insert(tableName, columnName, 'Some text data')) 104 .then(insert(tableName, columnName, 'Some text data'))
105 .chain(queryTable(tableName, (resultSet) { 105 .then(queryTable(tableName, (resultSet) {
106 guardAsync(() { 106 guardAsync(() {
107 expect(resultSet.rows.length, 1); 107 expect(resultSet.rows.length, 1);
108 var row = resultSet.rows.item(0); 108 var row = resultSet.rows.item(0);
109 expect(row.containsKey(columnName), isTrue); 109 expect(row.containsKey(columnName), isTrue);
110 expect(row[columnName], 'Some text data'); 110 expect(row[columnName], 'Some text data');
111 }); 111 });
112 })) 112 }))
113 .chain(dropTable(tableName)) 113 .then(dropTable(tableName))
114 .then(expectAsync1((tx) {})); 114 .then(expectAsync1((tx) {}));
115 }); 115 });
116 } 116 }
OLDNEW
« no previous file with comments | « tests/html/typed_arrays_5_test.dart ('k') | tests/html/xhr_cross_origin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698