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

Side by Side Diff: client/tests/client/dom/CacheTest.dart

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
OLDNEW
1 #library('CacheTest'); 1 #library('CacheTest');
2 #import('../../../testing/unittest/unittest.dart'); 2 #import('../../../testing/unittest/unittest_dom.dart');
3 #import('dart:dom'); 3 #import('dart:dom');
4 4
5 main() { 5 main() {
6 forLayoutTests(); 6 forLayoutTests();
7 test('ApplicationCache', () { 7 test('ApplicationCache', () {
8 DOMApplicationCache appCache = window.applicationCache; 8 DOMApplicationCache appCache = window.applicationCache;
9 Expect.equals("UNCACHED", cacheStatusToString(appCache.status)); 9 Expect.equals("UNCACHED", cacheStatusToString(appCache.status));
10 }); 10 });
11 } 11 }
12 12
13 String cacheStatusToString(int status) { 13 String cacheStatusToString(int status) {
14 switch (status) { 14 switch (status) {
15 case DOMApplicationCache.UNCACHED: // UNCACHED == 0 15 case DOMApplicationCache.UNCACHED: // UNCACHED == 0
16 return 'UNCACHED'; 16 return 'UNCACHED';
17 case DOMApplicationCache.IDLE: // IDLE == 1 17 case DOMApplicationCache.IDLE: // IDLE == 1
18 return 'IDLE'; 18 return 'IDLE';
19 case DOMApplicationCache.CHECKING: // CHECKING == 2 19 case DOMApplicationCache.CHECKING: // CHECKING == 2
20 return 'CHECKING'; 20 return 'CHECKING';
21 case DOMApplicationCache.DOWNLOADING: // DOWNLOADING == 3 21 case DOMApplicationCache.DOWNLOADING: // DOWNLOADING == 3
22 return 'DOWNLOADING'; 22 return 'DOWNLOADING';
23 case DOMApplicationCache.UPDATEREADY: // UPDATEREADY == 4 23 case DOMApplicationCache.UPDATEREADY: // UPDATEREADY == 4
24 return 'UPDATEREADY'; 24 return 'UPDATEREADY';
25 case DOMApplicationCache.OBSOLETE: // OBSOLETE == 5 25 case DOMApplicationCache.OBSOLETE: // OBSOLETE == 5
26 return 'OBSOLETE'; 26 return 'OBSOLETE';
27 default: 27 default:
28 return 'UNKNOWN CACHE STATUS'; 28 return 'UNKNOWN CACHE STATUS';
29 }; 29 };
30 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698