summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/offline/introduction-4
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/browsers/offline/introduction-4')
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/.gitkeep0
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/contains.json10
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_cached.html18
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_checking.html18
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_downloading-manual.html23
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_error-manual.html23
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_noupdate.html19
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_obsolete-manual.html23
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_progress.html18
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready-manual.html22
-rw-r--r--testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready_swapcache-manual.html30
11 files changed, 204 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/.gitkeep b/testing/web-platform/tests/html/browsers/offline/introduction-4/.gitkeep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/.gitkeep
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/contains.json b/testing/web-platform/tests/html/browsers/offline/introduction-4/contains.json
new file mode 100644
index 000000000..799caa23a
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/contains.json
@@ -0,0 +1,10 @@
+[
+ {
+ "id": "supporting-offline-caching-for-legacy-applications",
+ "original_id": "supporting-offline-caching-for-legacy-applications"
+ },
+ {
+ "id": "appcacheevents",
+ "original_id": "appcacheevents"
+ }
+] \ No newline at end of file
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_cached.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_cached.html
new file mode 100644
index 000000000..24f57769f
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_cached.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_cached</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("cached event test");
+ var cache = window.applicationCache;
+
+ cache.oncached = t.done();
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_checking.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_checking.html
new file mode 100644
index 000000000..c180eca9d
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_checking.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_checking</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("checking event test");
+ var cache = window.applicationCache;
+
+ cache.onchecking = t.done();
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_downloading-manual.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_downloading-manual.html
new file mode 100644
index 000000000..26b003f06
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_downloading-manual.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_downloading</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <ol>
+ <li>Modify the commented part of the manifest file (manifest/clock.manifest) on the server.</li>
+ <li>Refresh the page.</li>
+ </ol>
+
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("downloading event test");
+ var cache = window.applicationCache;
+
+ cache.ondownloading = t.done();
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_error-manual.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_error-manual.html
new file mode 100644
index 000000000..19abb3d6b
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_error-manual.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_error</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <ol>
+ <li>Add a dummy file in the manifest file (manifest/clock.manifest).</li>
+ <li>Refresh the page.</li>
+ </ol>
+
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("error event test");
+ var cache = window.applicationCache;
+
+ cache.onerror = t.done();
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_noupdate.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_noupdate.html
new file mode 100644
index 000000000..1e4dd89cf
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_noupdate.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_noupdate</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("noupdate event test");
+ var cache = window.applicationCache;
+
+ cache.onnoupdate = t.done();
+ </script>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_obsolete-manual.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_obsolete-manual.html
new file mode 100644
index 000000000..cab5e01cc
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_obsolete-manual.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_obsolete</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <ol>
+ <li>Remove the manifest file (manifest/clock.manifest) from the server.</li>
+ <li>Refresh the page.</li>
+ </ol>
+
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("obsolete event test");
+ var cache = window.applicationCache;
+
+ cache.onobsolete = t.done();
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_progress.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_progress.html
new file mode 100644
index 000000000..a808db757
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_progress.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_progress</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("progress event test");
+ var cache = window.applicationCache;
+
+ cache.onprogress = t.done();
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready-manual.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready-manual.html
new file mode 100644
index 000000000..4de435144
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready-manual.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_updateready</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <ol>
+ <li>Modify the commented part in the manifest file (manifest/clock.manifest) on the server.</li>
+ <li>Refresh the page.</li>
+ </ol>
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("updateready event test");
+ var cache = window.applicationCache;
+
+ cache.onupdateready = t.done();
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready_swapcache-manual.html b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready_swapcache-manual.html
new file mode 100644
index 000000000..da6cead02
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/offline/introduction-4/event_updateready_swapcache-manual.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html manifest="../resources/manifest/clock.manifest">
+ <head>
+ <title>Offline Application Cache - Event_updateready_swapCache</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <ol>
+ <li>Modify the commented part in manifest file (manifest/clock.manifest) on the server.</li>
+ <li>Refresh the page.</li>
+ </ol>
+
+ <div id="log"></div>
+
+ <script>
+ var t = async_test("swapCache method test after updateready event is raised");
+ 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>