зеркало из https://github.com/mozilla/pjs.git
56 строки
1.6 KiB
HTML
56 строки
1.6 KiB
HTML
<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();
|
|
addLoadEvent(doTest);
|
|
</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>
|
|
|
|
<span role="description" style="color: red" id="span">text</span>
|
|
|
|
</body>
|
|
</html>
|