OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../../resources/js-test.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 | 6 |
7 <span id="for-target1"></span> | 7 <span id="for-target1"></span> |
8 <span id="for-target2"></span> | 8 <span id="for-target2"></span> |
9 <output id="output1" name="output1">A value</output> | 9 <output id="output1" name="output1">A value</output> |
10 <output id="output2" for="for-target1"></output> | 10 <output id="output2" for="for-target1"></output> |
11 <output id="output3" for=" for-target1 for-target2 "></output> | 11 <output id="output3" for=" for-target1 for-target2 "></output> |
12 | 12 |
13 <script> | 13 <script> |
14 description('Tests for content attributes of the output element.'); | 14 description('Tests for content attributes of the output element.'); |
15 | 15 |
16 var output1 = document.getElementById('output1'); | 16 var output1 = document.getElementById('output1'); |
17 var output2 = document.getElementById('output2'); | 17 var output2 = document.getElementById('output2'); |
18 var output3 = document.getElementById('output3'); | 18 var output3 = document.getElementById('output3'); |
19 | 19 |
20 shouldBeEqualToString('output1.type', 'output'); | 20 shouldBeEqualToString('output1.type', 'output'); |
21 shouldBeEqualToString('output1.name', 'output1'); | 21 shouldBeEqualToString('output1.name', 'output1'); |
22 shouldBeEqualToString('output1.value', 'A value'); | 22 shouldBeEqualToString('output1.value', 'A value'); |
| 23 shouldBeEqualToString('output1.defaultValue', 'A value'); |
23 | 24 |
24 shouldEvaluateTo('output2.htmlFor.length', 1); | 25 shouldEvaluateTo('output2.htmlFor.length', 1); |
25 shouldBeEqualToString('output2.htmlFor[0]', 'for-target1'); | 26 shouldBeEqualToString('output2.htmlFor[0]', 'for-target1'); |
26 shouldBeEqualToString('output2.htmlFor.value', 'for-target1'); | 27 shouldBeEqualToString('output2.htmlFor.value', 'for-target1'); |
27 | 28 |
28 shouldEvaluateTo('output3.htmlFor.length', 2); | 29 shouldEvaluateTo('output3.htmlFor.length', 2); |
29 shouldBeEqualToString('output3.htmlFor[0]', 'for-target1'); | 30 shouldBeEqualToString('output3.htmlFor[0]', 'for-target1'); |
30 shouldBeEqualToString('output3.htmlFor[1]', 'for-target2'); | 31 shouldBeEqualToString('output3.htmlFor[1]', 'for-target2'); |
31 shouldBeEqualToString('output3.htmlFor.value', ' for-target1 for-target2 '); | 32 shouldBeEqualToString('output3.htmlFor.value', ' for-target1 for-target2 '); |
32 </script> | 33 </script> |
33 </body> | 34 </body> |
34 </html> | 35 </html> |
OLD | NEW |