|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 |
|
4 <head> |
|
5 <title>Canvas subdom mutation</title> |
|
6 |
|
7 <link rel="stylesheet" type="text/css" |
|
8 href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
|
9 |
|
10 <script type="application/javascript" |
|
11 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
12 |
|
13 <script type="application/javascript" |
|
14 src="../common.js"></script> |
|
15 <script type="application/javascript" |
|
16 src="../role.js"></script> |
|
17 <script type="application/javascript" |
|
18 src="../events.js"></script> |
|
19 |
|
20 <script type="application/javascript"> |
|
21 |
|
22 //////////////////////////////////////////////////////////////////////////// |
|
23 // Invokers |
|
24 |
|
25 function addSubtree(aID) |
|
26 { |
|
27 this.node = getNode(aID); |
|
28 |
|
29 this.eventSeq = [ |
|
30 new invokerChecker(EVENT_SHOW, this.node) |
|
31 ]; |
|
32 |
|
33 this.invoke = function addSubtree_invoke() |
|
34 { |
|
35 // ensure we start with no subtree |
|
36 testAccessibleTree("canvas", { CANVAS: [] }); |
|
37 getNode("dialog").style.display = "block"; |
|
38 } |
|
39 |
|
40 this.finalCheck = function addSubtree_finalCheck() { |
|
41 testAccessibleTree("dialog", { DIALOG: [] }); |
|
42 } |
|
43 |
|
44 this.getID = function addSubtree_getID() |
|
45 { |
|
46 return "show canvas subdom"; |
|
47 } |
|
48 } |
|
49 |
|
50 //////////////////////////////////////////////////////////////////////////// |
|
51 // Test |
|
52 |
|
53 //gA11yEventDumpID = "eventdump"; // debug stuff |
|
54 //gA11yEventDumpToConsole = true; |
|
55 |
|
56 var gQueue = null; |
|
57 |
|
58 function doTest() |
|
59 { |
|
60 gQueue = new eventQueue(); |
|
61 |
|
62 // make the subdom come alive! |
|
63 gQueue.push(new addSubtree("dialog")); |
|
64 |
|
65 gQueue.invoke(); // SimpleTest.finish() will be called in the end |
|
66 } |
|
67 |
|
68 SimpleTest.waitForExplicitFinish(); |
|
69 addA11yLoadEvent(doTest); |
|
70 </script> |
|
71 </head> |
|
72 <body> |
|
73 |
|
74 <a target="_blank" |
|
75 title="Expose content in Canvas element" |
|
76 href="https://bugzilla.mozilla.org/show_bug.cgi?id=495912"> |
|
77 Mozilla Bug 495912 |
|
78 </a> |
|
79 |
|
80 <p id="display"></p> |
|
81 <div id="content" style="display: none"></div> |
|
82 <pre id="test"> |
|
83 </pre> |
|
84 |
|
85 <canvas id="canvas"> |
|
86 <div id="dialog" role="dialog" style="display: none;"> |
|
87 </div> |
|
88 </canvas> |
|
89 |
|
90 <div id="eventdump"></div> |
|
91 </body> |
|
92 </html> |