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

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

Issue 100433008: Disable select api for input type number and email (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per code review Created 7 years 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/selection-wrongtype-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"></div> 9 <input type="image"><input type="radio"><input type="range"><input type="reset"> <input type="submit"><input type="email"><input type="number"></div>
10 <div id="console"></div> 10 <div id="console"></div>
11 <div> 11 <div>
12 <script type="text/javascript"> 12 <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.'); 13 description('Tests to ensure selectionStart, selectionEnd, selectionDirection an d selectionRange throw exceptions when the input element is not a text field.');
14 14
15 var tests = document.getElementById('tests'); 15 var tests = document.getElementById('tests');
16 for (var i = 0; i < tests.children.length; i++) { 16 for (var i = 0; i < tests.children.length; i++) {
17 var test = tests.children[i]; 17 var test = tests.children[i];
18 test.focus(); 18 test.focus();
19 19
20 shouldThrow('test.selectionStart'); 20 shouldThrow('test.selectionStart');
21 shouldThrow('test.selectionStart = 0'); 21 shouldThrow('test.selectionStart = 0');
22 shouldThrow('test.selectionEnd'); 22 shouldThrow('test.selectionEnd');
23 shouldThrow('test.selectionEnd = 0'); 23 shouldThrow('test.selectionEnd = 0');
24 shouldThrow('test.selectionDirection'); 24 shouldThrow('test.selectionDirection');
25 shouldThrow('test.selectionDirection = 0'); 25 shouldThrow('test.selectionDirection = 0');
26 shouldThrow('test.selectionRange()'); 26 shouldThrow('test.selectionRange()');
27 } 27 }
28 28
29 tests.style.display = 'none'; 29 tests.style.display = 'none';
30 30
31 </script> 31 </script>
32 </body> 32 </body>
33 </html> 33 </html>
34 34
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/selection-wrongtype-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698