accessible/tests/mochitest/value/test_progress.xul

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 <?xml version="1.0"?>
michael@0 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
michael@0 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
michael@0 4 type="text/css"?>
michael@0 5
michael@0 6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 7 title="XUL progressmeter tests">
michael@0 8
michael@0 9 <script type="application/javascript"
michael@0 10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
michael@0 11
michael@0 12 <script type="application/javascript"
michael@0 13 src="../common.js" />
michael@0 14 <script type="application/javascript"
michael@0 15 src="../value.js" />
michael@0 16
michael@0 17 <script type="application/javascript">
michael@0 18 <![CDATA[
michael@0 19 function doTest()
michael@0 20 {
michael@0 21 // progressmeter
michael@0 22 testValue("pm1", "50%", 50, 0, 100, 0);
michael@0 23 testValue("pm2", "50%", 500, 0, 1000, 0);
michael@0 24 testValue("pm3", "", 0, 0, 100, 0);
michael@0 25
michael@0 26 // scale
michael@0 27 testValue("sc1", "500", 500, 0, 1000, 10);
michael@0 28 testValue("sc2", "", 0, 0, 0, 0);
michael@0 29
michael@0 30 // aria progressbar
michael@0 31 testValue("ariapb1", "500", 500, 0, 1000, 0);
michael@0 32 testValue("ariapb2", "", 0, 0, 0, 0);
michael@0 33
michael@0 34 SimpleTest.finish();
michael@0 35 }
michael@0 36
michael@0 37 SimpleTest.waitForExplicitFinish();
michael@0 38 addA11yLoadEvent(doTest);
michael@0 39 ]]>
michael@0 40 </script>
michael@0 41
michael@0 42 <hbox flex="1" style="overflow: auto;">
michael@0 43 <body xmlns="http://www.w3.org/1999/xhtml">
michael@0 44 <a target="_blank"
michael@0 45 href="https://bugzilla.mozilla.org/show_bug.cgi?id=489551"
michael@0 46 title="Values of sliders and progress bars in HTML 5 audio and video element's control sets are not percentages">
michael@0 47 Mozilla Bug 489551
michael@0 48 </a><br/>
michael@0 49 <p id="display"></p>
michael@0 50 <div id="content" style="display: none">
michael@0 51 </div>
michael@0 52 <pre id="test">
michael@0 53 </pre>
michael@0 54 </body>
michael@0 55
michael@0 56 <!-- progressmeter -->
michael@0 57 <progressmeter id="pm1" value="50"/>
michael@0 58 <progressmeter id="pm2" value="500" max="1000"/>
michael@0 59 <progressmeter id="pm3"/>
michael@0 60
michael@0 61 <!-- scale -->
michael@0 62 <scale id="sc1" value="500" max="1000" increment="10"/>
michael@0 63 <scale id="sc2"/>
michael@0 64
michael@0 65 <!-- aria -->
michael@0 66 <description id="ariapb1" role="progressbar"
michael@0 67 aria-valuenow="500" aria-valuemin="0" aria-valuemax="1000"/>
michael@0 68 <description id="ariapb2" role="progressbar"/>
michael@0 69 </hbox>
michael@0 70
michael@0 71 </window>
michael@0 72

mercurial