Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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" />
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>
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>
22 <script type="application/javascript">
23 //gA11yEventDumpToConsole = true; // debugging stuff
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
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
39 this.invoke = function loadFile_invoke()
40 {
41 synthesizeMouse(getNode("link"), 1, 1, {});
42 }
44 this.getID = function loadFile_getID()
45 {
46 return "load file: state busy change events on document";
47 }
48 }
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 }
61 SimpleTest.waitForExplicitFinish();
62 addA11yLoadEvent(doTest);
63 </script>
64 </head>
66 <body>
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>
72 <p id="display"></p>
73 <div id="content" style="display: none"></div>
74 <pre id="test">
75 </pre>
77 <a id="link" href="http://example.com/a11y/accessible/tests/mochitest/dumbfile.xpi">a file</a>
78 </body>
79 </html>