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

Unified Diff: LayoutTests/fast/events/tabindex-no-focusable.html

Issue 484383002: Disable the focus moves to an element which doesn't satisfy the spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Test Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/tabindex-no-focusable.html
diff --git a/LayoutTests/fast/events/tabindex-no-focusable.html b/LayoutTests/fast/events/tabindex-no-focusable.html
new file mode 100644
index 0000000000000000000000000000000000000000..ad30860b8aecf234d7c0446c119cc3e893f8c4c3
--- /dev/null
+++ b/LayoutTests/fast/events/tabindex-no-focusable.html
@@ -0,0 +1,38 @@
+<script>
hayato 2014/09/12 04:37:12 Ditto. You might update this test also as I commen
yanagawa 2014/09/12 06:04:48 Done.
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function test()
+{
+ if (!window.testRunner)
+ return;
+ var elem_movetome = document.getElementById('MoveToMe');
+ var elem_focusme = document.getElementById('focusMe');
+ elem_focusme.focus();
+ eventSender.keyDown("\t");
+ var current_focus = document.activeElement;
+
+ if (current_focus == elem_movetome) { // first test passed, continue with second test
+ elem_focusme.focus();
+ eventSender.keyDown("\t",["shiftKey"]);
+ current_focus = document.activeElement;
+
+ if (current_focus == elem_movetome) { // second test passed
+ document.write("PASSED");
+ document.close();
+ return;
+ }
+ }
+ document.write("FAILED");
+ document.close();
+}
+</script>
+<body onload="test()">
+<input id="MoveToMe" tabindex="1">
+<input tabindex="-1">
+<input id="focusMe" tabindex="-1">
+<input tabindex="-1">
+<div id="results"></div>
+</body>
+
+

Powered by Google App Engine
This is Rietveld 408576698