diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/html/browsers/offline | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/html/browsers/offline')
52 files changed, 732 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/offline/.gitkeep b/testing/web-platform/tests/html/browsers/offline/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/appcache/.gitkeep b/testing/web-platform/tests/html/browsers/offline/appcache/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/appcache/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/.gitkeep b/testing/web-platform/tests/html/browsers/offline/application-cache-api/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_checking-manual.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_checking-manual.html new file mode 100644 index 000000000..a4a3b41a7 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_checking-manual.html @@ -0,0 +1,23 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_status_CHECKING</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <ol> + <li>Refresh the page.</li> + </ol> + + <div id="log"></div> + <script> + var t = async_test("checking status test"), + cache = window.applicationCache; + + cache.onchecking = t.step_func_done(function() { + assert_equals(cache.status, cache.CHECKING, "cache.status should equals cache.CHECKING"); + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_downloading-manual.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_downloading-manual.html new file mode 100644 index 000000000..c09d11d78 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_downloading-manual.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_status_DOWNLOADING</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("downloading status test"), + cache = window.applicationCache; + + cache.ondownloading = t.step_func_done(function() { + assert_equals(cache.status, cache.DOWNLOADING, "cache.status should equals cache.DOWNLOADING"); + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_idle.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_idle.html new file mode 100644 index 000000000..21725bb00 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_idle.html @@ -0,0 +1,22 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_status_IDLE</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + <script> + var t = async_test("idle status test"), + cache = window.applicationCache; + + setTimeout(function(){ + t.step(function() { + assert_equals(cache.status, cache.IDLE, "cache.status should equals cache.IDLE"); + }); + t.done(); + }, 3000); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_obsolete-manual.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_obsolete-manual.html new file mode 100644 index 000000000..77005644a --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_obsolete-manual.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_status_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 status test"), + cache = window.applicationCache; + + cache.onobsolete = t.step_func_done(function() { + assert_equals(cache.status, cache.OBSOLETE, "cache.status should equals cache.OBSOLETE"); + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_uncached.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_uncached.html new file mode 100644 index 000000000..300c4a1b1 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_uncached.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Offline Application Cache - API_status_UNCACHED</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + + <script> + var cache = window.applicationCache; + + test(function(){ + assert_equals(cache.status, cache.UNCACHED, "uncached status test"); + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_updateready-manual.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_updateready-manual.html new file mode 100644 index 000000000..7e1533374 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_status_updateready-manual.html @@ -0,0 +1,25 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_status_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 status test"), + cache = window.applicationCache; + + cache.onupdateready = t.step_func_done(function() { + assert_equals(cache.status, cache.UPDATEREADY, "cache.status should equals cache.UPDATEREADY"); + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_swapcache-manual.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_swapcache-manual.html new file mode 100644 index 000000000..6649d980f --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_swapcache-manual.html @@ -0,0 +1,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> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_swapcache_error.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_swapcache_error.html new file mode 100644 index 000000000..02e7b3cd8 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_swapcache_error.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_swapCache_error</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + + <script> + var cache = window.applicationCache; + + test(function() { + assert_throws("INVALID_STATE_ERR", function(){cache.swapCache();}); + }, "INVALID_STATE_ERR error test") + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_update.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_update.html new file mode 100644 index 000000000..452daa711 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_update.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_update</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + + <script> + var cache = window.applicationCache; + + test(function() { + try { + cache.update() + assert_true(true, "update method test") + } catch (e) { + assert_unreached("update method failed."); + } + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_update_error.html b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_update_error.html new file mode 100644 index 000000000..ef88158cd --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/application-cache-api/api_update_error.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<html manifest="../resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - API_update_error</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, then calling update() will throw InvalidStateError exception.</li> + </ol> + + <div id="log"></div> + + <script> + var cache = window.applicationCache; + test(function() { + assert_throws("INVALID_STATE_ERR", function(){cache.update();}); + }, "INVALID_STATE_ERR error test") + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/browser-state/.gitkeep b/testing/web-platform/tests/html/browsers/offline/browser-state/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/browser-state/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/browser-state/navigator_online_event-manual.html b/testing/web-platform/tests/html/browsers/offline/browser-state/navigator_online_event-manual.html new file mode 100644 index 000000000..b100f177e --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/browser-state/navigator_online_event-manual.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Offline Application Cache</title> + <link rel="stylesheet" href="../resources/css/result.css"> + </head> + <body> + <h1>navigator_online_event</h1> + + <ol> + <li>Change the 'work offline' mode.</li> + <li>If actual result and expected result are same, then test is <span class="manualpass">Pass</span>, otherwise <span class="manualfail">Fail</span>.</li> + </ol> + + <hr> + + <h2>Actual Result</h2> + <div id="actualResult"> + <span id="actualMsg"></span> + </div> + + <h2>Expected Result</h2> + <div id="expectedResult"> + <span id="expectedMsg">apply 'work offline': offline event is raised.<p>release 'work offline': online event is raised.</span> + </div> + <script> + + function showOnline() { + document.getElementById('actualMsg').innerHTML = 'online event is raised.'; + } + + function showOffline() { + document.getElementById('actualMsg').innerHTML = 'offline event is raised.'; + } + + window.addEventListener("online", showOnline, false); + window.addEventListener("offline", showOffline, false); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/browser-state/navigator_online_online.html b/testing/web-platform/tests/html/browsers/offline/browser-state/navigator_online_online.html new file mode 100644 index 000000000..81547c3fb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/browser-state/navigator_online_online.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Offline Application Cache - navigator_online_online</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + + <script> + test(function() { + assert_true(navigator.onLine, "onLine test"); + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/changestonetworkingmodel/.gitkeep b/testing/web-platform/tests/html/browsers/offline/changestonetworkingmodel/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/changestonetworkingmodel/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/changestonetworkingmodel/original-id.json b/testing/web-platform/tests/html/browsers/offline/changestonetworkingmodel/original-id.json new file mode 100644 index 000000000..2f77367c8 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/changestonetworkingmodel/original-id.json @@ -0,0 +1 @@ +{"original_id":"changesToNetworkingModel"}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/disk-space/.gitkeep b/testing/web-platform/tests/html/browsers/offline/disk-space/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/disk-space/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/downloading-or-updating-an-application-cache/.gitkeep b/testing/web-platform/tests/html/browsers/offline/downloading-or-updating-an-application-cache/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/downloading-or-updating-an-application-cache/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/expiring-application-caches/.gitkeep b/testing/web-platform/tests/html/browsers/offline/expiring-application-caches/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/expiring-application-caches/.gitkeep 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> diff --git a/testing/web-platform/tests/html/browsers/offline/manifest_main_empty-manual.html b/testing/web-platform/tests/html/browsers/offline/manifest_main_empty-manual.html new file mode 100644 index 000000000..317aaa113 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/manifest_main_empty-manual.html @@ -0,0 +1,14 @@ +<!DOCTYPE HTML> +<html manifest="resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - manifest_main_empty</title> + <link rel="stylesheet" href="resources/css/result.css"> + </head> + <body> + <ol> + <li>Disable the network connection.</li> + <li>Refresh the page.</li> + <li>If the page is normally displayed, then test is <span class="manualpass"><b>PASS</b></span>, otherwise <span class="manualfail"><b>FAIL</b></span>.</li> + </ol> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/manifest_notchanged_online-manual.html b/testing/web-platform/tests/html/browsers/offline/manifest_notchanged_online-manual.html new file mode 100644 index 000000000..a464b426a --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/manifest_notchanged_online-manual.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<html manifest="resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - manifest_notchanged_online</title> + <script src="resources/js/clock.js"></script> + <link rel="stylesheet" href="resources/css/result.css"> + <link rel="stylesheet" href="resources/css/clock.css"> + <link rel="stylesheet" href="resources/css/online.css" type="text/css" media="screen"> + </head> + <body> + <ol> + <li>Remove time element of this html document and not change manifest file.</li> + <li>Refresh the page.</li> + <li>If the page is normally displayed, then test is <span class="manualpass"><b>PASS</b></span>, otherwise <span class="manualfail"><b>FAIL</b></span>.</li> + </ol> + + <p class="connectivity" width="600">The time is: <output id="clock"></output></p> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/manifest_section_empty-manual.html b/testing/web-platform/tests/html/browsers/offline/manifest_section_empty-manual.html new file mode 100644 index 000000000..eea2dbba3 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/manifest_section_empty-manual.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<html manifest="resources/manifest/section_empty.manifest"> + <head> + <title>Offline Application Cache - manifest_section_empty</title> + <script src="resources/js/clock.js"></script> + <link rel="stylesheet" href="resources/css/result.css"> + <link rel="stylesheet" href="resources/css/clock.css"> + <link rel="stylesheet" href="resources/css/online.css" type="text/css" media="screen"> + </head> + <body> + <ol> + <li>Disable the network connection.</li> + <li>Refresh the page.</li> + <li>If the time element and colors of result elements are normally displayed, then test is <span class="manualpass"><b>PASS</b></span>, otherwise <span class="manualfail"><b>FAIL</b></span>.</li> + </ol> + + <p class="connectivity" width="600">The time is: <output id="clock"></output></p> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/manifest_section_many-manual.html b/testing/web-platform/tests/html/browsers/offline/manifest_section_many-manual.html new file mode 100644 index 000000000..9378df1b4 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/manifest_section_many-manual.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<html manifest="resources/manifest/section_many.manifest"> + <head> + <title>Offline Application Cache - manifest_section_many</title> + <script src="resources/js/clock.js"></script> + <link rel="stylesheet" href="resources/css/result.css"> + <link rel="stylesheet" href="resources/css/clock.css"> + <link rel="stylesheet" href="resources/css/online.css" type="text/css" media="screen"> + </head> + <body> + <ol type="1"> + <li>Disable the network connection.</li> + <li>Refresh the page.</li> + <li>If the time element and colors of result elements are normally displayed, then test is <span class="manualpass"><b>PASS</b></span>, otherwise <span class="manualfail"><b>FAIL</b></span>.</li> + </ol> + + <p class="connectivity" width="600">The time is: <output id="clock"></output></p> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/manifest_url_check.html b/testing/web-platform/tests/html/browsers/offline/manifest_url_check.html new file mode 100644 index 000000000..02bf70b16 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/manifest_url_check.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html manifest="resources/manifest/url_check.manifest"> + <head> + <title>Offline Application Cache - URL_#</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + + <script> + var t = async_test("url check test"); + var cache = window.applicationCache; + + cache.onerror = t.done(); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/manifests/.gitkeep b/testing/web-platform/tests/html/browsers/offline/manifests/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/manifests/.gitkeep diff --git a/testing/web-platform/tests/html/browsers/offline/manifests/contains.json b/testing/web-platform/tests/html/browsers/offline/manifests/contains.json new file mode 100644 index 000000000..3fe509a78 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/manifests/contains.json @@ -0,0 +1,14 @@ +[ + { + "id": "some-sample-manifests", + "original_id": "some-sample-manifests" + }, + { + "id": "writing-cache-manifests", + "original_id": "writing-cache-manifests" + }, + { + "id": "parsing-cache-manifests", + "original_id": "parsing-cache-manifests" + } +]
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/css/clock.css b/testing/web-platform/tests/html/browsers/offline/resources/css/clock.css new file mode 100644 index 000000000..fa406d0fb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/css/clock.css @@ -0,0 +1 @@ +output { font: 1em sans-serif; }
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/css/offline.css b/testing/web-platform/tests/html/browsers/offline/resources/css/offline.css new file mode 100644 index 000000000..76b7f3985 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/css/offline.css @@ -0,0 +1,5 @@ +.connectivity { + color: #fff; + background: red; + padding: 20px; +}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/css/online.css b/testing/web-platform/tests/html/browsers/offline/resources/css/online.css new file mode 100644 index 000000000..39efcb2ab --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/css/online.css @@ -0,0 +1,5 @@ +.connectivity { + color: #fff; + background: blue; + padding: 20px; +}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/css/result.css b/testing/web-platform/tests/html/browsers/offline/resources/css/result.css new file mode 100644 index 000000000..7d784b8ab --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/css/result.css @@ -0,0 +1,11 @@ +.manualpass { + color: green; +} +.manualfail { + color: red; +}.pass { + color: green; +} +.fail { + color: red; +} diff --git a/testing/web-platform/tests/html/browsers/offline/resources/html/clock.html b/testing/web-platform/tests/html/browsers/offline/resources/html/clock.html new file mode 100644 index 000000000..6b8949a6b --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/html/clock.html @@ -0,0 +1,12 @@ +<!-- clock.html --> +<!DOCTYPE HTML> +<html> + <head> + <title>Clock</title> + <script src="../js/clock.js"></script> + <link rel="stylesheet" href="../css/clock.css"> + </head> + <body> + <p>The time is: <output id="clock"></output></p> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/js/clock.js b/testing/web-platform/tests/html/browsers/offline/resources/js/clock.js new file mode 100644 index 000000000..1ac0dca53 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/js/clock.js @@ -0,0 +1,3 @@ +setTimeout(function () { + document.getElementById('clock').value = new Date(); +}, 1000);
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/manifest/clock.manifest b/testing/web-platform/tests/html/browsers/offline/resources/manifest/clock.manifest new file mode 100644 index 000000000..a61aae6c6 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/manifest/clock.manifest @@ -0,0 +1,17 @@ +CACHE MANIFEST + +# Version 1 + +CACHE: +../css/clock.css +../js/clock.js +../css/result.css +../css/offline.css +/resources/testharness.js +/resources/testharnessreport.js + +NETWORK: +../html/clock.html + +FALLBACK: +../css/online.css ../css/offline.css
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/manifest/section_empty.manifest b/testing/web-platform/tests/html/browsers/offline/resources/manifest/section_empty.manifest new file mode 100644 index 000000000..a23b9013b --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/manifest/section_empty.manifest @@ -0,0 +1,10 @@ +CACHE MANIFEST + +# Version 1 + +../css/clock.css +../js/clock.js +../css/result.css +../css/online.css +/resources/testharness.js +/resources/testharnessreport.js
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/manifest/section_many.manifest b/testing/web-platform/tests/html/browsers/offline/resources/manifest/section_many.manifest new file mode 100644 index 000000000..7e5e5e999 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/manifest/section_many.manifest @@ -0,0 +1,19 @@ +CACHE MANIFEST + +# Version 1 + +CACHE: +../css/clock.css +../js/clock.js + +CACHE: +../css/result.css +../css/offline.css +/resources/testharness.js +/resources/testharnessreport.js + +NETWORK: +../html/clock.html + +FALLBACK: +../css/online.css ../css/offline.css
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/resources/manifest/url_check.manifest b/testing/web-platform/tests/html/browsers/offline/resources/manifest/url_check.manifest new file mode 100644 index 000000000..041df5e55 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/resources/manifest/url_check.manifest @@ -0,0 +1,17 @@ +CACHE MANIFEST + +# Version 1 + +CACHE: +../css/cl#ock.css +../js/clock.js +../css/result.css +../css/offline.css +/resources/testharness.js +/resources/testharnessreport.js + +NETWORK: +../html/clock.html + +FALLBACK: +../css/online.css ../css/offline.css
\ No newline at end of file diff --git a/testing/web-platform/tests/html/browsers/offline/section_network_offline-manual.html b/testing/web-platform/tests/html/browsers/offline/section_network_offline-manual.html new file mode 100644 index 000000000..c4121f5bc --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/section_network_offline-manual.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML> +<html manifest="resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - Section_network_offline</title> + <link rel="stylesheet" href="resources/css/result.css"> + </head> + <body> + <ol> + <li>Disable the network connection.</li> + <li>Refresh the page.</li> + <li>If only the frame element can't be loaded, then test is <span class="manualpass"><b>PASS</b></span>, otherwise <span class="manualfail"><b>FAIL</b></span>.</li> + </ol> + + <IFRAME id="TestFrame" name="TestWindow" src="html/clock.html" width="600" height="50" scrolling="auto" frameborder="1"> + </IFRAME> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/section_network_online-manual.html b/testing/web-platform/tests/html/browsers/offline/section_network_online-manual.html new file mode 100644 index 000000000..a5d8e5940 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/section_network_online-manual.html @@ -0,0 +1,16 @@ +<!DOCTYPE HTML> +<html manifest="resources/manifest/clock.manifest"> + <head> + <title>Offline Application Cache - Section_network_online</title> + <link rel="stylesheet" href="resources/css/result.css"> + </head> + <body> + <ol> + <li>Refresh the page.</li> + <li>If the frame element is loaded, then test is <span class="manualpass"><b>PASS</b></span>, otherwise <span class="manualfail"><b>FAIL</b></span>.</li> + </ol> + + <IFRAME id="TestFrame" name="TestWindow" src="html/clock.html" width="600" height="50" scrolling="auto" frameborder="1"> + </IFRAME> + </body> +</html> diff --git a/testing/web-platform/tests/html/browsers/offline/the-application-cache-selection-algorithm/.gitkeep b/testing/web-platform/tests/html/browsers/offline/the-application-cache-selection-algorithm/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/testing/web-platform/tests/html/browsers/offline/the-application-cache-selection-algorithm/.gitkeep |