Index: LayoutTests/fast/dom/HTMLLinkElement/transition-exiting-stylesheet-enable-disable.html |
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/transition-exiting-stylesheet-enable-disable.html b/LayoutTests/fast/dom/HTMLLinkElement/transition-exiting-stylesheet-enable-disable.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8750faee43e19da128a352594d3f7f254d1e449c |
--- /dev/null |
+++ b/LayoutTests/fast/dom/HTMLLinkElement/transition-exiting-stylesheet-enable-disable.html |
@@ -0,0 +1,46 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
esprehn
2014/10/15 18:01:26
leave out html, head and body.
Zhen Wang
2014/10/15 19:50:58
Done.
|
+<link rel="transition-exiting-stylesheet" type="text/css" href="resources/stylesheet.css"> |
+<script src="../../../resources/js-test.js"></script> |
+<script> |
+function checkResult() { |
esprehn
2014/10/15 18:01:26
onload = function() {
Zhen Wang
2014/10/15 19:50:58
Done.
|
+ testPassed("Fired Load event."); |
+ testStyle = window.getComputedStyle(document.getElementById("test"), null); |
esprehn
2014/10/15 18:01:26
Remove null second argument, you don't need it. Yo
Zhen Wang
2014/10/15 19:50:58
Done.
|
+ shouldBe('testStyle.color', '"rgb(0, 0, 0)"' /* black */); |
+ |
+ internals.enableExitTransitionStylesheets(); |
esprehn
2014/10/15 18:01:26
if (internals)
Zhen Wang
2014/10/15 19:50:58
Done.
|
+ window.setTimeout(checkEnable, 300); |
+} |
+ |
+function checkEnable() { |
+ testStyle = window.getComputedStyle(document.getElementById("test"), null); |
+ shouldBe('testStyle.color', '"rgb(0, 0, 255)"' /* blue */); |
+ |
+ internals.disableExitTransitionStylesheets(); |
esprehn
2014/10/15 18:01:26
ditto
Zhen Wang
2014/10/15 19:50:58
Done.
|
+ window.setTimeout(checkDisable, 300); |
+} |
+ |
+function checkDisable() { |
+ testStyle = window.getComputedStyle(document.getElementById("test"), null); |
+ shouldBe('testStyle.color', '"rgb(0, 0, 0)"' /* black */); |
+ |
+ finishJSTest(); |
+} |
+ |
+description('This test checks that transition-existing-stylesheet link resources are enabled and disabled correctly.'); |
+ |
+if (window.testRunner) { |
+ testRunner.waitUntilDone(); |
+ testRunner.dumpAsText(); |
+ testRunner.dumpResourceResponseMIMETypes(); |
+} |
+ |
+window.successfullyParsed = true; |
+window.jsTestIsAsync = true; |
+</script> |
+</head> |
+<body onload="checkResult()"> |
+<h1 id="test"><!-- Test element --></h1> |
+</body> |
+</html> |