test_pointerevent_change-touch-action-onpointerdown_touch-manual.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 1000870</title>
  9. <meta name="author" content="Maksim Lebedev" />
  10. <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  11. <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  12. <script type="text/javascript" src="mochitest_support_external.js"></script>
  13. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  14. <script type="text/javascript">
  15. SimpleTest.waitForExplicitFinish();
  16. function startTest() {
  17. runTestInNewWindow("pointerevent_change-touch-action-onpointerdown_touch-manual.html");
  18. }
  19. function executeTest(int_win) {
  20. const WM_VSCROLL = 0x0115;
  21. sendTouchEvent(int_win, "target0", "touchstart");
  22. sendTouchEvent(int_win, "target0", "touchmove");
  23. sendTouchEvent(int_win, "target0", "touchend");
  24. // NOTE: This testcase is about that modifying touch-action during a
  25. // pointerdown callback "should not" affect the gesture detection of the
  26. // touch session started by the pointerdown. That is, a scroll should
  27. // still fired by gesture detection, instead of launching by our own.
  28. var utils = _getDOMWindowUtils(int_win);
  29. var target0 = int_win.document.getElementById("target0");
  30. utils.sendNativeMouseScrollEvent(target0.getBoundingClientRect().left + 5,
  31. target0.getBoundingClientRect().top + 5,
  32. WM_VSCROLL, 10, 10, 0, 0, 0, target0);
  33. }
  34. </script>
  35. </head>
  36. <body>
  37. </body>
  38. </html>