test_bug1017086_enable.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=1017086
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 1017086</title>
  9. <meta name="author" content="Maksim Lebedev" />
  10. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  11. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  12. <script type="text/javascript">
  13. /** Test for Bug 1017086 **/
  14. var pointer_events_enabled = true;
  15. function prepareTest() {
  16. SimpleTest.waitForExplicitFinish();
  17. turnOnOffPointerEvents(startTest);
  18. }
  19. function turnOnOffPointerEvents(callback) {
  20. SpecialPowers.pushPrefEnv({
  21. "set": [
  22. ["dom.w3c_pointer_events.enabled", pointer_events_enabled]
  23. ]
  24. }, callback);
  25. }
  26. function startTest() {
  27. var iframe = document.getElementById("testFrame");
  28. iframe.src = "bug1017086_inner.html";
  29. }
  30. function part_of_checks(pointer_events, check, window, document, testelem) {
  31. for(item in pointer_events) { check(true, pointer_events[item], window, "window"); }
  32. /** TODO
  33. for(item in pointer_events) { check(false, pointer_events[item], document, "document"); }
  34. **/
  35. for(item in pointer_events) { check(true, pointer_events[item], testelem, "element"); }
  36. SimpleTest.finish();
  37. }
  38. </script>
  39. </head>
  40. <body onload="prepareTest()">
  41. <iframe id="testFrame" height="700" width="700"></iframe>
  42. </body>
  43. </html>