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

Side by Side Diff: LayoutTests/accessibility/scroll-containers.html

Issue 1121473004: Expose scroll containers via accessibility APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/modules/accessibility/AXLayoutObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <div id="container">
6 <div style="border: 1px solid #000; height: 5000px;">5000-pixel box</div>
7
8 <div id="outer" style="height: 100px; overflow: scroll">
9 <div style="border: 1px solid #000; height: 5000px;">5000-pixel box</div>
10 <div id="inner" style="height: 100px; overflow: scroll">
11 <div style="border: 1px solid #000; height: 5000px;">5000-pixel box</div>
12 <button id="target">Target</button>
13 </div>
14 </div>
15 </div>
16
17 <div id="console"></div>
18
19 <script>
20 test(function(t) {
21 var axWebArea = accessibilityController.rootElement;
22 assert_equals(axWebArea.role, "AXRole: AXWebArea");
23
24 assert_true(axWebArea.isScrollableContainer);
25 assert_equals(axWebArea.scrollOffsetY, 0);
26 assert_not_equals(axWebArea.maxScrollOffsetY, 0);
27 axWebArea.setScrollOffset(0, axWebArea.maxScrollOffsetY);
28 assert_equals(axWebArea.scrollOffsetY, axWebArea.maxScrollOffsetY);
29
30 var axOuter = accessibilityController.accessibleElementById("outer");
31 assert_true(axOuter.isScrollableContainer);
32 assert_equals(axOuter.scrollOffsetY, 0);
33 assert_not_equals(axOuter.maxScrollOffsetY, 0);
34 axOuter.setScrollOffset(0, axOuter.maxScrollOffsetY);
35 assert_equals(axOuter.scrollOffsetY, axOuter.maxScrollOffsetY);
36
37 var axInner = accessibilityController.accessibleElementById("inner");
38 assert_true(axInner.isScrollableContainer);
39 assert_equals(axInner.scrollOffsetY, 0);
40 assert_not_equals(axInner.maxScrollOffsetY, 0);
41 axInner.setScrollOffset(0, axInner.maxScrollOffsetY);
42 assert_equals(axInner.scrollOffsetY, axInner.maxScrollOffsetY);
43
44 var axTarget = accessibilityController.accessibleElementById("target");
45 assert_false(axTarget.isScrollableContainer);
46 }, "Test scroll container APIs.");
47
48 if (window.testRunner)
49 document.getElementById("container").style.display = "none";
50 </script>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/modules/accessibility/AXLayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698