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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-accessibility-test.html

Issue 2169273004: Switch all LayoutTests to use new accessibility relative bounding box API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix absolute bounds in AXInlineTextBox::elementRect Created 4 years, 4 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
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <head> 2 <head>
3 <title>Canvas Hit Regions: accessibility test</title> 3 <title>Canvas Hit Regions: accessibility test</title>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <canvas id="canvas"> 7 <canvas id="canvas">
8 <button id="button1"></button> 8 <button id="button1"></button>
9 <div id="container1"> 9 <div id="container1">
10 <button id="button2"></button> 10 <button id="button2"></button>
11 <button id="button3"></button> 11 <button id="button3"></button>
12 </div> 12 </div>
13 <div id="container2"> 13 <div id="container2">
14 <div id="container3"> 14 <div id="container3">
15 <button id="button4"></button> 15 <button id="button4"></button>
16 <button id="button5"></button> 16 <button id="button5"></button>
17 </div> 17 </div>
18 <button id="button6"></button> 18 <button id="button6"></button>
19 </div> 19 </div>
20 </canvas> 20 </canvas>
21 <div id="console"></div>
21 <script> 22 <script>
22 23
23 var canvas = document.getElementById("canvas"); 24 var canvas = document.getElementById("canvas");
24 var context = canvas.getContext("2d"); 25 var context = canvas.getContext("2d");
25 26
26 function drawRectAndAddHitRegion(control, x, y, width, height) { 27 function drawRectAndAddHitRegion(control, x, y, width, height) {
27 if (window.accessibilityController) 28 if (window.accessibilityController)
28 window["ax" + control] = accessibilityController.accessibleElementById(con trol); 29 window["ax" + control] = accessibilityController.accessibleElementById(con trol);
29 30
30 context.beginPath(); 31 context.beginPath();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 testAccessibilityRect("button4", 8, 8, 100, 50); 75 testAccessibilityRect("button4", 8, 8, 100, 50);
75 testAccessibilityRect("button5", 48, 28, 50, 70); 76 testAccessibilityRect("button5", 48, 28, 50, 70);
76 testAccessibilityRect("button6", 28, 18, 140, 30); 77 testAccessibilityRect("button6", 28, 18, 140, 30);
77 testAccessibilityRect("container2", 8, 8, 160, 90); 78 testAccessibilityRect("container2", 8, 8, 160, 90);
78 testAccessibilityRect("container3", 8, 8, 100, 90); 79 testAccessibilityRect("container3", 8, 8, 100, 90);
79 debug(""); 80 debug("");
80 81
81 </script> 82 </script>
82 </body> 83 </body>
83 </html> 84 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698