| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function getColorProperty(id) { | 6 function getColorProperty(id) { |
| 7 return window.getComputedStyle(document.getElementById(id)).color; | 7 return window.getComputedStyle(document.getElementById(id)).color; |
| 8 } | 8 } |
| 9 | 9 |
| 10 function log(message) { | 10 function log(message) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 <span id="span-child"></span> | 21 <span id="span-child"></span> |
| 22 </div> | 22 </div> |
| 23 </div> | 23 </div> |
| 24 <script> | 24 <script> |
| 25 description("Tests to ensure that updating the select rule in projection causes
style recalc."); | 25 description("Tests to ensure that updating the select rule in projection causes
style recalc."); |
| 26 | 26 |
| 27 var sr = document.getElementById("host").createShadowRoot(); | 27 var sr = document.getElementById("host").createShadowRoot(); |
| 28 sr.innerHTML = '<style>div { color: blue }</style><div><content id="contentId" s
elect="#div-child"></content></div>'; | 28 sr.innerHTML = '<style>div { color: blue }</style><div><content id="contentId" s
elect="#div-child"></content></div>'; |
| 29 | 29 |
| 30 shouldBe('getColorProperty("div-child")', '"rgb(0, 0, 255)"'); | 30 shouldBe('getColorProperty("div-child")', '"rgb(0, 0, 255)"'); |
| 31 shouldBe('getColorProperty("span-child")', '"rgb(255, 0, 0)"'); | 31 shouldBe('getColorProperty("span-child")', '"rgb(0, 0, 0)"'); |
| 32 | 32 |
| 33 sr.getElementById("contentId").select = "#span-child"; | 33 sr.getElementById("contentId").select = "#span-child"; |
| 34 shouldBe('getColorProperty("div-child")', '"rgb(255, 0, 0)"'); | 34 shouldBe('getColorProperty("div-child")', '"rgb(0, 0, 0)"'); |
| 35 shouldBe('getColorProperty("span-child")', '"rgb(0, 0, 255)"'); | 35 shouldBe('getColorProperty("span-child")', '"rgb(0, 0, 255)"'); |
| 36 | 36 |
| 37 if (window.testRunner) | 37 if (window.testRunner) |
| 38 testRunner.notifyDone(); | 38 testRunner.notifyDone(); |
| 39 </script> | 39 </script> |
| 40 </body> | 40 </body> |
| 41 </html> | 41 </html> |
| OLD | NEW |