summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/helper_fission_empty.html
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_fission_empty.html')
-rw-r--r--gfx/layers/apz/test/mochitest/helper_fission_empty.html34
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>