summaryrefslogtreecommitdiffstats
path: root/layout/reftests/webcomponents/input-transition-1.html
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/webcomponents/input-transition-1.html')
-rw-r--r--layout/reftests/webcomponents/input-transition-1.html15
1 files changed, 11 insertions, 4 deletions
diff --git a/layout/reftests/webcomponents/input-transition-1.html b/layout/reftests/webcomponents/input-transition-1.html
index c11444d05..a4be5271b 100644
--- a/layout/reftests/webcomponents/input-transition-1.html
+++ b/layout/reftests/webcomponents/input-transition-1.html
@@ -7,9 +7,11 @@
<script>
var host, root;
- host = document.getElementById("host");
- root = host.attachShadow({mode: 'open'});
- root.innerHTML = '<style>input ~ div { background: red; transition: background 100ms; } input:checked ~ div { background: green; }</style><input id="one" type="checkbox"><div style="height: 50px; width: 50px;"></div>';
+ function run() {
+ host = document.getElementById("host");
+ root = host.createShadowRoot();
+ root.innerHTML = '<style>input ~ div { background: red; transition: background 100ms; } input:checked ~ div { background: green; }</style><input id="one" type="checkbox"><div style="height: 50px; width: 50px;"></div>';
+ }
function tweak() {
var el = root.getElementById("one");
@@ -19,7 +21,12 @@
});
}
- window.addEventListener("MozReftestInvalidate", tweak);
+ if (document.body.createShadowRoot) {
+ run();
+ window.addEventListener("MozReftestInvalidate", tweak);
+ } else {
+ document.documentElement.className = "";
+ }
</script>
</body>
</html>