Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Unified Diff: third_party/WebKit/LayoutTests/accessibility/image-map-bounds.html

Issue 2287433003: Get rid of remaining uses of AXObject::elementRect (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/accessibility/image-map-bounds.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-map-bounds.html b/third_party/WebKit/LayoutTests/accessibility/image-map-bounds.html
new file mode 100644
index 0000000000000000000000000000000000000000..11ea90e6fb27e8e106f3370b466364f5ddc474e4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/accessibility/image-map-bounds.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<map name="imagemap1">
+ <area shape="rect" coords="10,20,100,30" href="#" title="Link1" />
+ <area shape="rect" coords="30,40,100,50" href="#" title="Link2" />
+</map>
+
+<img src="resources/cake.png" usemap="#imagemap1" style="position: absolute; left: 200px; top: 100px;">
+
+<script>
+function findAllImageMapLinks(node, list) {
+ if (node.role == "AXRole: AXLink")
+ list.push(node);
+ for (var i = 0; i < node.childrenCount; i++)
+ findAllImageMapLinks(node.childAtIndex(i), list);
+}
+
+test(function(t) {
+ var links = [];
+ findAllImageMapLinks(accessibilityController.rootElement, links);
+
+ assert_equals(links.length, 2);
+ assert_equals(links[0].name, "Link1");
+ assert_equals(links[0].x, 210);
+ assert_equals(links[0].y, 120);
+ assert_equals(links[1].name, "Link2");
+ assert_equals(links[1].x, 230);
+ assert_equals(links[1].y, 140);
+}, "Test bounds of image map links");
+</script>
+
+</body>
+</html>
« no previous file with comments | « components/test_runner/web_ax_object_proxy.cc ('k') | third_party/WebKit/LayoutTests/accessibility/slider-thumb-bounds.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698