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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/slider-thumb-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 <input id="slider" type="range" min=0 max=10 value=0 style="position: absolute; left: 100px; top: 50px; width: 300px; height: 20px;">
6
7 <script>
8 test(function(t) {
9 var axSlider = accessibilityController.accessibleElementById("slider");
10 assert_equals(axSlider.role, "AXRole: AXSlider");
11
12 var axSliderThumb = axSlider.childAtIndex(0);
13 assert_equals(axSliderThumb.role, "AXRole: AXSliderThumb");
14
15 // The slider thumb should be near the beginning of the slider
16 assert_true(Math.abs(axSliderThumb.x - axSlider.x) < 5);
17 assert_true(Math.abs(axSliderThumb.y - axSlider.y) < 5);
18
19 // The slider should be wide but the thumb should not be
20 assert_true(axSlider.width > 250);
21 assert_true(axSliderThumb.width < 30);
22 }, "Test bounds of slider thumb");
23 </script>
24
25 </body>
26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698