1
0
Fork 0
firefox/testing/web-platform/tests/css/css-view-transitions/navigation/pageswap-in-hidden-doc-should-skip-transition.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

29 lines
1 KiB
HTML

<!DOCTYPE html>
<title>Tests pageswap dispatch on hidden Documents</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
<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>
<script>
promise_test(async t => {
let popup;
onload = () => {
// Need to restore this browser window once after the window got minimized.
window.set_original_window_rect = rect => {
t.add_cleanup(async () => {
await test_driver.set_window_rect(rect);
});
};
popup = window.open("resources/navigate-after-hide.html");
t.add_cleanup(() => popup.close());
};
const result = await new Promise((resolve, reject) => {
window.popup_done = resolve;
window.popup_error = reject;
});
assert_equals(result, null);
}, "Outbound cross-document view transition is not allowed when document is hidden");
</script>