1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/states/test_docarticle.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,80 @@ 1.4 +<html> 1.5 +<head> 1.6 + <title>states of document article</title> 1.7 + 1.8 + <link rel="stylesheet" type="text/css" 1.9 + href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 1.10 + 1.11 + <script type="application/javascript" 1.12 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.13 + 1.14 + <script type="application/javascript" 1.15 + src="../common.js"></script> 1.16 + <script type="application/javascript" 1.17 + src="../role.js"></script> 1.18 + <script type="application/javascript" 1.19 + src="../states.js"></script> 1.20 + 1.21 + <script type="application/javascript"> 1.22 + function doTest() 1.23 + { 1.24 + var docAcc = getAccessible(document, [nsIAccessibleDocument]); 1.25 + if (docAcc) { 1.26 + testStates(docAcc, STATE_READONLY); 1.27 + testStates("aria_article", STATE_READONLY); 1.28 + testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, 1.29 + STATE_READONLY); 1.30 + testStates("article", STATE_READONLY); 1.31 + testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.32 + 1.33 + document.designMode = "on"; 1.34 + 1.35 + testStates(docAcc, 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.36 + testStates("aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.37 + testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.38 + testStates("article", 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.39 + testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.40 + 1.41 + document.designMode = "off"; 1.42 + 1.43 + testStates(docAcc, STATE_READONLY); 1.44 + testStates("aria_article", STATE_READONLY); 1.45 + testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.46 + testStates("article", STATE_READONLY); 1.47 + testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY); 1.48 + } 1.49 + SimpleTest.finish(); 1.50 + } 1.51 + 1.52 + SimpleTest.waitForExplicitFinish(); 1.53 + addA11yLoadEvent(doTest); 1.54 + </script> 1.55 +</head> 1.56 + 1.57 +<body role="article"> 1.58 + 1.59 + <a target="_blank" 1.60 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=467387" 1.61 + title="Expose non-editable documents as readonly, regardless of role"> 1.62 + Mozilla Bug 467387 1.63 + </a><br/> 1.64 + <a target="_blank" 1.65 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502" 1.66 + title="Map <article> like we do aria role article"> 1.67 + Mozilla Bug 613502 1.68 + </a> 1.69 + <p id="display"></p> 1.70 + <div id="content" style="display: none"></div> 1.71 + <pre id="test"> 1.72 + </pre> 1.73 + 1.74 + <div id="aria_article" role="article">aria article</div> 1.75 + <div id="editable_aria_article" role="article" contentEditable="true"> 1.76 + editable aria article</div> 1.77 + 1.78 + <article id="article">article</article> 1.79 + <article id="editable_article" contentEditable="true"> 1.80 + editable article</article> 1.81 + 1.82 +</body> 1.83 +</html>