summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_swapcache-manual.html
blob: 6649d980f6acfcae2ffb346e233ea995439a3452 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE HTML>
<html manifest="../resources/manifest/clock.manifest">
  <head>
    <title>Offline Application Cache - API_swapCache</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <ol>
      <li>Modify the part of comment in manifest file of server.</li>
      <li>Refresh the page.</li>
    </ol>

    <div id="log"></div>

    <script>
      var t = async_test("swapCache method test");
      var cache = window.applicationCache;

      cache.onupdateready = t.step_func(function() {
        try {
          cache.swapCache();
          t.done();
        } catch (e) {
          assert_unreached("swapCache method failed.");
        }
      });
    </script>
  </body>
</html>