Index: LayoutTests/accessibility/aria-setsize-posinset.html |
diff --git a/LayoutTests/accessibility/aria-setsize-posinset.html b/LayoutTests/accessibility/aria-setsize-posinset.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5cd1a2160fab7f3706eb7b9065eb9d0fafd80dd6 |
--- /dev/null |
+++ b/LayoutTests/accessibility/aria-setsize-posinset.html |
@@ -0,0 +1,49 @@ |
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
+<html> |
+<head> |
+<script src="../resources/js-test.js"></script> |
+</head> |
+<body> |
+ |
+<div id="list" role="list"> |
+ <div role="listitem" aria-setSize="10" aria-posinset="3"></div> |
+ <div role="listitem" aria-setSize="10" aria-posinset="5"></div> |
+</div> |
+ |
+<div id="listbox" role="listbox"> |
+ <div role="option"></div> |
+ <div role="option"></div> |
+ <div role="option"></div> |
+ <div role="option"></div> |
+</div> |
+ |
+<p id="description"></p> |
+<div id="console"></div> |
+ |
+<script> |
+description("This tests that aria-posinset and aria-setsize are exposed to accessibility correctly."); |
+ |
+if (window.accessibilityController) { |
+ |
+ var list = accessibilityController.accessibleElementById("list"); |
+ |
+ shouldBe("list.childAtIndex[0].setSize", "10"); |
+ shouldBe("list.childAtIndex[1].setSize", "10"); |
+ shouldBe("list.childAtIndex[0].posInSet", "3"); |
+ shouldBe("list.childAtIndex[1].posInSet", "5"); |
+ |
+ var listbox = document.getElementById("listbox"); |
+ |
+ shouldBe("listbox.childAtIndex[0].setSize", "4"); |
+ shouldBe("listbox.childAtIndex[1].setSize", "4"); |
+ shouldBe("listbox.childAtIndex[2].setSize", "4"); |
+ shouldBe("listbox.childAtIndex[3].setSize", "4"); |
+ shouldBe("listbox.childAtIndex[0].posInSet", "1"); |
+ shouldBe("listbox.childAtIndex[1].posInSet", "2"); |
+ shouldBe("listbox.childAtIndex[2].posInSet", "3"); |
+ shouldBe("listbox.childAtIndex[3].posInSet", "4"); |
+} |
+</script> |
+ |
+</body> |
+</html> |