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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select/select-max-length.html

Issue 1509853008: Move select/option/optgroup-related tests in fast/forms to fast/forms/select. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 <p>This test that setting HTMLSelectElement.length is capped to 2,147,483,647, a nd you can't add additional Option elements too.</p> 1 <p>This test that setting HTMLSelectElement.length is capped to 2,147,483,647, a nd you can't add additional Option elements too.</p>
2 <div id="console"></div> 2 <div id="console"></div>
3 <select id="theSelect"></select> 3 <select id="theSelect"></select>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 var sel = document.getElementById('theSelect'); 6 var sel = document.getElementById('theSelect');
7 shouldBe('sel.length', '0'); 7 shouldBe('sel.length', '0');
8 8
9 debug('Trying: - sel.length = 2147483648;'); 9 debug('Trying: - sel.length = 2147483648;');
10 sel.length = 2147483648; 10 sel.length = 2147483648;
11 shouldBe('sel.length', '0'); 11 shouldBe('sel.length', '0');
12 12
13 debug('Trying: - sel.add(new Option, 0);'); 13 debug('Trying: - sel.add(new Option, 0);');
14 sel.add(new Option, 0); 14 sel.add(new Option, 0);
15 shouldBe('sel.length', '1'); 15 shouldBe('sel.length', '1');
16 16
17 debug('Trying: - sel.length = 0;'); 17 debug('Trying: - sel.length = 0;');
18 sel.length = 0; 18 sel.length = 0;
19 shouldBe('sel.length', '0'); 19 shouldBe('sel.length', '0');
20 20
21 debug('Index setter:'); 21 debug('Index setter:');
22 shouldBe('sel[2147483648] = new Option(); sel.length', '0'); 22 shouldBe('sel[2147483648] = new Option(); sel.length', '0');
23 shouldBe('sel.options[2147483648] = new Option(); sel.length', '0'); 23 shouldBe('sel.options[2147483648] = new Option(); sel.length', '0');
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698