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