gecko/accessible/tests/mochitest/attributes/test_obj_css.html

81 lines
2.2 KiB
HTML
Raw Normal View History

<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=439566
https://bugzilla.mozilla.org/show_bug.cgi?id=460932
-->
<head>
<title>CSS-like attributes tests</title>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript"
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/attributes.js"></script>
<script type="application/javascript">
function testCSSAttrs(aID)
{
var node = document.getElementById(aID);
var computedStyle = document.defaultView.getComputedStyle(node, "");
var attrs = {
"display": computedStyle.display,
"text-align": computedStyle.textAlign,
"text-indent": computedStyle.textIndent
};
testAttrs(aID, attrs, true);
}
function doTest()
{
testCSSAttrs("span");
testCSSAttrs("div");
testCSSAttrs("p");
testCSSAttrs("input");
testCSSAttrs("table");
testCSSAttrs("tr");
testCSSAttrs("td");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=439566"
title="Include the css display property as an IAccessible2 object attribute">
Mozilla Bug 439566
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=460932"
title="text-indent and text-align should really be object attribute">
Mozilla Bug 460932
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<span id="span" role="group">It's span</span>
<div id="div">It's div</div>
<p id="p">It's paragraph"</p>
<input id="input"/>
<table id="table">
<tr id="tr" role="group">
<td id="td">td</td>
</tr>
</table>
</body>
</html>