mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Update web-platform-tests to revision ea14651f262003177d0ba5819bd2806a1327b12a
This commit is contained in:
parent
847115ba04
commit
816185f094
272 changed files with 5766 additions and 2855 deletions
|
@ -1,24 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>History pushState sets the url</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var oldLocation = window.location.toString();
|
||||
window.history.pushState(null, "", "#hash");
|
||||
assert_equals(oldLocation + "#hash", window.location.toString(), "pushState updates url");
|
||||
history.back();
|
||||
window.onhashchange = () => {
|
||||
assert_equals(oldLocation, window.location.toString(), 'history traversal restores old url');
|
||||
t.done();
|
||||
};
|
||||
}, "history pushState sets url");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -25,12 +25,18 @@
|
|||
</div>
|
||||
<script>
|
||||
|
||||
function showOnline() {
|
||||
document.getElementById('actualMsg').innerHTML = 'online event is raised.';
|
||||
function showOnline(e) {
|
||||
let msg = 'online event is raised';
|
||||
if (e.target != window)
|
||||
msg += ' (on the WRONG target)';
|
||||
document.getElementById('actualMsg').innerHTML = msg + '.';
|
||||
}
|
||||
|
||||
function showOffline() {
|
||||
document.getElementById('actualMsg').innerHTML = 'offline event is raised.';
|
||||
function showOffline(e) {
|
||||
let msg = 'offline event is raised';
|
||||
if (e.target != window)
|
||||
msg += ' (on the WRONG target)';
|
||||
document.getElementById('actualMsg').innerHTML = msg + '.';
|
||||
}
|
||||
|
||||
window.addEventListener("online", showOnline, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue