mirror of
https://github.com/servo/servo.git
synced 2025-09-18 19:08:22 +01:00
Auto merge of #16506 - cbrewster:about_chaos, r=asajeffrey
Make non-initial about:blank loads async <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14856 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16506) <!-- Reviewable:end -->
This commit is contained in:
commit
dc8cf694ed
20 changed files with 336 additions and 200 deletions
|
@ -331418,6 +331418,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html": [
|
||||
[
|
||||
"/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html": [
|
||||
[
|
||||
"/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html",
|
||||
|
@ -570683,6 +570689,10 @@
|
|||
"56df0cb79a1af927a0209c0bbbb5edb25ccaee5f",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html": [
|
||||
"46708fc218e559fba7049a36888a7c8a24c22672",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/cross_origin_child.html": [
|
||||
"a42082bb612b280eda5aa598ed750cfce3edd537",
|
||||
"support"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[matchMedia.html]
|
||||
disabled: true
|
||||
type: testharness
|
||||
[window.matchMedia exists]
|
||||
expected: FAIL
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Iframe's contentDocument should only change after its pending load has matured.</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body></body>
|
||||
<script>
|
||||
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();
|
||||
});
|
||||
|
||||
assert_equals(iframe.contentDocument.location.toString(), "about:blank");
|
||||
iframe.src = "support/blank.htm?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.");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue