mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +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,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>
|
Loading…
Add table
Add a link
Reference in a new issue