Skip to content

Commit

Permalink
Bug 1922418 [wpt PR 48434] - [document pip] Use the same compatibilit…
Browse files Browse the repository at this point in the history
…y mode as the opener, a=testonly

Automatic update from web-platform-tests
[document pip] Use the same compatibility mode as the opener

Currently, document picture-in-picture windows use quirks mode by
default, since they're just about:blank windows. This CL makes the pip
document match the opener document's compatibility mode instead.

WICG/document-picture-in-picture#128

https://groups.google.com/a/chromium.org/g/blink-dev/c/IR7qdNj4Zyw

Bug: 370423046
Change-Id: Ib1a84947b2408ae0be236afc2173fbcb0f77b598
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5900737
Reviewed-by: Frank Liberato <liberatochromium.org>
Commit-Queue: Tommy Steimel <steimelchromium.org>
Reviewed-by: Nate Chapin <japhetchromium.org>
Cr-Commit-Position: refs/heads/main{#1363338}

--

wpt-commits: 6a80672082519cb3f49bf5dc3cf705a0fe6982c3
wpt-pr: 48434

UltraBlame original commit: b0067e7291835ec0f24ff19254a7373615c3a82d
  • Loading branch information
marco-c committed Oct 15, 2024
1 parent 2a7d0a0 commit 7ffc668
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<title>Test document picture-in-picture copies Document mode when it's quirks mode</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<body>
<script>
promise_test(async (t) => {
assert_equals(document.compatMode, "BackCompat", "The opener document should be on quirks mode");
await test_driver.bless('request PiP window');
const pipWindow = await documentPictureInPicture.requestWindow();
assert_equals(pipWindow.document.compatMode, "BackCompat", "The picture-in-picture document should be on quirks mode");
});
</script>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<title>Test document picture-in-picture copies Document mode</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<body>
<script>
promise_test(async (t) => {
assert_equals(document.compatMode, "CSS1Compat", "The opener document should not be on quirks mode");
await test_driver.bless('request PiP window');
const pipWindow = await documentPictureInPicture.requestWindow();
assert_equals(pipWindow.document.compatMode, "CSS1Compat", "The picture-in-picture document should not be on quirks mode");
});
</script>
</body>

0 comments on commit 7ffc668

Please sign in to comment.