OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
5 </head> | |
6 <body> | |
7 <keygen id="keys" /> | 3 <keygen id="keys" /> |
8 <pre id="console"> | 4 <script> |
9 This tests the keygen element. | 5 description("This tests the keygen element"); |
10 | 6 |
11 </pre> | |
12 <script> | |
13 var keygen = document.getElementById('keys'); | 7 var keygen = document.getElementById('keys'); |
14 shouldBe('keygen.options', 'undefined'); // keygen is not a select | 8 shouldBe('keygen.options', 'undefined'); // keygen is not a select |
| 9 shouldBeEqualToString('keygen.type', 'keygen'); |
| 10 shouldBeEqualToString('keygen.keytype', 'rsa'); |
| 11 shouldBeNull('keygen.getAttribute("keytype")'); |
| 12 shouldBeEqualToString('keygen.keytype = "foo"; keygen.keytype', ''); |
| 13 shouldBeEqualToString('keygen.getAttribute("KEYtype")', 'foo'); |
| 14 shouldBeEqualToString('keygen.setAttribute("keytype", "bar"); keygen.keytype', '
'); |
| 15 shouldBeEqualToString('keygen.getAttribute("KeyType")', 'bar'); |
15 | 16 |
16 if (window.internals) { | 17 if (window.internals) { |
17 var shadow = internals.shadowRoot(keygen); | 18 var shadow = internals.shadowRoot(keygen); |
18 shouldBe('shadow.firstChild.tagName', '"SELECT"'); | 19 shouldBe('shadow.firstChild.tagName', '"SELECT"'); |
19 shouldBe('internals.shadowRoot(shadow.firstChild)', 'null'); | 20 shouldBe('internals.shadowRoot(shadow.firstChild)', 'null'); |
20 } | 21 } |
21 </script> | 22 </script> |
22 </body> | |
23 </html> | |
OLD | NEW |