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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <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.
2 if (window.testRunner)
3 testRunner.dumpAsText();
4
5 function test()
6 {
7 if (!window.testRunner)
8 return;
9 var elem_movetome = document.getElementById('MoveToMe');
10 var elem_focusme = document.getElementById('focusMe');
11 elem_focusme.focus();
12 eventSender.keyDown("\t");
13 var current_focus = document.activeElement;
14
15 if (current_focus == elem_movetome) { // first test passed, continue with se cond test
16 elem_focusme.focus();
17 eventSender.keyDown("\t",["shiftKey"]);
18 current_focus = document.activeElement;
19
20 if (current_focus == elem_movetome) { // second test passed
21 document.write("PASSED");
22 document.close();
23 return;
24 }
25 }
26 document.write("FAILED");
27 document.close();
28 }
29 </script>
30 <body onload="test()">
31 <input id="MoveToMe" tabindex="1">
32 <input tabindex="-1">
33 <input id="focusMe" tabindex="-1">
34 <input tabindex="-1">
35 <div id="results"></div>
36 </body>
37
38
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698