DOMTokenList update steps for classList don't follow the spec
[WebKit-https.git] / LayoutTests / fast / dom / HTMLOutputElement / htmloutputelement.html
1 <html>
2 <head>
3 <script src="../../../resources/js-test-pre.js"></script>
4 </head>
5 <body>
6
7 <span id="for-target1"></span>
8 <span id="for-target2"></span>
9 <output id="output1" name="output1">A value</output>
10 <output id="output2" for="for-target1"></output>
11 <output id="output3" for=" for-target1 for-target2 "></output>
12
13 <script>
14 description('Tests for content attributes of the output element.');
15
16 var output1 = document.getElementById('output1');
17 var output2 = document.getElementById('output2');
18 var output3 = document.getElementById('output3');
19
20 shouldBeEqualToString('output1.type', 'output');
21 shouldBeEqualToString('output1.name', 'output1');
22 shouldBeEqualToString('output1.value', 'A value');
23
24 shouldEvaluateTo('output2.htmlFor.length', 1);
25 shouldBeEqualToString('output2.htmlFor[0]', 'for-target1');
26 shouldBeEqualToString('output2.htmlFor.value', 'for-target1');
27
28 shouldEvaluateTo('output3.htmlFor.length', 2);
29 shouldBeEqualToString('output3.htmlFor[0]', 'for-target1');
30 shouldBeEqualToString('output3.htmlFor[1]', 'for-target2');
31 shouldBeEqualToString('output3.htmlFor.value', 'for-target1 for-target2');
32 </script>
33 <script src="../../../resources/js-test-post.js"></script>
34 </body>
35 </html>