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

Side by Side Diff: LayoutTests/fast/forms/selection-wrongtype.html

Issue 707853002: Tests to show support for select() API exists (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved unsupported selection API input type to selection-wrongtype, and corrected input-select-api-s… Created 6 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="tests"><input type="button"><input type="checkbox"><input type="file">< input type="hidden"> 8 <div id="tests"><input type="button"><input type="checkbox"><input type="file">< input type="hidden">
9 <input type="image"><input type="radio"><input type="range"><input type="reset"> <input type="submit"><input type="email"><input type="number"></div> 9 <input type="image"><input type="radio"><input type="range"><input type="reset"> <input type="submit"><input type="email"><input type="number">
10 <input type="date"><input type="time"><input type="month"><input type="week"><in put type="datetime-local"><input type="color"></div>
10 <div id="console"></div> 11 <div id="console"></div>
11 <div> 12 <div>
12 <script type="text/javascript"> 13 <script type="text/javascript">
13 description('Tests to ensure selectionStart, selectionEnd, selectionDirection an d selectionRange throw exceptions when the input element is not a text field.'); 14 description('Tests to ensure selectionStart, selectionEnd, selectionDirection an d selectionRange throw exceptions when the input element is not a text field.');
14 15
15 var tests = document.getElementById('tests'); 16 var tests = document.getElementById('tests');
16 for (var i = 0; i < tests.children.length; i++) { 17 for (var i = 0; i < tests.children.length; i++) {
17 var test = tests.children[i]; 18 var test = tests.children[i];
18 test.focus(); 19 test.focus();
19 20
20 shouldThrow('test.selectionStart'); 21 shouldThrow('test.selectionStart');
21 shouldThrow('test.selectionStart = 0'); 22 shouldThrow('test.selectionStart = 0');
22 shouldThrow('test.selectionEnd'); 23 shouldThrow('test.selectionEnd');
23 shouldThrow('test.selectionEnd = 0'); 24 shouldThrow('test.selectionEnd = 0');
24 shouldThrow('test.selectionDirection'); 25 shouldThrow('test.selectionDirection');
25 shouldThrow('test.selectionDirection = 0'); 26 shouldThrow('test.selectionDirection = 0');
26 shouldThrow('test.selectionRange()'); 27 shouldThrow('test.selectionRange()');
27 } 28 }
28 29
29 tests.style.display = 'none'; 30 tests.style.display = 'none';
30 31
31 </script> 32 </script>
32 </body> 33 </body>
33 </html> 34 </html>
34 35
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/input-select-api-support-expected.txt ('k') | LayoutTests/fast/forms/selection-wrongtype-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698