mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Added a test for changing an iframe's parentage.
This commit is contained in:
parent
77e0089c12
commit
999e057cb7
10 changed files with 52 additions and 6 deletions
|
@ -36036,6 +36036,18 @@
|
||||||
"url": "/cssom-view/scrolling-no-browsing-context.html"
|
"url": "/cssom-view/scrolling-no-browsing-context.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"html/semantics/embedded-content/the-iframe-element/change_parentage.html": [
|
||||||
|
{
|
||||||
|
"path": "html/semantics/embedded-content/the-iframe-element/change_parentage.html",
|
||||||
|
"url": "/html/semantics/embedded-content/the-iframe-element/change_parentage.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"html/semantics/embedded-content/the-iframe-element/same_origin_parentage.html": [
|
||||||
|
{
|
||||||
|
"path": "html/semantics/embedded-content/the-iframe-element/same_origin_parentage.html",
|
||||||
|
"url": "/html/semantics/embedded-content/the-iframe-element/same_origin_parentage.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"url/url-domainToUnicode.html": [
|
"url/url-domainToUnicode.html": [
|
||||||
{
|
{
|
||||||
"path": "url/url-domainToUnicode.html",
|
"path": "url/url-domainToUnicode.html",
|
||||||
|
|
|
@ -6448,12 +6448,6 @@
|
||||||
"url": "/_mozilla/mozilla/iframe-unblock-onload.html"
|
"url": "/_mozilla/mozilla/iframe-unblock-onload.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mozilla/iframe/same_origin_parentage.html": [
|
|
||||||
{
|
|
||||||
"path": "mozilla/iframe/same_origin_parentage.html",
|
|
||||||
"url": "/_mozilla/mozilla/iframe/same_origin_parentage.html"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mozilla/iframe_contentDocument.html": [
|
"mozilla/iframe_contentDocument.html": [
|
||||||
{
|
{
|
||||||
"path": "mozilla/iframe_contentDocument.html",
|
"path": "mozilla/iframe_contentDocument.html",
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<body>
|
||||||
|
Child.
|
||||||
|
<iframe id="grandchild" src="change_grandchild.html"></iframe>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
var timer = window.setInterval(poll, 100);
|
||||||
|
function poll() {
|
||||||
|
if (document.body.getAttribute("data-contains-grandchild")) {
|
||||||
|
var grandchild = document.getElementById("grandchild");
|
||||||
|
window.frameElement.parentNode.appendChild(grandchild);
|
||||||
|
window.clearTimeout(timer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<body>Grandchild.</body>
|
||||||
|
<script>
|
||||||
|
window.frameElement.parentNode.setAttribute("data-contains-grandchild", true);
|
||||||
|
</script>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Change the frame heriarchy</title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<body>
|
||||||
|
<iframe src="change_child.html"></iframe>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
async_test(function(t) {
|
||||||
|
var timer = window.setInterval(t.step_func(poll), 100);
|
||||||
|
function poll() {
|
||||||
|
// We wait for the grandchild's script to set the custom attribtue.
|
||||||
|
// Note that if this test passes, the grandchild's script must have been run twice,
|
||||||
|
// once to trigger the move from the child to here, and once to pass this test.
|
||||||
|
if (document.body.getAttribute("data-contains-grandchild")) {
|
||||||
|
window.clearTimeout(timer);
|
||||||
|
t.done();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue