summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/select/option-value-and-label.html
blob: 16707aefe2b1bf47d5c4aa6062e3c015b9ee49fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE HTML>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>

<select>
<option id="o1">text</option>
<option id="o2" value="value">text</option>
<option id="o3" label="label">text</option>
<option id="o4" value="value" label="label">text</option>
</select>

<script>
description('Test for .value and .label of OPTION element');

var o1 = document.getElementById('o1');
shouldBe('o1.value', '"text"');
shouldBe('o1.label', '"text"');

var o2 = document.getElementById('o2');
shouldBe('o2.value', '"value"');
shouldBe('o2.label', '"text"');

var o3 = document.getElementById('o3');
shouldBe('o3.value', '"text"');
shouldBe('o3.label', '"label"');

var o4 = document.getElementById('o4');
shouldBe('o4.value', '"value"');
shouldBe('o4.label', '"label"');
</script>
</body>
</html>