1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/treeupdate/test_list_editabledoc.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,106 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + 1.7 +<head> 1.8 + <title>Test HTML li and listitem bullet accessible insertion into editable document</title> 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="../events.js"></script> 1.21 + 1.22 + <script type="application/javascript"> 1.23 + 1.24 + //////////////////////////////////////////////////////////////////////////// 1.25 + // Invokers 1.26 + 1.27 + function addLi(aID) 1.28 + { 1.29 + this.listNode = getNode(aID); 1.30 + this.liNode = document.createElement("li"); 1.31 + this.liNode.textContent = "item"; 1.32 + 1.33 + this.eventSeq = [ 1.34 + new invokerChecker(EVENT_SHOW, getAccessible, this.liNode), 1.35 + new invokerChecker(EVENT_REORDER, this.listNode) 1.36 + ]; 1.37 + 1.38 + this.invoke = function addLi_invoke() 1.39 + { 1.40 + this.listNode.appendChild(this.liNode); 1.41 + } 1.42 + 1.43 + this.finalCheck = function addLi_finalCheck() 1.44 + { 1.45 + var tree = { 1.46 + role: ROLE_LIST, 1.47 + children: [ 1.48 + { 1.49 + role: ROLE_LISTITEM, 1.50 + children: [ 1.51 + { 1.52 + role: ROLE_STATICTEXT, 1.53 + name: "1. ", 1.54 + children: [] 1.55 + }, 1.56 + { 1.57 + role: ROLE_TEXT_LEAF, 1.58 + children: [] 1.59 + } 1.60 + ] 1.61 + } 1.62 + ] 1.63 + }; 1.64 + testAccessibleTree(aID, tree); 1.65 + } 1.66 + 1.67 + this.getID = function addLi_getID() 1.68 + { 1.69 + return "add li"; 1.70 + } 1.71 + }; 1.72 + 1.73 + //////////////////////////////////////////////////////////////////////////// 1.74 + // Test 1.75 + 1.76 + //gA11yEventDumpID = "eventdump"; // debug stuff 1.77 + 1.78 + var gQueue = null; 1.79 + 1.80 + function doTest() 1.81 + { 1.82 + gQueue = new eventQueue(); 1.83 + 1.84 + gQueue.push(new addLi("list")); 1.85 + 1.86 + gQueue.invoke(); // SimpleTest.finish() will be called in the end 1.87 + } 1.88 + 1.89 + SimpleTest.waitForExplicitFinish(); 1.90 + addA11yLoadEvent(doTest); 1.91 + </script> 1.92 +</head> 1.93 +<body contentEditable="true"> 1.94 + 1.95 + <a target="_blank" 1.96 + title="Wrong list bullet text of accessible for the first numbered HTML:li in CKEditor" 1.97 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=557795">Mozilla Bug 557795</a> 1.98 + 1.99 + <p id="display"></p> 1.100 + <div id="content" style="display: none"></div> 1.101 + <pre id="test"> 1.102 + </pre> 1.103 + 1.104 + <ol id="list"> 1.105 + </ol> 1.106 + 1.107 + <div id="eventdump"></div> 1.108 +</body> 1.109 +</html>