|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=760131 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 760131</title> |
|
9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> |
|
11 </head> |
|
12 <body> |
|
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=760131">Mozilla Bug 760131</a> |
|
14 <p id="display"></p> |
|
15 <div id="content" style="display: none"> |
|
16 <iframe id="frame"></iframe> |
|
17 </div> |
|
18 <pre id="test"> |
|
19 <script type="application/javascript"> |
|
20 |
|
21 /** Test for Bug 760131 **/ |
|
22 |
|
23 var frame = document.getElementById("frame"); |
|
24 function runTest() |
|
25 { |
|
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); |
|
33 |
|
34 SimpleTest.finish(); |
|
35 } |
|
36 |
|
37 SimpleTest.waitForExplicitFinish(); |
|
38 frame.onload = runTest; |
|
39 frame.src = "http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_bug760131.html"; |
|
40 |
|
41 </script> |
|
42 </pre> |
|
43 </body> |
|
44 </html> |