mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Added tests for cross-origin iframe parentage.
This commit is contained in:
parent
3acb9540ff
commit
07ea9e6332
5 changed files with 54 additions and 0 deletions
|
@ -0,0 +1,12 @@
|
|||
<script src="iframe_harness.js"></script>
|
||||
<body>
|
||||
<iframe src="cross_origin_grandchild.html"></iframe>
|
||||
</body>
|
||||
<script>
|
||||
send_test_results({
|
||||
"id": '79a52de8-4222-427e-92db-caec28e75f8e',
|
||||
"parent": window.parent !== window,
|
||||
"grandparent": window.parent.parent === window.parent,
|
||||
"top": window.top === window.parent,
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,11 @@
|
|||
<script src="iframe_harness.js"></script>
|
||||
<body>
|
||||
</body>
|
||||
<script>
|
||||
send_test_results({
|
||||
"id": '6c8da65d-2c5e-44ef-bb0b-b8b9849aab19',
|
||||
"parent": window.parent !== window,
|
||||
"grandparent": window.parent.parent !== window.parent,
|
||||
"top": window.top === window.parent.parent,
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Check the frame heriarchy</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="iframe_harness.js"></script>
|
||||
<body>
|
||||
<iframe src="http://www1.web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html"></iframe>
|
||||
</body>
|
||||
<script>
|
||||
get_test_results('bffa23ee-b45a-4e9a-9405-87ab437d5cfa');
|
||||
get_test_results('79a52de8-4222-427e-92db-caec28e75f8e');
|
||||
get_test_results('6c8da65d-2c5e-44ef-bb0b-b8b9849aab19');
|
||||
send_test_results({
|
||||
"id": 'bffa23ee-b45a-4e9a-9405-87ab437d5cfa',
|
||||
"parent": window.parent === window,
|
||||
"top": window.top === window,
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue