accessible/tests/mochitest/events/test_docload_aria.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <html>
     3 <head>
     4   <title>Accessible events testing for ARIA document</title>
     6   <link rel="stylesheet" type="text/css"
     7         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     9   <script type="application/javascript"
    10           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    12   <script type="application/javascript"
    13           src="../common.js"></script>
    14   <script type="application/javascript"
    15           src="../role.js"></script>
    16   <script type="application/javascript"
    17           src="../states.js"></script>
    18   <script type="application/javascript"
    19           src="../events.js"></script>
    21   <script type="application/javascript">
    22     ////////////////////////////////////////////////////////////////////////////
    23     // Invokers
    25     function showARIADialog(aID)
    26     {
    27       this.dialogNode = getNode(aID);
    29       this.eventSeq = [
    30         new invokerChecker(EVENT_DOCUMENT_LOAD_COMPLETE, this.dialogNode)
    31       ];
    33       this.invoke = function showARIADialog_invoke()
    34       {
    35         this.dialogNode.style.display = "block";
    36       }
    38       this.getID = function showARIADialog_getID()
    39       {
    40         return "show ARIA dialog";
    41       }
    42     }
    44     ////////////////////////////////////////////////////////////////////////////
    45     // Do tests
    47     var gQueue = null;
    49     // Debug stuff.
    50     //gA11yEventDumpToConsole = true;
    52     function doTests()
    53     {
    54       gQueue = new eventQueue();
    56       gQueue.push(new showARIADialog("dialog"));
    57       gQueue.push(new showARIADialog("document"));
    59       gQueue.invoke(); // Will call SimpleTest.finish();
    60     }
    62     SimpleTest.waitForExplicitFinish();
    63     addA11yLoadEvent(doTests);
    64   </script>
    65 </head>
    67 <body>
    69   <a target="_blank"
    70      href="https://bugzilla.mozilla.org/show_bug.cgi?id=759833"
    71      title="ARIA documents should fire document loading events">
    72     Mozilla Bug 759833
    73   </a>
    75   <p id="display"></p>
    76   <div id="content" style="display: none"></div>
    77   <pre id="test">
    78   </pre>
    80   <div role="dialog" id="dialog" style="display: none;">It's a dialog</div>
    81   <div role="document" id="document" style="display: none;">It's a document</div>
    82 </body>
    83 </html>

mercurial