OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html manifest="../resources/manifest/clock.manifest"> | 2 <html manifest="../resources/manifest/clock.manifest"> |
3 <head> | 3 <head> |
4 <title>Offline Application Cache - API_update</title> | 4 <title>Offline Application Cache - API_update</title> |
5 <script src="/resources/testharness.js"></script> | 5 <script src="/resources/testharness.js"></script> |
6 <script src="/resources/testharnessreport.js"></script> | 6 <script src="/resources/testharnessreport.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <div id="log"></div> | 9 <div id="log"></div> |
10 | 10 |
11 <script> | 11 <script> |
12 var cache = window.applicationCache; | 12 var cache = window.applicationCache; |
13 | 13 |
14 test(function() { | 14 async_test(function(t) { |
15 try { | 15 var next = t.step_func(function() { |
| 16 cache.onnoupdate = cache.oncached = null; |
| 17 |
16 cache.update() | 18 cache.update() |
17 assert_true(true, "update method test") | 19 |
18 } catch (e) { | 20 t.done(); |
19 assert_unreached("update method failed."); | 21 }); |
| 22 |
| 23 if (cache.status === cache.IDLE) { |
| 24 next(); |
| 25 } else { |
| 26 cache.onnoupdate = cache.oncached = next; |
20 } | 27 } |
21 }); | 28 }); |
22 </script> | 29 </script> |
23 </body> | 30 </body> |
24 </html> | 31 </html> |
OLD | NEW |