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

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

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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/fileapi_test.dart ('k') | tests/language/store_to_load_forwarding_phis_vm_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 '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 7
8 void fail(message) { 8 void fail(message) {
9 guardAsync(() { 9 guardAsync(() {
10 expect(false, isTrue, reason: message); 10 expect(false, isTrue, reason: message);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 test('unsupported throws', () { 103 test('unsupported throws', () {
104 var expectation = SqlDatabase.supported ? returnsNormally : throws; 104 var expectation = SqlDatabase.supported ? returnsNormally : throws;
105 expect(() { 105 expect(() {
106 window.openDatabase('test_db', '1.0', 'test_db', 1024 * 1024); 106 window.openDatabase('test_db', '1.0', 'test_db', 1024 * 1024);
107 }, expectation); 107 }, expectation);
108 108
109 }); 109 });
110 test('Web Database', () { 110 test('Web Database', () {
111 // Skip if not supported. 111 // Skip if not supported.
112 if (!SqlDatabase.supported) { 112 if (!SqlDatabase.supported) {
113 return new Future.immediate(null); 113 return new Future.value();
114 } 114 }
115 115
116 final tableName = 'test_table'; 116 final tableName = 'test_table';
117 final columnName = 'test_data'; 117 final columnName = 'test_data';
118 118
119 final db = window.openDatabase('test_db', '1.0', 'test_db', 1024 * 1024); 119 final db = window.openDatabase('test_db', '1.0', 'test_db', 1024 * 1024);
120 120
121 expect(db, isNotNull, reason: 'Unable to open database'); 121 expect(db, isNotNull, reason: 'Unable to open database');
122 122
123 var tx; 123 var tx;
(...skipping 14 matching lines...) Expand all
138 var row = resultSet.rows.item(0); 138 var row = resultSet.rows.item(0);
139 expect(row.containsKey(columnName), isTrue); 139 expect(row.containsKey(columnName), isTrue);
140 expect(row[columnName], 'Some text data'); 140 expect(row[columnName], 'Some text data');
141 expect(resultSet.rows[0], row); 141 expect(resultSet.rows[0], row);
142 }).then((_) { 142 }).then((_) {
143 return dropTable(tx, tableName); 143 return dropTable(tx, tableName);
144 }); 144 });
145 }); 145 });
146 }); 146 });
147 } 147 }
OLDNEW
« no previous file with comments | « tests/html/fileapi_test.dart ('k') | tests/language/store_to_load_forwarding_phis_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698