gecko/accessible/tests/mochitest/tree/test_txtcntr.html
Alexander Surkov 63a49358d6 Bug 342045 - Fix O(n^2) access to all the children of a container, r=marcoz, davidb
--HG--
rename : accessible/tests/mochitest/test_nsIAccessible_applicationAccessible.html => accessible/tests/mochitest/test_name_nsApplicationAcc.html
rename : accessible/tests/mochitest/test_invalidate_elmli.html => accessible/tests/mochitest/tree/test_list_invalidate.html
rename : accessible/tests/mochitest/tree/test_txtctrl.html => accessible/tests/mochitest/tree/test_txtcntr.html
2009-11-19 22:44:59 +08:00

103 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>HTML text containers 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/role.js"></script>
<script type="application/javascript">
function doTest()
{
var accTree = {
role: ROLE_SECTION,
children: [
{ // text child
role: ROLE_TEXT_LEAF,
children: []
}
]
};
testAccessibleTree("c1", accTree);
testAccessibleTree("c2", accTree);
accTree = {
role: ROLE_SECTION,
children: [
{
role: ROLE_TEXT_LEAF,
name: "Hello1"
},
{
role: ROLE_WHITESPACE
},
{
role: ROLE_TEXT_LEAF,
name: "Hello2"
},
{
role: ROLE_SEPARATOR
},
{
role: ROLE_TEXT_LEAF,
name: "Hello3 "
},
{
role: ROLE_PARAGRAPH,
children: [
{
role: ROLE_TEXT_LEAF,
name: "Hello4 "
}
]
}
]
};
testAccessibleTree("c3", accTree);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank"
title="overflowed content doesn't expose child text accessibles"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=489306">Mozilla Bug 489306</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<div id="c1" style="width: 100px; height: 100px; overflow: auto;">
1hellohello 2hellohello 3hellohello 4hellohello 5hellohello 6hellohello 7hellohello
</div>
<div id="c2">
1hellohello 2hellohello 3hellohello 4hellohello 5hellohello 6hellohello 7hellohello
</div>
<div id="c3">
Hello1<br>
Hello2<hr>
Hello3
<p>
Hello4
</p>
</div>
</body>
</html>