2008-09-17 06:09:34 -07:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>nsIAccessNode util methods testing</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">
|
|
|
|
function doTest()
|
|
|
|
{
|
|
|
|
var elmObj = {};
|
|
|
|
var acc = getAccessible("span", [nsIAccessNode], elmObj);
|
|
|
|
computedStyle = document.defaultView.getComputedStyle(elmObj.value, "");
|
|
|
|
|
|
|
|
// html:span element
|
|
|
|
is(acc.getComputedStyleValue("", "color"), computedStyle.color,
|
|
|
|
"Wrong color for element with ID 'span'");
|
|
|
|
|
|
|
|
// text child of html:span element
|
|
|
|
acc = getAccessible(acc.firstChild, [nsIAccessNode]);
|
|
|
|
is(acc.getComputedStyleValue("", "color"), computedStyle.color,
|
|
|
|
"Wrong color for text child of element with ID 'span'");
|
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2008-09-17 06:09:34 -07:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=454211"
|
|
|
|
title="nsIAccessNode util methods testing">
|
|
|
|
Mozilla Bug 454211
|
|
|
|
</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
|
2009-02-10 01:40:38 -08:00
|
|
|
<span role="note" style="color: red" id="span">text</span>
|
2008-09-17 06:09:34 -07:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|