accessible/tests/mochitest/value/test_progress.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/value/test_progress.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,72 @@
     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 +
     1.9 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.10 +        title="XUL progressmeter tests">
    1.11 +
    1.12 +  <script type="application/javascript"
    1.13 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
    1.14 +
    1.15 +  <script type="application/javascript"
    1.16 +          src="../common.js" />
    1.17 +  <script type="application/javascript"
    1.18 +          src="../value.js" />
    1.19 +
    1.20 +  <script type="application/javascript">
    1.21 +  <![CDATA[
    1.22 +    function doTest()
    1.23 +    {
    1.24 +      // progressmeter
    1.25 +      testValue("pm1", "50%", 50, 0, 100, 0);
    1.26 +      testValue("pm2", "50%", 500, 0, 1000, 0);
    1.27 +      testValue("pm3", "", 0, 0, 100, 0);
    1.28 +
    1.29 +      // scale
    1.30 +      testValue("sc1", "500", 500, 0, 1000, 10);
    1.31 +      testValue("sc2", "", 0, 0, 0, 0);
    1.32 +
    1.33 +      // aria progressbar
    1.34 +      testValue("ariapb1", "500", 500, 0, 1000, 0);
    1.35 +      testValue("ariapb2", "", 0, 0, 0, 0);
    1.36 +
    1.37 +      SimpleTest.finish();
    1.38 +    }
    1.39 +
    1.40 +    SimpleTest.waitForExplicitFinish();
    1.41 +    addA11yLoadEvent(doTest);
    1.42 +  ]]>
    1.43 +  </script>
    1.44 +
    1.45 +  <hbox flex="1" style="overflow: auto;">
    1.46 +    <body xmlns="http://www.w3.org/1999/xhtml">
    1.47 +      <a target="_blank"
    1.48 +         href="https://bugzilla.mozilla.org/show_bug.cgi?id=489551"
    1.49 +         title="Values of sliders and progress bars in HTML 5 audio and video element's control sets are not percentages">
    1.50 +        Mozilla Bug 489551
    1.51 +      </a><br/>
    1.52 +      <p id="display"></p>
    1.53 +      <div id="content" style="display: none">
    1.54 +      </div>
    1.55 +      <pre id="test">
    1.56 +      </pre>
    1.57 +    </body>
    1.58 +
    1.59 +    <!-- progressmeter -->
    1.60 +    <progressmeter id="pm1" value="50"/>
    1.61 +    <progressmeter id="pm2" value="500" max="1000"/>
    1.62 +    <progressmeter id="pm3"/>
    1.63 +
    1.64 +    <!-- scale -->
    1.65 +    <scale id="sc1" value="500" max="1000" increment="10"/>
    1.66 +    <scale id="sc2"/>
    1.67 +
    1.68 +    <!-- aria -->
    1.69 +    <description id="ariapb1" role="progressbar"
    1.70 +                 aria-valuenow="500" aria-valuemin="0" aria-valuemax="1000"/>
    1.71 +    <description id="ariapb2" role="progressbar"/>
    1.72 +  </hbox>
    1.73 +
    1.74 +</window>
    1.75 +

mercurial