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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/onclick-handlers.html

Issue 2713193003: Added a quick heuristic to determine which objects are the target of in-page links and stop ignorin… (Closed)
Patch Set: Fixed Android test. Created 3 years, 8 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 <html> 1 <html>
2 <script> 2 <script>
3 if (window.testRunner) 3 if (window.testRunner)
4 testRunner.dumpAsText(); 4 testRunner.dumpAsText();
5 </script> 5 </script>
6 <body id="body"> 6 <body id="body">
7 7
8 <div id="result"></div> 8 <div id="result"></div>
9 9
10 <!-- This test checks that an element will expose AXPress as an action if it listens for onClick --> 10 <!-- This test checks that an element will expose AXPress as an action if it listens for onClick -->
11 <div onclick="alert('hello');">this is an on click handler</div> 11 <div onclick="alert('hello');">this is an on click handler</div>
12 12
13 <script> 13 <script>
14 if (window.accessibilityController) { 14 if (window.accessibilityController) {
15 var result = document.getElementById("result"); 15 var result = document.getElementById("result");
16 16
17 var body = document.getElementById("body"); 17 var body = document.getElementById("body");
18 body.focus(); 18 body.focus();
19 var focusedElement = accessibilityController.focusedElement; 19 var focusedElement = accessibilityController.focusedElement;
20 var textElement = focusedElement.childAtIndex(0).childAtIndex(0); 20 var textElement = focusedElement.childAtIndex(1).childAtIndex(0);
21 21
22 if (textElement.isPressActionSupported()) { 22 if (textElement.isPressActionSupported()) {
23 result.innerText += "Test passed\n"; 23 result.innerText += "Test passed\n";
24 } 24 }
25 else { 25 else {
26 result.innerText += "Test failed\n"; 26 result.innerText += "Test failed\n";
27 } 27 }
28 } 28 }
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698