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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/press-works-on-text-fields.html

Issue 2772913003: AXObject::performDefaultAction() should focus if it can't click (Closed)
Patch Set: Add test Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/accessibility/AXMenuList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/accessibility/press-works-on-text-fields.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/press-works-on-text-fields.html b/third_party/WebKit/LayoutTests/accessibility/press-works-on-text-fields.html
new file mode 100644
index 0000000000000000000000000000000000000000..f29a6341c7a047e94e44716a5a876a0a8151e981
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/accessibility/press-works-on-text-fields.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<input id="input">
+
+<script>
+async_test(function(t) {
+ var input = document.getElementById("input");
+ input.addEventListener("focus", function() {
+ t.done();
+ });
+ var axInput = accessibilityController.accessibleElementById("input");
+ axInput.press();
+}, "Calling press() focuses an input.");
+</script>
+
+<textarea id="textarea"></textarea>
+
+<script>
+async_test(function(t) {
+ var textarea = document.getElementById("textarea");
+ textarea.addEventListener("focus", function() {
+ t.done();
+ });
+ var axTextarea = accessibilityController.accessibleElementById("textarea");
+ axTextarea.press();
+}, "Calling press() focuses a textarea.");
+</script>
+
+<div id="contenteditable" contenteditable></div>
+
+<script>
+async_test(function(t) {
+ var contenteditable = document.getElementById("contenteditable");
+ contenteditable.addEventListener("focus", function() {
+ t.done();
+ });
+ var axContenteditable = accessibilityController.accessibleElementById(
+ "contenteditable");
+ axContenteditable.press();
+}, "Calling press() focuses a contenteditable.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/accessibility/AXMenuList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698