mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Verify that contentDocument is updated during nested browsing context document parsing.
This commit is contained in:
parent
a34c8f952e
commit
3315d94057
3 changed files with 24 additions and 5 deletions
|
@ -8,13 +8,20 @@
|
|||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
document.body.appendChild(iframe);
|
||||
iframe.onload = t.step_func(function() {
|
||||
assert_true(iframe.contentDocument.location.toString().includes("support/blank.htm"));
|
||||
t.done();
|
||||
var checkedDuringParse = false;
|
||||
iframe.onload = t.step_func_done(function() {
|
||||
testContentDocument();
|
||||
assert_true(checkedDuringParse);
|
||||
});
|
||||
|
||||
let url = "support/iframe-that-checks-contentDocument.html";
|
||||
window.testContentDocument = t.step_func(function() {
|
||||
assert_true(iframe.contentDocument.location.toString().includes(url));
|
||||
checkedDuringParse = true;
|
||||
});
|
||||
|
||||
assert_equals(iframe.contentDocument.location.toString(), "about:blank");
|
||||
iframe.src = "support/blank.htm?pipe=trickle(d2)";
|
||||
iframe.src = url + "?pipe=trickle(d2)";
|
||||
// The location of the contentDocument should not change until the new document has matured.
|
||||
assert_equals(iframe.contentDocument.location.toString(), "about:blank");
|
||||
}, "contentDocument should only change after a load matures.");
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<script>
|
||||
parent.testContentDocument();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue