|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 <head> |
|
4 <title>states of document</title> |
|
5 <link rel="stylesheet" type="text/css" |
|
6 href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
|
7 |
|
8 <script type="application/javascript" |
|
9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <script type="application/javascript" |
|
11 src="chrome://mochikit/content/tests/SimpleTest/EventUtils.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="../states.js"></script> |
|
19 <script type="application/javascript" |
|
20 src="../events.js"></script> |
|
21 |
|
22 <script type="application/javascript"> |
|
23 //gA11yEventDumpToConsole = true; // debugging stuff |
|
24 |
|
25 function loadFile() |
|
26 { |
|
27 var eventSeq = [ |
|
28 new stateChangeChecker(STATE_BUSY, false, true, document, null, false, true), |
|
29 new stateChangeChecker(STATE_BUSY, false, false, document) |
|
30 ]; |
|
31 defineScenario(this, eventSeq); // both events were fired |
|
32 |
|
33 var unexpectedEventSeq = [ |
|
34 new stateChangeChecker(STATE_BUSY, false, true, document), |
|
35 new stateChangeChecker(STATE_BUSY, false, false, document) |
|
36 ]; |
|
37 defineScenario(this, [], unexpectedEventSeq); // events were coalesced |
|
38 |
|
39 this.invoke = function loadFile_invoke() |
|
40 { |
|
41 synthesizeMouse(getNode("link"), 1, 1, {}); |
|
42 } |
|
43 |
|
44 this.getID = function loadFile_getID() |
|
45 { |
|
46 return "load file: state busy change events on document"; |
|
47 } |
|
48 } |
|
49 |
|
50 var gQueue = null; |
|
51 function doTest() |
|
52 { |
|
53 // State busy change event on file loading. |
|
54 //enableLogging("docload"); // debugging |
|
55 gQueue = new eventQueue(); |
|
56 gQueue.push(new loadFile()); |
|
57 //gQueue.onFinish = function() { disableLogging(); } // debugging |
|
58 gQueue.invoke(); // Will call SimpleTest.finish(); |
|
59 } |
|
60 |
|
61 SimpleTest.waitForExplicitFinish(); |
|
62 addA11yLoadEvent(doTest); |
|
63 </script> |
|
64 </head> |
|
65 |
|
66 <body> |
|
67 |
|
68 <a target="_blank" |
|
69 title="Missing busy state change event when downloading files" |
|
70 href="https://bugzilla.mozilla.org/show_bug.cgi?id=446469">Bug 446469</a> |
|
71 |
|
72 <p id="display"></p> |
|
73 <div id="content" style="display: none"></div> |
|
74 <pre id="test"> |
|
75 </pre> |
|
76 |
|
77 <a id="link" href="http://example.com/a11y/accessible/tests/mochitest/dumbfile.xpi">a file</a> |
|
78 </body> |
|
79 </html> |