1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/xul/document/test/test_bug335375.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 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" type="text/css"?> 1.7 +<?xul-overlay href="overlay1_bug335375.xul"?> 1.8 +<?xul-overlay href="overlay2_bug335375.xul"?> 1.9 +<!-- 1.10 +https://bugzilla.mozilla.org/show_bug.cgi?id=335375 1.11 +--> 1.12 +<window title="Mozilla Bug 335375" 1.13 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.14 + onload="RunTest();"> 1.15 + 1.16 + <script type="application/javascript" 1.17 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 1.18 + 1.19 + <script type="application/javascript"> 1.20 + <![CDATA[ 1.21 + SimpleTest.waitForExplicitFinish(); 1.22 + 1.23 + function RunTest() 1.24 + { 1.25 + var cmd = document.getElementById("cmd_test"); 1.26 + var button = document.getElementById("button_test"); 1.27 + 1.28 + is(cmd.getAttribute("accesskey"), "C", 1.29 + "checking command has an accesskey"); 1.30 + is(button.getAttribute("accesskey"), cmd.getAttribute("accesskey"), 1.31 + "checking command and button have the same accesskey"); 1.32 + 1.33 + cmd.setAttribute("accesskey", "D"); 1.34 + is(button.getAttribute("accesskey"), "D", 1.35 + "checking button has inherited new accesskey from command"); 1.36 + 1.37 + SimpleTest.finish(); 1.38 + } 1.39 + ]]> 1.40 + </script> 1.41 + 1.42 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.43 + <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=335375" 1.44 + target="_blank">Mozilla Bug 335375</a> 1.45 + <p id="display"></p> 1.46 + <div id="content" style="display: none"></div> 1.47 + <pre id="test"></pre> 1.48 + </body> 1.49 + 1.50 + <commandset id="test_commandset"/> 1.51 + <toolbarbutton id="button_test"/> 1.52 + 1.53 +</window>