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

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

Issue 12421005: Attempting to fix IndexedDB test on IE10 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/html.status ('k') | tests/html/indexeddb_5_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 IndexedDB1Test; 1 library IndexedDB1Test;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_individual_config.dart'; 3 import '../../pkg/unittest/lib/html_individual_config.dart';
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:html' as html; 5 import 'dart:html' as html;
6 import 'dart:indexed_db' as idb; 6 import 'dart:indexed_db' as idb;
7 7
8 const String DB_NAME = 'Test'; 8 const String DB_NAME = 'Test';
9 const String STORE_NAME = 'TEST'; 9 const String STORE_NAME = 'TEST';
10 const int VERSION = 1; 10 const int VERSION = 1;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Test that indexed_db is properly flagged as supported or not. 115 // Test that indexed_db is properly flagged as supported or not.
116 // Note that the rest of the indexed_db tests assume that this has been 116 // Note that the rest of the indexed_db tests assume that this has been
117 // checked. 117 // checked.
118 group('supported', () { 118 group('supported', () {
119 test('supported', () { 119 test('supported', () {
120 expect(idb.IdbFactory.supported, true); 120 expect(idb.IdbFactory.supported, true);
121 }); 121 });
122 }); 122 });
123 123
124 group('supportsDatabaseNames', () {
125 test('supported', () {
126 expect(html.window.indexedDB.supportsDatabaseNames, isTrue);
127 });
128 });
129
124 group('functional', () { 130 group('functional', () {
125 test('throws when unsupported', () { 131 test('throws when unsupported', () {
126 var expectation = idb.IdbFactory.supported ? returnsNormally : throws; 132 var expectation = idb.IdbFactory.supported ? returnsNormally : throws;
127 133
128 expect(() { 134 expect(() {
129 var db = html.window.indexedDB; 135 var db = html.window.indexedDB;
130 db.open('random_db'); 136 db.open('random_db');
131 }, expectation); 137 }, expectation);
132 }); 138 });
133 139
134 // Don't bother with these tests if it's unsupported. 140 // Don't bother with these tests if it's unsupported.
135 if (idb.IdbFactory.supported) { 141 if (idb.IdbFactory.supported) {
136 test('upgrade', testUpgrade); 142 test('upgrade', testUpgrade);
137 tests_dynamic(); 143 tests_dynamic();
138 tests_typed(); 144 tests_typed();
139 } 145 }
140 }); 146 });
141 } 147 }
OLDNEW
« no previous file with comments | « tests/html/html.status ('k') | tests/html/indexeddb_5_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698