content/xul/document/test/test_bug391002.xul

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <?xml version="1.0"?>
     2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
     4 <!--
     5 https://bugzilla.mozilla.org/show_bug.cgi?id=391002
     6 -->
     7 <window title="Mozilla Bug 391002"
     8   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
     9   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    11   <!-- test results are displayed in the html:body -->
    12   <body xmlns="http://www.w3.org/1999/xhtml">
    13   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=391002"
    14      target="_blank">Mozilla Bug 391002</a>
    15   </body>
    17   <button id="btn1" command="cmd1"/>
    19   <button id="btn2">
    20     <observes id="observes" element="cmd1" attribute="label"/>
    21   </button>
    23   <commandset>
    24     <command id="cmd1" label="cmd1"/>
    25     <command id="cmd2" label="cmd2"/>
    26   </commandset>
    28   <!-- test code goes here -->
    29   <script type="application/javascript"><![CDATA[
    31     /** Test for Bug 391002 **/
    33     $("btn1").setAttribute("command", "cmd2");
    34     is($("btn1").getAttribute("label"), $("cmd2").getAttribute("label"))
    36     $("observes").setAttribute("element", "cmd2");
    37     is($("btn2").getAttribute("label"), $("cmd2").getAttribute("label"))
    39   ]]></script>
    40 </window>

mercurial