summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html')
-rw-r--r--gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html b/gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html
new file mode 100644
index 0000000000..2c83cb1a1f
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="user-scalable=no"/>
+ <title>Check that double tapping inside an oop iframe doesn't work if the top
+ level content document doesn't allow zooming</title>
+ <script src="apz_test_native_event_utils.js"></script>
+ <script src="apz_test_utils.js"></script>
+ <script src="/tests/SimpleTest/paint_listener.js"></script>
+ <script>
+
+async function test() {
+ let useTouchpad = (location.search == "?touchpad");
+
+ let resolution = await getResolution();
+ ok(resolution > 0,
+ "The initial_resolution is " + resolution + ", which is some sane value");
+
+ // Set up a Promise waiting for a TransformEnd which should never happen.
+ promiseTransformEnd().then(() => {
+ ok(false, "No TransformEnd should happen!");
+ });
+
+ // A double tap inside the OOP iframe.
+ await synthesizeDoubleTap(document.getElementById("target"), 20, 20, useTouchpad);
+
+ for (let i = 0; i < 10; i++) {
+ await promiseFrame();
+ }
+
+ // Flush state just in case.
+ await promiseApzFlushedRepaints();
+
+ let prev_resolution = resolution;
+ resolution = await getResolution();
+ is(resolution, prev_resolution, "No zoom should happen");
+}
+
+waitUntilApzStable()
+.then(test)
+.then(subtestDone, subtestFailed);
+
+ </script>
+<style>
+iframe {
+ margin: 0;
+ padding: 0;
+ border: 1px solid black;
+}
+</style>
+</head>
+<body>
+
+<iframe id="target" width="100" height="100" src="http://example.org/"></iframe>
+
+</body>
+</html>