accessible/tests/mochitest/value/test_progress.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/value/test_progress.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,61 @@
     1.4 +<html>
     1.5 +
     1.6 +<head>
     1.7 +  <title>nsIAccessible value testing for progress element</title>
     1.8 +
     1.9 +  <link rel="stylesheet" type="text/css"
    1.10 +        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.11 +
    1.12 +  <script type="application/javascript"
    1.13 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.14 +
    1.15 +  <script type="application/javascript"
    1.16 +          src="../common.js"></script>
    1.17 +  <script type="application/javascript"
    1.18 +          src="../value.js"></script>
    1.19 +
    1.20 +  <script type="application/javascript"
    1.21 +          src="chrome://mochikit/content/chrome-harness.js"></script>
    1.22 +
    1.23 +  <script type="application/javascript">
    1.24 +    function doTest()
    1.25 +    {
    1.26 +      // HTML5 progress element tests
    1.27 +      testValue("pr_indeterminate", "", 0, 0, 1, 0);
    1.28 +      testValue("pr_zero", "0%", 0, 0, 1, 0);
    1.29 +      testValue("pr_zeropointfive", "50%", 0.5, 0, 1, 0);
    1.30 +      testValue("pr_one", "100%", 1, 0, 1, 0);
    1.31 +      testValue("pr_42", "100%", 42, 0, 1, 0);
    1.32 +      testValue("pr_21", "50%", 21, 0, 42, 0);
    1.33 +
    1.34 +      SimpleTest.finish();
    1.35 +    }
    1.36 +
    1.37 +    SimpleTest.waitForExplicitFinish();
    1.38 +    addA11yLoadEvent(doTest);
    1.39 +  </script>
    1.40 +
    1.41 +</head>
    1.42 +
    1.43 +<body>
    1.44 +
    1.45 +  <a target="_blank"
    1.46 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=559773"
    1.47 +     title="make HTML5 progress element accessible">
    1.48 +    Mozilla Bug 559773
    1.49 +  </a><br />
    1.50 +  <p id="display"></p>
    1.51 +  <div id="content" style="display: none">
    1.52 +  </div>
    1.53 +  <pre id="test">
    1.54 +  </pre>
    1.55 +
    1.56 +  <!-- HTML5 progress element -->
    1.57 +  <progress id="pr_indeterminate">this will be read by legacy browsers</progress>
    1.58 +  <progress id="pr_zero" value="0">this will be read by legacy browsers</progress>
    1.59 +  <progress id="pr_zeropointfive" value="0.5">this will be read by legacy browsers</progress>
    1.60 +  <progress id="pr_one" value="1">this will be read by legacy browsers</progress>
    1.61 +  <progress id="pr_42" value="42">this will be read by legacy browsers</progress>
    1.62 +  <progress id="pr_21" value="21" max="42">this will be read by legacy browsers</progress>
    1.63 +</body>
    1.64 +</html>

mercurial