OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <link rel="transition-exiting-stylesheet" type="text/css" href="resources/styles
heet.css"> |
| 3 <script src="../../../resources/js-test.js"></script> |
| 4 <script> |
| 5 onload = function() { |
| 6 testPassed("Fired Load event."); |
| 7 testStyle = getComputedStyle(document.getElementById("test")); |
| 8 shouldBe('testStyle.color', '"rgb(0, 0, 0)"' /* black */); |
| 9 |
| 10 if (internals) |
| 11 internals.enableExitTransitionStylesheets(); |
| 12 window.setTimeout(checkEnable, 300); |
| 13 } |
| 14 |
| 15 function checkEnable() { |
| 16 testStyle = getComputedStyle(document.getElementById("test")); |
| 17 shouldBe('testStyle.color', '"rgb(0, 0, 255)"' /* blue */); |
| 18 |
| 19 if (internals) |
| 20 internals.disableExitTransitionStylesheets(); |
| 21 window.setTimeout(checkDisable, 300); |
| 22 } |
| 23 |
| 24 function checkDisable() { |
| 25 testStyle = getComputedStyle(document.getElementById("test")); |
| 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 <h1 id="test"><!-- Test element --></h1> |
OLD | NEW |