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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select/select-value-null.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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>HTMLSelectElement.value null handling</title> 2 <title>HTMLSelectElement.value null handling</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 </script> 6 </script>
7 <select> 7 <select>
8 <option id="option1" value=""></option> 8 <option id="option1" value=""></option>
9 <option id="option2" value="null"></option> 9 <option id="option2" value="null"></option>
10 </select> 10 </select>
11 <div id="log"></div> 11 <div id="log"></div>
12 <script> 12 <script>
13 test(function() 13 test(function()
14 { 14 {
15 var select = document.querySelector('select'); 15 var select = document.querySelector('select');
16 assert_equals(select.value, ""); 16 assert_equals(select.value, "");
17 assert_true(document.getElementById("option1").selected); 17 assert_true(document.getElementById("option1").selected);
18 select.value = null; 18 select.value = null;
19 assert_equals(select.value, "null"); 19 assert_equals(select.value, "null");
20 assert_true(document.getElementById("option2").selected); 20 assert_true(document.getElementById("option2").selected);
21 }, "Setting HTMLSelectElement.value to null"); 21 }, "Setting HTMLSelectElement.value to null");
22 </script> 22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698