tor-browser

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

test_list_editabledoc.html (2603B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5  <title>Test HTML li and listitem bullet accessible insertion into editable document</title>
      6  <link rel="stylesheet" type="text/css"
      7        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
      8 
      9  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     10 
     11  <script type="application/javascript"
     12          src="../common.js"></script>
     13  <script type="application/javascript"
     14          src="../role.js"></script>
     15  <script type="application/javascript"
     16          src="../events.js"></script>
     17 
     18  <script type="application/javascript">
     19 
     20    // //////////////////////////////////////////////////////////////////////////
     21    // Invokers
     22 
     23    function addLi(aID) {
     24      this.listNode = getNode(aID);
     25      this.liNode = document.createElement("li");
     26      this.liNode.textContent = "item";
     27 
     28      this.eventSeq = [
     29        new invokerChecker(EVENT_SHOW, getAccessible, this.liNode),
     30        new invokerChecker(EVENT_REORDER, this.listNode),
     31      ];
     32 
     33      this.invoke = function addLi_invoke() {
     34        this.listNode.appendChild(this.liNode);
     35      };
     36 
     37      this.finalCheck = function addLi_finalCheck() {
     38        var tree = {
     39          role: ROLE_LIST,
     40          children: [
     41            {
     42              role: ROLE_LISTITEM,
     43              children: [
     44                {
     45                  role: ROLE_LISTITEM_MARKER,
     46                  name: "1. ",
     47                  children: [],
     48                },
     49                {
     50                  role: ROLE_TEXT_LEAF,
     51                  children: [],
     52                },
     53              ],
     54            },
     55          ],
     56        };
     57        testAccessibleTree(aID, tree);
     58      };
     59 
     60      this.getID = function addLi_getID() {
     61        return "add li";
     62      };
     63    }
     64 
     65    // //////////////////////////////////////////////////////////////////////////
     66    // Test
     67 
     68    // gA11yEventDumpID = "eventdump"; // debug stuff
     69 
     70    var gQueue = null;
     71 
     72    function doTest() {
     73      gQueue = new eventQueue();
     74 
     75      gQueue.push(new addLi("list"));
     76 
     77      gQueue.invoke(); // SimpleTest.finish() will be called in the end
     78    }
     79 
     80    SimpleTest.waitForExplicitFinish();
     81    addA11yLoadEvent(doTest);
     82  </script>
     83 </head>
     84 <body contentEditable="true">
     85 
     86  <a target="_blank"
     87     title="Wrong list bullet text of accessible for the first numbered HTML:li in CKEditor"
     88     href="https://bugzilla.mozilla.org/show_bug.cgi?id=557795">Mozilla Bug 557795</a>
     89 
     90  <p id="display"></p>
     91  <div id="content" style="display: none"></div>
     92  <pre id="test">
     93  </pre>
     94 
     95  <ol id="list">
     96  </ol>
     97 
     98  <div id="eventdump"></div>
     99 </body>
    100 </html>