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

Side by Side Diff: LayoutTests/fast/forms/label/contenteditable-label-focus-tab.html

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../fast/js/resources/js-test-pre.js"></script> 4 <script src="../../../fast/js/resources/js-test-pre.js"></script>
5 <script> 5 <script>
6 function runTest() { 6 function runTest() {
7 var label = document.getElementById('label'); 7 var label = document.getElementById('label');
8 var button = document.getElementById('button'); 8 var button = document.getElementById('button');
9 label.focus(); 9 label.focus();
10 debug('Focus should be on the label'); 10 debug('Focus should be on the label');
11 shouldBe('document.activeElement', 'label'); 11 shouldBe('document.activeElement', 'label');
12 eventSender.keyDown('\t'); 12 eventSender.keyDown('\t');
13 debug('Focus should be on the button after pressing tab'); 13 debug('Focus should be on the button after pressing tab');
14 shouldBe('document.activeElement', 'button'); 14 shouldBe('document.activeElement', 'button');
15 eventSender.keyDown('\t', ['shiftKey']); 15 eventSender.keyDown('\t', ['shiftKey']);
16 debug('Focus should be on the label after pressing shift+tab'); 16 debug('Focus should be on the label after pressing shift+tab');
17 shouldBe('document.activeElement', 'label'); 17 shouldBe('document.activeElement', 'label');
18 } 18 }
19 </script> 19 </script>
20 </head> 20 </head>
21 <body onload="runTest()"> 21 <body onload="runTest()">
22 <label id="label" contenteditable>I'm editable.</label> 22 <label id="label" contenteditable>I'm editable.</label>
23 <button id="button">Just a button</button> 23 <button id="button">Just a button</button>
24 <script src="../../../fast/js/resources/js-test-post.js"> </script>
25 </body> 24 </body>
26 </html> 25 </html>
27 26
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698