1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/actions/test_general.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,131 @@ 1.4 +<?xml version="1.0"?> 1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> 1.6 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" 1.7 + type="text/css"?> 1.8 +<?xml-stylesheet href="../nsIAccessible_name.css" 1.9 + type="text/css"?> 1.10 + 1.11 + 1.12 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.13 + title="nsIAccessible actions testing"> 1.14 + 1.15 + <script type="application/javascript" 1.16 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> 1.17 + 1.18 + <script type="application/javascript" 1.19 + src="../common.js" /> 1.20 + <script type="application/javascript" 1.21 + src="../events.js" /> 1.22 + <script type="application/javascript" 1.23 + src="../actions.js" /> 1.24 + 1.25 + <script type="application/javascript"> 1.26 + <![CDATA[ 1.27 + if (navigator.platform.startsWith("Mac")) { 1.28 + SimpleTest.expectAssertions(0, 1); 1.29 + } else { 1.30 + SimpleTest.expectAssertions(1); 1.31 + } 1.32 + 1.33 + function doTest() 1.34 + { 1.35 + var actionsArray = [ 1.36 + { 1.37 + ID: "menu", 1.38 + actionName: "click", 1.39 + events: CLICK_EVENTS, 1.40 + // Wait for focus event, it guarantees us the submenu tree is created, 1.41 + // that's necessary for next test. 1.42 + eventSeq: [ 1.43 + new invokerChecker(EVENT_FOCUS, getNode("menu")) 1.44 + ] 1.45 + }, 1.46 + { 1.47 + ID: "submenu", 1.48 + actionName: "click", 1.49 + events: CLICK_EVENTS 1.50 + }, 1.51 + { 1.52 + ID: "menuitem", 1.53 + actionName: "click", 1.54 + events: XUL_EVENTS 1.55 + }, 1.56 + { 1.57 + ID: "button", 1.58 + actionName: "press", 1.59 + events: XUL_EVENTS 1.60 + }, 1.61 + { 1.62 + ID: "buttonmenu", 1.63 + actionName: "press", 1.64 + events: CLICK_EVENTS 1.65 + }, 1.66 + { 1.67 + ID: "labelWithPopup", 1.68 + actionName: "click", 1.69 + events: CLICK_EVENTS 1.70 + }/*, // XXX: bug 490288 1.71 + { 1.72 + ID: "buttonmenu_item", 1.73 + actionName: "click", 1.74 + events: CLICK_EVENTS 1.75 + }*/ 1.76 + ]; 1.77 + 1.78 + testActions(actionsArray); 1.79 + } 1.80 + 1.81 + SimpleTest.waitForExplicitFinish(); 1.82 + addA11yLoadEvent(doTest); 1.83 + ]]> 1.84 + </script> 1.85 + 1.86 + <hbox flex="1" style="overflow: auto;"> 1.87 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.88 + <a target="_blank" 1.89 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=410765" 1.90 + title="nsIAccessible actions testing"> 1.91 + Mozilla Bug 410765 1.92 + </a> 1.93 + <a target="_blank" 1.94 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=504252" 1.95 + title="Expose STATE_HASPOPUP on XUL elements that have an @popup attribute"> 1.96 + Mozilla Bug 504252 1.97 + </a><br/> 1.98 + <p id="display"></p> 1.99 + <div id="content" style="display: none"> 1.100 + </div> 1.101 + <pre id="test"> 1.102 + </pre> 1.103 + </body> 1.104 + 1.105 + <vbox flex="1"> 1.106 + <menubar> 1.107 + <menu label="menu" id="menu"> 1.108 + <menupopup> 1.109 + <menuitem label="menu item" id="menuitem"/> 1.110 + <menu label="submenu" id="submenu"> 1.111 + <menupopup> 1.112 + <menuitem label="menu item"/> 1.113 + </menupopup> 1.114 + </menu> 1.115 + </menupopup> 1.116 + </menu> 1.117 + </menubar> 1.118 + 1.119 + <button label="button" id="button"/> 1.120 + 1.121 + <button type="menu" id="buttonmenu" label="button"> 1.122 + <menupopup> 1.123 + <menuitem label="item1" id="buttonmenu_item"/> 1.124 + <menuitem label="item1"/> 1.125 + </menupopup> 1.126 + </button> 1.127 + 1.128 + <label id="labelWithPopup" value="file name" 1.129 + popup="fileContext" 1.130 + tabindex="0"/> 1.131 + </vbox> 1.132 + </hbox> 1.133 +</window> 1.134 +