|
Line 0
a/LayoutTests/fast/html/clone-keygen.html_sec1
|
|
|
1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<script src="../js/resources/js-test-pre.js"></script> |
| 5 |
<link rel="stylesheet" href="../js/resources/js-test-style.css"> |
| 6 |
<style type="text/css"> |
| 7 |
*::-webkit-keygen-select { |
| 8 |
color: purple; |
| 9 |
zoom: 1.5; /* to work around bug 57966 */ |
| 10 |
} |
| 11 |
</style> |
| 12 |
</head> |
| 13 |
<body> |
| 14 |
<p> |
| 15 |
Tests that a cloned keygen has the right shadow pseudo ID. You should |
| 16 |
see two big keygens with purple text (they should look the same.) |
| 17 |
</p> |
| 18 |
<keygen id="k" style="display: block;"> |
| 19 |
<div id="console"></div> |
| 20 |
<script> |
| 21 |
var k = document.querySelector('#k'); |
| 22 |
var specialK = k.cloneNode(); |
| 23 |
|
| 24 |
k.insertAdjacentElement('afterEnd', specialK); |
| 25 |
|
| 26 |
shouldBe('specialK.clientHeight', 'k.clientHeight'); |
| 27 |
|
| 28 |
if (window.layoutTestController) { |
| 29 |
var kShadow = layoutTestController.shadowRoot(k); |
| 30 |
var cloneShadow = layoutTestController.shadowRoot(specialK); |
| 31 |
shouldBe('layoutTestController.shadowPseudoId(cloneShadow.firstChild)', |
| 32 |
'layoutTestController.shadowPseudoId(kShadow.firstChild)'); |
| 33 |
} |
| 34 |
|
| 35 |
var successfullyParsed = true; |
| 36 |
</script> |
| 37 |
<script src="../js/resources/js-test-post.js"></script> |
| 38 |
</body> |
| 39 |
</html> |