summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/test_group_hittest.html
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/apz/test/mochitest/test_group_hittest.html')
-rw-r--r--gfx/layers/apz/test/mochitest/test_group_hittest.html73
1 files changed, 73 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/test_group_hittest.html b/gfx/layers/apz/test/mochitest/test_group_hittest.html
new file mode 100644
index 0000000000..0a4c506119
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_hittest.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Various hit-testing tests that spawn in new windows</title>
+ <script src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="apz_test_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript">
+
+var prefs = [
+ // Turn off displayport expiry so that we don't miss failures where the
+ // displayport is set and then expires before we get around to doing the
+ // hit-test inside the activated scrollframe.
+ ["apz.displayport_expiry_ms", 0],
+ // Always layerize the scrollbar track, so as to get consistent results
+ // across platforms. Eventually we should probably get rid of this and make
+ // the tests more robust in terms of testing all the different cross-platform
+ // variations.
+ ["layout.scrollbars.always-layerize-track", true],
+ // We need this pref to allow the synthetic mouse events to propagate to APZ,
+ // and to allow the MozMouseHittest event in particular to be dispatched to
+ // APZ as a MouseInput so the hit result is recorded.
+ ["test.events.async.enabled", true],
+ // Turns on APZTestData logging which we use to obtain the hit test results.
+ ["apz.test.logging_enabled", true],
+];
+
+var subtests = [
+ {"file": "helper_hittest_basic.html", "prefs": prefs},
+ {"file": "helper_hittest_fixed_in_scrolled_transform.html", "prefs": prefs},
+ {"file": "helper_hittest_float_bug1434846.html", "prefs": prefs},
+ {"file": "helper_hittest_float_bug1443518.html", "prefs": prefs},
+ {"file": "helper_hittest_checkerboard.html", "prefs": prefs},
+ {"file": "helper_hittest_backface_hidden.html", "prefs": prefs},
+ {"file": "helper_hittest_touchaction.html", "prefs": prefs},
+ {"file": "helper_hittest_nested_transforms_bug1459696.html", "prefs": prefs},
+ {"file": "helper_hittest_sticky_bug1478304.html", "prefs": prefs},
+ {"file": "helper_hittest_clipped_fixed_modal.html", "prefs": prefs},
+ {"file": "helper_hittest_pointerevents_svg.html", "prefs": prefs},
+ {"file": "helper_hittest_clippath.html", "prefs": prefs},
+ {"file": "helper_hittest_hoisted_scrollinfo.html", "prefs": prefs},
+ {"file": "helper_hittest_spam.html", "prefs": prefs},
+ {"file": "helper_hittest_hidden_inactive_scrollframe.html", "prefs": prefs},
+];
+
+function addConditionalTests(tests) {
+ // Add some more tests only useful with WebRender. Note that we do this in
+ // function run after loading, because trying to read layerManagerType can
+ // throw an NS_ERROR_FAILURE if called too early.
+ var utils = SpecialPowers.getDOMWindowUtils(window);
+ var isWebRender = utils.layerManagerType == "WebRender";
+ if (isWebRender) {
+ tests = tests.concat([
+ {"file": "helper_hittest_deep_scene_stack.html", "prefs": prefs},
+ ]);
+ }
+ return tests;
+}
+
+if (isApzEnabled()) {
+ SimpleTest.waitForExplicitFinish();
+ window.onload = function() {
+ runSubtestsSeriallyInFreshWindows(addConditionalTests(subtests))
+ .then(SimpleTest.finish, SimpleTest.finishWithFailure);
+ };
+}
+
+ </script>
+</head>
+<body>
+</body>
+</html>