Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=2100"/>
  <title>Check that double tapping inside an oop iframe works</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");
  // Check that double-tapping once zooms in
  await doubleTapOn(document.getElementById("target"), 20, 20, useTouchpad);
  let prev_resolution = resolution;
  resolution = await getResolution();
  ok(resolution > prev_resolution, "The first double-tap has increased the resolution to " + resolution);
  // Check that double-tapping again on the same spot zooms out
  await doubleTapOn(document.getElementById("target"), 20, 20, useTouchpad);
  prev_resolution = resolution;
  resolution = await getResolution();
  ok(resolution < prev_resolution, "The second double-tap has decreased the resolution to " + resolution);
}
waitUntilApzStable()
.then(test)
.then(subtestDone, subtestFailed);
  </script>
<style>
iframe {
  margin: 0;
  padding: 0;
  border: 1px solid black;
}
</style>
</head>
<body>
</body>
</html>