Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / option-value-trim-html-spaces.html
blob889800e6b451049473b927ceea800d2495f9b82e
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>
10 <select>
11 <option id="o1"> text with extra while spaces </option>
12 <option id="o2"> text </option>
13 <option id="o3">&nbsp;test&nbsp;text&nbsp;</option>
14 <option id="o4"> test&nbsp;&nbsp;text </option>
15 </select>
17 <script>
18 description('Test for space striping .value attribute of OPTION element');
20 var o1 = document.getElementById('o1');
21 shouldBe('o1.value', '"text with extra while spaces"');
23 var o2 = document.getElementById('o2');
24 shouldBe('o2.value', '"text"');
27 var o3 = document.getElementById('o3');
28 var expected = '\u00A0'+'test'+'\u00A0'+ 'text'+'\u00A0';
29 shouldBe('o3.value','"'+expected+'"');
31 var o4 = document.getElementById('o4');
32 var expected = 'test'+'\u00A0\u00A0'+ 'text';
33 shouldBe('o4.value', '"'+expected+'"');
34 </script>
35 </body>
36 </html>