blob: bac043e9ec1e7594f72ecd471b003d9639d8b0b9 (
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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<select>
<option id="o1"> text with extra while spaces </option>
<option id="o2"> text </option>
<option id="o3"> test text </option>
<option id="o4"> test text </option>
</select>
<script>
description('Test for space striping .label attribute of OPTION element');
var o1 = document.getElementById('o1');
shouldBe('o1.label', '"text with extra while spaces"');
var o2 = document.getElementById('o2');
shouldBe('o2.label', '"text"');
var o3 = document.getElementById('o3');
var expected = '\u00A0'+'test'+'\u00A0'+ 'text'+'\u00A0';
shouldBe('o3.label','"'+expected+'"');
var o4 = document.getElementById('o4');
var expected = 'test'+'\u00A0\u00A0'+ 'text';
shouldBe('o4.label', '"'+expected+'"');
</script>
</body>
</html>
|