test_bug1017086_disable.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 = false;
  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(false, pointer_events[item], window, "window"); }
  32. for(item in pointer_events) { check(false, pointer_events[item], document, "document"); }
  33. for(item in pointer_events) { check(false, pointer_events[item], testelem, "element"); }
  34. SimpleTest.finish();
  35. }
  36. </script>
  37. </head>
  38. <body onload="prepareTest()">
  39. <iframe id="testFrame" height="700" width="700"></iframe>
  40. </body>
  41. </html>