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

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

Issue 12340079: Fixing websql test on Dartium checked mode (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | 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 'dart:async'; 2 import 'dart:async';
3 import 'dart:html'; 3 import 'dart:html';
4 import 'dart:web_sql'; 4 import 'dart:web_sql';
5 import '../../pkg/unittest/lib/unittest.dart'; 5 import '../../pkg/unittest/lib/unittest.dart';
6 import '../../pkg/unittest/lib/html_individual_config.dart'; 6 import '../../pkg/unittest/lib/html_individual_config.dart';
7 import 'utils.dart'; 7 import 'utils.dart';
8 8
9 void fail(message) { 9 void fail(message) {
10 guardAsync(() { 10 guardAsync(() {
(...skipping 29 matching lines...) Expand all
40 return completer.future; 40 return completer.future;
41 } 41 }
42 42
43 Future<SqlResultSet> insert(SqlTransaction transaction, String tableName, 43 Future<SqlResultSet> insert(SqlTransaction transaction, String tableName,
44 String columnName, value) { 44 String columnName, value) {
45 final completer = new Completer<SqlResultSet>(); 45 final completer = new Completer<SqlResultSet>();
46 46
47 final sql = 'INSERT INTO $tableName ($columnName) VALUES (?)'; 47 final sql = 'INSERT INTO $tableName ($columnName) VALUES (?)';
48 transaction.executeSql(sql, [value], 48 transaction.executeSql(sql, [value],
49 (SqlTransaction tx, SqlResultSet rs) { 49 (SqlTransaction tx, SqlResultSet rs) {
50 completer.complete(tx); 50 completer.complete(rs);
51 }, 51 },
52 (SqlTransaction tx, SqlError error) { 52 (SqlTransaction tx, SqlError error) {
53 completer.completeError(error); 53 completer.completeError(error);
54 }); 54 });
55 55
56 return completer.future; 56 return completer.future;
57 } 57 }
58 58
59 Future<SqlResultSet> queryTable(SqlTransaction transaction, String tableName) { 59 Future<SqlResultSet> queryTable(SqlTransaction transaction, String tableName) {
60 final completer = new Completer<SqlResultSet>(); 60 final completer = new Completer<SqlResultSet>();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 var row = resultSet.rows.item(0); 139 var row = resultSet.rows.item(0);
140 expect(row.containsKey(columnName), isTrue); 140 expect(row.containsKey(columnName), isTrue);
141 expect(row[columnName], 'Some text data'); 141 expect(row[columnName], 'Some text data');
142 expect(resultSet.rows[0], row); 142 expect(resultSet.rows[0], row);
143 }).then((_) { 143 }).then((_) {
144 return dropTable(tx, tableName); 144 return dropTable(tx, tableName);
145 }); 145 });
146 }); 146 });
147 }); 147 });
148 } 148 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698