4 https://bugzilla.mozilla.org/show_bug.cgi?id=760131
8 <title>Test for Bug
760131</title>
9 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=760131">Mozilla Bug
760131</a>
15 <div id=
"content" style=
"display: none">
16 <iframe id=
"frame"></iframe>
19 <script type=
"application/javascript">
21 /** Test for Bug
760131 **/
23 var frame = document.getElementById(
"frame");
26 var win = frame.contentWindow;
27 win.wrappedJSObject.ok = ok;
28 var doc = win.document;
29 var empty = doc.createTouchList();
30 var event = doc.createEvent(
"touchevent");
31 event.initTouchEvent(
"touchstart", true, true, win,
0, false, false, false, false, empty, empty, empty);
32 doc.getElementById(
"target").dispatchEvent(event);
37 SimpleTest.waitForExplicitFinish();
38 SpecialPowers.pushPrefEnv(
39 {
"set": [[
"dom.w3c_touch_events.legacy_apis.enabled", true]]},
41 frame.onload = runTest;
42 frame.src =
"http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_bug760131.html";