mirror of
https://github.com/servo/servo.git
synced 2025-08-01 03:30:33 +01:00
wpt test for location.reload()
This commit is contained in:
parent
c7e5e785b2
commit
e742e7e9bc
3 changed files with 51 additions and 1 deletions
|
@ -29184,7 +29184,16 @@
|
|||
},
|
||||
"local_changes": {
|
||||
"deleted": [],
|
||||
"items": {},
|
||||
"items": {
|
||||
"testharness": {
|
||||
"html/browsers/history/the-location-interface/location_reload.html": [
|
||||
{
|
||||
"path": "html/browsers/history/the-location-interface/location_reload.html",
|
||||
"url": "/html/browsers/history/the-location-interface/location_reload.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"reftest_nodes": {}
|
||||
},
|
||||
"reftest_nodes": {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<script>
|
||||
parent._ping(window.location.href)
|
||||
location.reload();
|
||||
</script>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>location_reload</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<iframe></iframe>
|
||||
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
var url = new URL("./location_reload-iframe.html", window.location).href;
|
||||
var pingCount = 0;
|
||||
|
||||
window._ping = t.step_func(function(innerURL) {
|
||||
assert_equals(url, innerURL, "iframe url (" + pingCount + ")");
|
||||
pingCount++;
|
||||
if (pingCount == 5) {
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
|
||||
var iframe = document.querySelector("iframe");
|
||||
iframe.src = url;
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue