accessible/tests/mochitest/events/test_docload_aria.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/events/test_docload_aria.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,83 @@
     1.4 +<html>
     1.5 +
     1.6 +<head>
     1.7 +  <title>Accessible events testing for ARIA document</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="../role.js"></script>
    1.19 +  <script type="application/javascript"
    1.20 +          src="../states.js"></script>
    1.21 +  <script type="application/javascript"
    1.22 +          src="../events.js"></script>
    1.23 +
    1.24 +  <script type="application/javascript">
    1.25 +    ////////////////////////////////////////////////////////////////////////////
    1.26 +    // Invokers
    1.27 +
    1.28 +    function showARIADialog(aID)
    1.29 +    {
    1.30 +      this.dialogNode = getNode(aID);
    1.31 +
    1.32 +      this.eventSeq = [
    1.33 +        new invokerChecker(EVENT_DOCUMENT_LOAD_COMPLETE, this.dialogNode)
    1.34 +      ];
    1.35 +
    1.36 +      this.invoke = function showARIADialog_invoke()
    1.37 +      {
    1.38 +        this.dialogNode.style.display = "block";
    1.39 +      }
    1.40 +
    1.41 +      this.getID = function showARIADialog_getID()
    1.42 +      {
    1.43 +        return "show ARIA dialog";
    1.44 +      }
    1.45 +    }
    1.46 +
    1.47 +    ////////////////////////////////////////////////////////////////////////////
    1.48 +    // Do tests
    1.49 +
    1.50 +    var gQueue = null;
    1.51 +
    1.52 +    // Debug stuff.
    1.53 +    //gA11yEventDumpToConsole = true;
    1.54 +
    1.55 +    function doTests()
    1.56 +    {
    1.57 +      gQueue = new eventQueue();
    1.58 +
    1.59 +      gQueue.push(new showARIADialog("dialog"));
    1.60 +      gQueue.push(new showARIADialog("document"));
    1.61 +
    1.62 +      gQueue.invoke(); // Will call SimpleTest.finish();
    1.63 +    }
    1.64 +
    1.65 +    SimpleTest.waitForExplicitFinish();
    1.66 +    addA11yLoadEvent(doTests);
    1.67 +  </script>
    1.68 +</head>
    1.69 +
    1.70 +<body>
    1.71 +
    1.72 +  <a target="_blank"
    1.73 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=759833"
    1.74 +     title="ARIA documents should fire document loading events">
    1.75 +    Mozilla Bug 759833
    1.76 +  </a>
    1.77 +
    1.78 +  <p id="display"></p>
    1.79 +  <div id="content" style="display: none"></div>
    1.80 +  <pre id="test">
    1.81 +  </pre>
    1.82 +
    1.83 +  <div role="dialog" id="dialog" style="display: none;">It's a dialog</div>
    1.84 +  <div role="document" id="document" style="display: none;">It's a document</div>
    1.85 +</body>
    1.86 +</html>

mercurial