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

Unified Diff: tests/html/cache_test.dart

Issue 11885031: Adding support checks for ApplicationCache. (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 side-by-side diff with in-line comments
Download patch
Index: tests/html/cache_test.dart
diff --git a/tests/html/cache_test.dart b/tests/html/cache_test.dart
index d70a2875feb1b1e15783dd52d497f95adbd3afbf..5f110b28541121a2f6d016e511dfa641b82c378d 100644
--- a/tests/html/cache_test.dart
+++ b/tests/html/cache_test.dart
@@ -1,14 +1,28 @@
library CacheTest;
import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
main() {
- useHtmlConfiguration();
- test('ApplicationCache', () {
- ApplicationCache appCache = window.applicationCache;
- expect(cacheStatusToString(appCache.status), equals("UNCACHED"));
+ useHtmlIndividualConfiguration();
+
+ group('supported', () {
+ test('supported', () {
+ expect(ApplicationCache.supported, true);
+ });
});
+
+ group('ApplicationCache', () {
+ test('ApplicationCache', () {
+ var expectation = ApplicationCache.supported ? returnsNormally : throws;
+ expect(() {
+ ApplicationCache appCache = window.applicationCache;
+ expect(cacheStatusToString(appCache.status), "UNCACHED");
+ }, expectation);
+
+ });
+ });
+
}
String cacheStatusToString(int status) {

Powered by Google App Engine
This is Rietveld 408576698