| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| </script> |
| </head> |
| <body> |
| |
| <p>This is a very long, long, long, long, line that contains a link that expands multiple lines: <a id="multiline-link" href="#">Apple<br><br>Inc.</a> is based in Cupertino California. |
| </p> |
| |
| <br><br> |
| |
| <p>A singleline link: <a id="singleline-link" href="#">Apple Inc.</a> is based in Cupertino California. |
| </p> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| description("This test ensures that the activation point (or click point) for a link is inside the bounding rect for the link. ."); |
| |
| function clickPointInsideFrame(el) { |
| var clickX = el.clickPointX; |
| var clickY = el.clickPointY; |
| |
| var frameX = el.x; |
| var frameY = el.y; |
| var frameW = el.width; |
| var frameH = el.height; |
| |
| return (clickX >= frameX && clickX <= frameX + frameW |
| && clickY >= frameY && clickY <= frameY + frameH); |
| }; |
| |
| if (window.accessibilityController) { |
| var link = accessibilityController.accessibleElementById("multiline-link"); |
| shouldBeTrue("clickPointInsideFrame(link)"); |
| link.press(); |
| |
| link = accessibilityController.accessibleElementById("singleline-link"); |
| shouldBeTrue("clickPointInsideFrame(link)"); |
| link.press(); |
| } |
| </script> |
| |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |