| OLD | NEW |
| 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 import 'utils.dart'; | 7 import 'utils.dart'; |
| 8 | 8 |
| 9 const String DB_NAME = 'Test'; | 9 const String DB_NAME = 'Test'; |
| 10 const String STORE_NAME = 'TEST'; | 10 const String STORE_NAME = 'TEST'; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 expect(idb.IdbFactory.supported, true); | 121 expect(idb.IdbFactory.supported, true); |
| 122 }); | 122 }); |
| 123 }); | 123 }); |
| 124 | 124 |
| 125 group('functional', () { | 125 group('functional', () { |
| 126 test('throws when unsupported', () { | 126 test('throws when unsupported', () { |
| 127 var expectation = idb.IdbFactory.supported ? returnsNormally : throws; | 127 var expectation = idb.IdbFactory.supported ? returnsNormally : throws; |
| 128 | 128 |
| 129 expect(() { | 129 expect(() { |
| 130 var db = html.window.indexedDB; | 130 var db = html.window.indexedDB; |
| 131 db.open('random_db'); |
| 131 }, expectation); | 132 }, expectation); |
| 132 }); | 133 }); |
| 133 | 134 |
| 134 // Don't bother with these tests if it's unsupported. | 135 // Don't bother with these tests if it's unsupported. |
| 135 if (idb.IdbFactory.supported) { | 136 if (idb.IdbFactory.supported) { |
| 136 futureTest('upgrade', testUpgrade); | 137 futureTest('upgrade', testUpgrade); |
| 137 tests_dynamic(); | 138 tests_dynamic(); |
| 138 tests_typed(); | 139 tests_typed(); |
| 139 } | 140 } |
| 140 }); | 141 }); |
| 141 } | 142 } |
| OLD | NEW |