OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
esprehn
2014/10/15 18:01:26
leave out html, head and body.
Zhen Wang
2014/10/15 19:50:58
Done.
| |
4 <link rel="transition-exiting-stylesheet" type="text/css" href="resources/styles heet.css"> | |
5 <script src="../../../resources/js-test.js"></script> | |
6 <script> | |
7 function checkResult() { | |
esprehn
2014/10/15 18:01:26
onload = function() {
Zhen Wang
2014/10/15 19:50:58
Done.
| |
8 testPassed("Fired Load event."); | |
9 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.
| |
10 shouldBe('testStyle.color', '"rgb(0, 0, 0)"' /* black */); | |
11 | |
12 internals.enableExitTransitionStylesheets(); | |
esprehn
2014/10/15 18:01:26
if (internals)
Zhen Wang
2014/10/15 19:50:58
Done.
| |
13 window.setTimeout(checkEnable, 300); | |
14 } | |
15 | |
16 function checkEnable() { | |
17 testStyle = window.getComputedStyle(document.getElementById("test"), null); | |
18 shouldBe('testStyle.color', '"rgb(0, 0, 255)"' /* blue */); | |
19 | |
20 internals.disableExitTransitionStylesheets(); | |
esprehn
2014/10/15 18:01:26
ditto
Zhen Wang
2014/10/15 19:50:58
Done.
| |
21 window.setTimeout(checkDisable, 300); | |
22 } | |
23 | |
24 function checkDisable() { | |
25 testStyle = window.getComputedStyle(document.getElementById("test"), null); | |
26 shouldBe('testStyle.color', '"rgb(0, 0, 0)"' /* black */); | |
27 | |
28 finishJSTest(); | |
29 } | |
30 | |
31 description('This test checks that transition-existing-stylesheet link resources are enabled and disabled correctly.'); | |
32 | |
33 if (window.testRunner) { | |
34 testRunner.waitUntilDone(); | |
35 testRunner.dumpAsText(); | |
36 testRunner.dumpResourceResponseMIMETypes(); | |
37 } | |
38 | |
39 window.successfullyParsed = true; | |
40 window.jsTestIsAsync = true; | |
41 </script> | |
42 </head> | |
43 <body onload="checkResult()"> | |
44 <h1 id="test"><!-- Test element --></h1> | |
45 </body> | |
46 </html> | |
OLD | NEW |