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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/option-value-and-label-changed-by-js.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
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9
10 <select>
11 <option id="o1"> text </option>
12 <option id="o2" value="value"> text </option>
13 <option id="o3" label="label"> text </option>
14 <option id="o4" value="value" label="label">text</option>
15 </select>
16
17 <script>
18 description('Test for .value and .label of OPTION element');
19
20 var o1 = document.getElementById('o1');
21 o1.label = "newLabel"
22 o1.value = "newValue"
23 shouldBe('o1.value', '"newValue"');
24 shouldBe('o1.label', '"newLabel"');
25
26 var o2 = document.getElementById('o2');
27 o2.label = "newLabel"
28 o2.value = "newValue"
29 shouldBe('o2.value', '"newValue"');
30 shouldBe('o2.label', '"newLabel"');
31
32 var o3 = document.getElementById('o3');
33 o3.label = "newLabel"
34 o3.value = "newValue"
35 shouldBe('o3.value', '"newValue"');
36 shouldBe('o3.label', '"newLabel"');
37
38 var o4 = document.getElementById('o4');
39 o4.label = "newLabel"
40 o4.value = "newValue"
41 shouldBe('o4.value', '"newValue"');
42 shouldBe('o4.label', '"newLabel"');
43 </script>
44 </body>
45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698