32 lines
1.5 KiB
HTML
32 lines
1.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body id="body">
|
|
<p>« This is a paragraph with “special” characters inside. »</p><ul><li style='max-width:70px;'>List item with some text that wraps across different lines.</li><li style='max-width:70px;'><p>List item with some text that wraps across different lines.</p></li></ul>
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
<script>
|
|
description("This tests the ability to get element text for different granularities and offsets.");
|
|
if (window.accessibilityController) {
|
|
document.getElementById("body").focus();
|
|
var webArea = accessibilityController.focusedElement;
|
|
|
|
var paragraph = webArea.childAtIndex(0);
|
|
shouldBe("paragraph.lineAtOffset(0)", "'\302\253\302\240This is a paragraph with \342\200\234special\342\200\235 characters inside.\302\240\302\273, 0, 57'");
|
|
|
|
var list = webArea.childAtIndex(1);
|
|
var listitem = list.childAtIndex(0);
|
|
shouldBe("listitem.lineAtOffset(3)", "'\342\200\242 List item , 0, 12'");
|
|
shouldBe("listitem.lineAtOffset(13)", "'with some , 12, 22'");
|
|
|
|
var listitem = list.childAtIndex(1);
|
|
shouldBe("listitem.lineAtOffset(3)", "'\342\200\242 List item , 0, 12'");
|
|
shouldBe("listitem.lineAtOffset(13)", "'with some , 12, 22'");
|
|
}
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|