1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/events/test_descrchange.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,85 @@ 1.4 +<html> 1.5 + 1.6 +<head> 1.7 + <title>Accessible description change event testing</title> 1.8 + 1.9 + <link rel="stylesheet" type="text/css" 1.10 + href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 1.11 + 1.12 + <script type="application/javascript" 1.13 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.14 + <script type="application/javascript" 1.15 + src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> 1.16 + 1.17 + <script type="application/javascript" 1.18 + src="../common.js"></script> 1.19 + <script type="application/javascript" 1.20 + src="../events.js"></script> 1.21 + <script type="application/javascript" 1.22 + src="../role.js"></script> 1.23 + <script type="application/javascript" 1.24 + src="../states.js"></script> 1.25 + 1.26 + <script type="application/javascript"> 1.27 + //////////////////////////////////////////////////////////////////////////// 1.28 + // Invokers 1.29 + 1.30 + function setAttr(aID, aAttr, aValue, aChecker) 1.31 + { 1.32 + this.eventSeq = [ aChecker ]; 1.33 + this.invoke = function setAttr_invoke() 1.34 + { 1.35 + getNode(aID).setAttribute(aAttr, aValue); 1.36 + } 1.37 + 1.38 + this.getID = function setAttr_getID() 1.39 + { 1.40 + return "set attr '" + aAttr + "', value '" + aValue + "'"; 1.41 + } 1.42 + } 1.43 + 1.44 + //////////////////////////////////////////////////////////////////////////// 1.45 + // Do tests 1.46 + 1.47 + //gA11yEventDumpToConsole = true; // debuggin 1.48 + 1.49 + var gQueue = null; 1.50 + function doTests() 1.51 + { 1.52 + gQueue = new eventQueue(); 1.53 + 1.54 + gQueue.push(new setAttr("tst1", "aria-describedby", "display", 1.55 + new invokerChecker(EVENT_DESCRIPTION_CHANGE, "tst1"))); 1.56 + gQueue.push(new setAttr("tst1", "title", "title", 1.57 + new unexpectedInvokerChecker(EVENT_DESCRIPTION_CHANGE, "tst1"))); 1.58 + 1.59 + gQueue.push(new setAttr("tst2", "title", "title", 1.60 + new invokerChecker(EVENT_NAME_CHANGE, "tst2"))); 1.61 + 1.62 + gQueue.invoke(); // Will call SimpleTest.finish(); 1.63 + } 1.64 + 1.65 + SimpleTest.waitForExplicitFinish(); 1.66 + addA11yLoadEvent(doTests); 1.67 + </script> 1.68 +</head> 1.69 + 1.70 +<body> 1.71 + 1.72 + <a target="_blank" 1.73 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=991969" 1.74 + title="Event not fired when description changes"> 1.75 + Bug 991969 1.76 + </a> 1.77 + 1.78 + <p id="display"></p> 1.79 + <div id="content" style="display: none"></div> 1.80 + <pre id="test"> 1.81 + </pre> 1.82 + 1.83 + <button id="tst1">btn1</button> 1.84 + <button id="tst2">btn2</button> 1.85 + 1.86 + <div id="eventdump"></div> 1.87 +</body> 1.88 +</html>