tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug1189277.html (2339B)


      1 <html>
      2 
      3 <head>
      4  <title>Test hide/show events for HTMLListBulletAccessibles on list restyle</title>
      5  <link rel="stylesheet" type="text/css"
      6        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
      7 
      8  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
      9 
     10  <script type="application/javascript"
     11          src="../common.js"></script>
     12  <script type="application/javascript"
     13          src="../name.js"></script>
     14  <script type="application/javascript"
     15          src="../events.js"></script>
     16 
     17  <script type="application/javascript">
     18    function runTest() {
     19      this.containerNode = getNode("outerDiv");
     20 
     21      this.eventSeq = [
     22        new invokerChecker(EVENT_HIDE, getNode("child")),
     23        new invokerChecker(EVENT_HIDE, getNode("childDoc")),
     24        new invokerChecker(EVENT_SHOW, "newChildDoc"),
     25        new invokerChecker(EVENT_REORDER, this.containerNode),
     26      ];
     27 
     28      this.invoke = function runTest_invoke() {
     29        this.containerNode.removeChild(getNode("child"));
     30 
     31        var docContainer = getNode("docContainer");
     32        var iframe = document.createElement("iframe");
     33        // eslint-disable-next-line @microsoft/sdl/no-insecure-url
     34        iframe.setAttribute("src", "http://example.com");
     35        iframe.setAttribute("id", "newChildDoc");
     36 
     37        docContainer.removeChild(getNode("childDoc"));
     38        docContainer.appendChild(iframe);
     39      };
     40 
     41      this.getID = function runTest_getID() {
     42        return "check show events are not incorrectly coalesced";
     43      };
     44    }
     45 
     46    // enableLogging("tree");
     47    gA11yEventDumpToConsole = true;
     48    var gQueue = null;
     49    function doTest() {
     50      gQueue = new eventQueue();
     51      gQueue.push(new runTest());
     52      gQueue.invoke(); // SimpleTest.finish();
     53    }
     54 
     55    SimpleTest.waitForExplicitFinish();
     56    addA11yLoadEvent(doTest);
     57  </script>
     58 
     59 </head>
     60 
     61 <body>
     62 
     63  <a target="_blank"
     64     href="https://bugzilla.mozilla.org/show_bug.cgi?id=1189277"
     65     title="content process crash caused by missing show event">
     66    Mozilla Bug 1189277
     67  </a>
     68  <p id="display"></p>
     69  <div id="content" style="display: none"></div>
     70  <pre id="test">
     71  </pre>
     72 
     73  <div id="outerDiv">
     74    <div id="child">foo</div>
     75    <div id="docContainer">
     76      <iframe id="childDoc" src="about:blank">
     77      </iframe>
     78    </div>
     79  </div>
     80 
     81 </body>
     82 </html>