| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <script src='../resources/testharness.js'></script> | |
| 3 <script src='../resources/testharnessreport.js'></script> | |
| 4 <style> | |
| 5 div { color: red; } | |
| 6 </style> | |
| 7 <div id='host'></div> | |
| 8 <div id='dummy'></div> | |
| 9 <script> | |
| 10 'use strict'; | |
| 11 | |
| 12 var root = host.createShadowRoot(); | |
| 13 root.innerHTML = '<style>:host(#host) { color: green; }</style>'; | |
| 14 | |
| 15 test(() => { | |
| 16 assert_equals(window.getComputedStyle(host).color, 'rgb(0, 128, 0)'); | |
| 17 // Trigger "V1" shadow cascading order. | |
| 18 dummy.attachShadow({mode: 'open'}); | |
| 19 assert_equals(window.getComputedStyle(host).color, 'rgb(255, 0, 0)'); | |
| 20 }, 'Upgrading V0 to V1 should cause style recalculation.'); | |
| 21 </script> | |
| OLD | NEW |