summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/helper_bug1473108.html
blob: 118ac3fc54cb71c9360d02def9c11ce46f30e5e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1473108
-->
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width; initial-scale=1.0">
  <title>Test for Bug 1473108</title>
  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
  <script type="application/javascript" src="apz_test_utils.js"></script>
  <script src="/tests/SimpleTest/paint_listener.js"></script>
  <style>
  .a {
    background: green;
    height: 64px;
    width: 32px;
    display: block;
  }
  span::before {
    content: "";
    background: red;
    height: 32px;
    width: 32px;
    display: block;
  }
  span:active::after {
    content: "";
  }
</style>
</head>

<body>
  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1473108">Mozilla Bug 1473108</a>
  <a class="a" id="event"><span id="target"></span></a>

  <script type="application/javascript">

  waitUntilApzStable().then(async () => {
    let target = document.getElementById("target");
    target.addEventListener("click", function(e) {
      is(e.target, target, `Clicked on at (${e.clientX}, ${e.clientY})`);
      subtestDone();
    });
    await synthesizeNativeTap(target, 5, 5);
  });

</script>
</body>
</html>