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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <map name="imagemap1">
6 <area shape="rect" coords="10,20,100,30" href="#" title="Link1" />
7 <area shape="rect" coords="30,40,100,50" href="#" title="Link2" />
8 </map>
9
10 <img src="resources/cake.png" usemap="#imagemap1" style="position: absolute; lef t: 200px; top: 100px;">
11
12 <script>
13 function findAllImageMapLinks(node, list) {
14 if (node.role == "AXRole: AXLink")
15 list.push(node);
16 for (var i = 0; i < node.childrenCount; i++)
17 findAllImageMapLinks(node.childAtIndex(i), list);
18 }
19
20 test(function(t) {
21 var links = [];
22 findAllImageMapLinks(accessibilityController.rootElement, links);
23
24 assert_equals(links.length, 2);
25 assert_equals(links[0].name, "Link1");
26 assert_equals(links[0].x, 210);
27 assert_equals(links[0].y, 120);
28 assert_equals(links[1].name, "Link2");
29 assert_equals(links[1].x, 230);
30 assert_equals(links[1].y, 140);
31 }, "Test bounds of image map links");
32 </script>
33
34 </body>
35 </html>
OLDNEW
« 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