1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/states/test_doc_busy.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,79 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 + <title>states of document</title> 1.8 + <link rel="stylesheet" type="text/css" 1.9 + href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 1.10 + 1.11 + <script type="application/javascript" 1.12 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <script type="application/javascript" 1.14 + src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> 1.15 + 1.16 + <script type="application/javascript" 1.17 + src="../common.js"></script> 1.18 + <script type="application/javascript" 1.19 + src="../role.js"></script> 1.20 + <script type="application/javascript" 1.21 + src="../states.js"></script> 1.22 + <script type="application/javascript" 1.23 + src="../events.js"></script> 1.24 + 1.25 + <script type="application/javascript"> 1.26 + //gA11yEventDumpToConsole = true; // debugging stuff 1.27 + 1.28 + function loadFile() 1.29 + { 1.30 + var eventSeq = [ 1.31 + new stateChangeChecker(STATE_BUSY, false, true, document, null, false, true), 1.32 + new stateChangeChecker(STATE_BUSY, false, false, document) 1.33 + ]; 1.34 + defineScenario(this, eventSeq); // both events were fired 1.35 + 1.36 + var unexpectedEventSeq = [ 1.37 + new stateChangeChecker(STATE_BUSY, false, true, document), 1.38 + new stateChangeChecker(STATE_BUSY, false, false, document) 1.39 + ]; 1.40 + defineScenario(this, [], unexpectedEventSeq); // events were coalesced 1.41 + 1.42 + this.invoke = function loadFile_invoke() 1.43 + { 1.44 + synthesizeMouse(getNode("link"), 1, 1, {}); 1.45 + } 1.46 + 1.47 + this.getID = function loadFile_getID() 1.48 + { 1.49 + return "load file: state busy change events on document"; 1.50 + } 1.51 + } 1.52 + 1.53 + var gQueue = null; 1.54 + function doTest() 1.55 + { 1.56 + // State busy change event on file loading. 1.57 + //enableLogging("docload"); // debugging 1.58 + gQueue = new eventQueue(); 1.59 + gQueue.push(new loadFile()); 1.60 + //gQueue.onFinish = function() { disableLogging(); } // debugging 1.61 + gQueue.invoke(); // Will call SimpleTest.finish(); 1.62 + } 1.63 + 1.64 + SimpleTest.waitForExplicitFinish(); 1.65 + addA11yLoadEvent(doTest); 1.66 + </script> 1.67 +</head> 1.68 + 1.69 +<body> 1.70 + 1.71 + <a target="_blank" 1.72 + title="Missing busy state change event when downloading files" 1.73 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=446469">Bug 446469</a> 1.74 + 1.75 + <p id="display"></p> 1.76 + <div id="content" style="display: none"></div> 1.77 + <pre id="test"> 1.78 + </pre> 1.79 + 1.80 + <a id="link" href="http://example.com/a11y/accessible/tests/mochitest/dumbfile.xpi">a file</a> 1.81 +</body> 1.82 +</html>