diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /gfx/layers/apz/test/mochitest/helper_fission_empty.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_fission_empty.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_fission_empty.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_fission_empty.html b/gfx/layers/apz/test/mochitest/helper_fission_empty.html new file mode 100644 index 0000000000..6a95f76339 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_fission_empty.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html id="fission_empty_docelement"> + <meta charset="utf-8"> + <style> + html,body { + /* Convenient for calculation of element positions */ + margin: 0; + padding: 0; + } + </style> + <script src="apz_test_utils.js"></script> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <script src="/tests/SimpleTest/paint_listener.js"></script> + <script> +// This is an empty document that serves as a OOPIF content document that be +// reused by different fission subtests. The subtest can eval stuff in this +// document using the sendToOopif helper and thereby populate this document +// with whatever is needed. This allows the subtest to more "contained" in a +// single file and avoids having to create new dummy files for each subtest. +async function loaded() { + window.dispatchEvent(new Event("FissionTestHelper:Init")); + // Wait a couple of animation frames before sending the load, to ensure that + // this OOPIF's layer tree has been sent to the compositor. We use this + // instead of things like promiseOnlyApzControllerFlushed and/or promiseAllPaintsDone because + // this page is running without SpecialPowers and I couldn't figure out a good + // way to get a hold of a things like Services.obs or DOMWindowUtils easily. + await promiseFrame(); + await promiseFrame(); + FissionTestHelper.fireEventInEmbedder("OOPIF:Load", {content: window.location.href}); +} + </script> + <body onload="loaded()"> + </body> +</html> |