mirror of
https://github.com/servo/servo.git
synced 2025-08-16 10:55:34 +01:00
Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d
This commit is contained in:
parent
3f07cfec7c
commit
578498ba24
4001 changed files with 159517 additions and 30260 deletions
|
@ -36,5 +36,50 @@
|
|||
|
||||
hyperlink1.click()
|
||||
hyperlink2.click()
|
||||
})
|
||||
}, "Following a noreferrer link with a named target should not cause creation of a window that can be targeted by another noreferrer link with the same named target");
|
||||
|
||||
async_test(function(t) {
|
||||
var ifr = document.createElement("iframe");
|
||||
ifr.name = "sufficientlyrandomwindownameamiright2";
|
||||
ifr.onload = t.step_func(function() {
|
||||
var hyperlink = document.body.appendChild(document.createElement("a"));
|
||||
t.add_cleanup(function() {
|
||||
hyperlink.remove();
|
||||
});
|
||||
hyperlink.rel = "noreferrer";
|
||||
hyperlink.href = URL.createObjectURL(new Blob(["hello subframe"],
|
||||
{ type: "text/html"}));
|
||||
hyperlink.target = "sufficientlyrandomwindownameamiright2";
|
||||
ifr.onload = t.step_func_done(function() {
|
||||
assert_equals(ifr.contentDocument.documentElement.textContent,
|
||||
"hello subframe");
|
||||
});
|
||||
hyperlink.click();
|
||||
});
|
||||
document.body.appendChild(ifr);
|
||||
t.add_cleanup(function() {
|
||||
ifr.remove();
|
||||
});
|
||||
}, "Targeting a rel=noreferrer link at an existing named subframe should work");
|
||||
|
||||
async_test(function(t) {
|
||||
var win = window.open("", "sufficientlyrandomwindownameamiright3");
|
||||
t.add_cleanup(function() {
|
||||
win.close();
|
||||
});
|
||||
|
||||
var hyperlink = document.body.appendChild(document.createElement("a"));
|
||||
t.add_cleanup(function() {
|
||||
hyperlink.remove();
|
||||
});
|
||||
hyperlink.rel = "noreferrer";
|
||||
hyperlink.href = URL.createObjectURL(new Blob(["hello window"],
|
||||
{ type: "text/html"}));
|
||||
hyperlink.target = "sufficientlyrandomwindownameamiright3";
|
||||
win.onload = t.step_func_done(function() {
|
||||
assert_equals(win.document.documentElement.textContent,
|
||||
"hello window");
|
||||
});
|
||||
hyperlink.click();
|
||||
}, "Targeting a rel=noreferrer link at an existing named window should work");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue