+2011-10-03 Chris Fleizach <cfleizach@apple.com>
+
+ AX: click point for AXHeadings often returns point on empty space (results in wrong context menu)
+ https://bugs.webkit.org/show_bug.cgi?id=69262
+
+ Actually commit the files this time.
+
+ Reviewed by John Sullivan.
+
+ * platform/mac/accessibility/heading-clickpoint-expected.txt: Added.
+ * platform/mac/accessibility/heading-clickpoint.html: Added.
+
2011-10-03 Adam Barth <abarth@webkit.org>
Results from more bots for http://trac.webkit.org/changeset/96498.
--- /dev/null
+Small heading
+
+A heading that is just a little bit wider
+
+Small heading Small heading
+
+This tests that the click points for headings should use the only child's clickpoint instead of taking the mid point (which may be on nothing).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS heading1.clickPointX is heading1.childAtIndex(0).clickPointX
+PASS heading1.clickPointY is heading1.childAtIndex(0).clickPointY
+PASS heading2.clickPointX is heading2.childAtIndex(0).clickPointX
+PASS heading2.clickPointY is heading2.childAtIndex(0).clickPointY
+PASS heading3.clickPointX == heading3.childAtIndex(0).clickPointX is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<h1 tabindex="0" id="heading1">Small heading</h1>
+<h1 tabindex="0" id="heading2"><a href="#">A heading that is just a little bit wider</a></h1>
+
+<h1 tabindex="0" id="heading3"><a href="#">Small heading</a> <a href="#">Small heading</a></h1>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that the click points for headings should use the only child's clickpoint instead of taking the mid point (which may be on nothing).");
+
+ if (window.accessibilityController) {
+
+ document.getElementById("heading1").focus();
+ var heading1 = accessibilityController.focusedElement;
+
+ // Verify that the click point is the same as the child.
+ shouldBe("heading1.clickPointX", "heading1.childAtIndex(0).clickPointX");
+ shouldBe("heading1.clickPointY", "heading1.childAtIndex(0).clickPointY");
+
+ document.getElementById("heading2").focus();
+ var heading2 = accessibilityController.focusedElement;
+
+ shouldBe("heading2.clickPointX", "heading2.childAtIndex(0).clickPointX");
+ shouldBe("heading2.clickPointY", "heading2.childAtIndex(0).clickPointY");
+
+ document.getElementById("heading3").focus();
+ var heading3 = accessibilityController.focusedElement;
+
+ // If there is more than one child, the click point should be the middle again, which means X point will be different.
+ shouldBeFalse("heading3.clickPointX == heading3.childAtIndex(0).clickPointX");
+
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>