Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <style> | 4 <style> |
| 5 #content { background-color:green; width:40px; height:40px; } | 5 #content { background-color:green; width:40px; height:40px; } |
| 6 </style> | 6 </style> |
| 7 <div id="container"> | 7 <div id="container"> |
| 8 <div id="host"><canvas id="content"></canvas></div> | 8 <div id="host"><canvas id="content"></canvas></div> |
|
kochi
2015/12/09 08:57:34
Can this be in a separate CL?
hayato
2015/12/09 10:25:40
Done. This was unintentionally added.
| |
| 9 </div> | 9 </div> |
| 10 <script> | 10 <script> |
| 11 setup({ explicit_done: true }); | 11 setup({ explicit_done: true }); |
| 12 | 12 |
| 13 var host = document.getElementById("host"); | 13 var host = document.getElementById("host"); |
| 14 var root = host.createShadowRoot(); | 14 var root = host.createShadowRoot(); |
| 15 root.innerHTML = "<style>" | 15 root.innerHTML = "<style>" |
| 16 + "#distribute::before { background-color:red; content:''; display:inline-bl ock; width:40px; height:40px; transition:opacity .1s; }" | 16 + "#distribute::before { background-color:red; content:''; display:inline-bl ock; width:40px; height:40px; transition:opacity .1s; }" |
| 17 + "#distribute.checked::before { opacity:0; }" | 17 + "#distribute.checked::before { opacity:0; }" |
| 18 + "</style><div id=distribute><content></content></div>"; | 18 + "</style><div id=distribute><content></content></div>"; |
| 19 var distribute = root.querySelector("#distribute"); | 19 var distribute = root.querySelector("#distribute"); |
| 20 distribute.addEventListener("transitionend", function (e) { | 20 distribute.addEventListener("transitionend", function (e) { |
| 21 test(function () { | 21 test(function () { |
| 22 assert_equals(e.target.id, "distribute"); | 22 assert_equals(e.target.id, "distribute"); |
| 23 }, "transitionend in Shadow DOM raised without ASSERT failures"); | 23 }, "transitionend in Shadow DOM raised without ASSERT failures"); |
| 24 | 24 |
| 25 if (window.testRunner) | 25 if (window.testRunner) |
| 26 container.style.display = "none"; | 26 container.style.display = "none"; |
| 27 done(); | 27 done(); |
| 28 }); | 28 }); |
| 29 | 29 |
| 30 window.onload = function () { | 30 window.onload = function () { |
| 31 distribute.className = "checked"; | 31 distribute.className = "checked"; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 </script> | 34 </script> |
| OLD | NEW |