mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
parent
b2a5225831
commit
1a81b18b9f
12321 changed files with 544385 additions and 6 deletions
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -0,0 +1 @@
|
|||
{"original_id":"changesToNetworkingModel"}
|
|
@ -0,0 +1,10 @@
|
|||
[
|
||||
{
|
||||
"id": "supporting-offline-caching-for-legacy-applications",
|
||||
"original_id": "supporting-offline-caching-for-legacy-applications"
|
||||
},
|
||||
{
|
||||
"id": "appcacheevents",
|
||||
"original_id": "appcacheevents"
|
||||
}
|
||||
]
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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"
|
||||
}
|
||||
]
|
|
@ -0,0 +1 @@
|
|||
output { font: 1em sans-serif; }
|
|
@ -0,0 +1,5 @@
|
|||
.connectivity {
|
||||
color: #fff;
|
||||
background: red;
|
||||
padding: 20px;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
.connectivity {
|
||||
color: #fff;
|
||||
background: blue;
|
||||
padding: 20px;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
.manualpass {
|
||||
color: green;
|
||||
}
|
||||
.manualfail {
|
||||
color: red;
|
||||
}.pass {
|
||||
color: green;
|
||||
}
|
||||
.fail {
|
||||
color: red;
|
||||
}
|
|
@ -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>
|
|
@ -0,0 +1,3 @@
|
|||
setTimeout(function () {
|
||||
document.getElementById('clock').value = new Date();
|
||||
}, 1000);
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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>
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue