mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee
This commit is contained in:
parent
fe1a057bd1
commit
24183668c4
1960 changed files with 29853 additions and 10555 deletions
|
@ -0,0 +1,24 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue