| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../resources/js-test.js"></script> |
| 3 <script src="resources/shadow-dom.js"></script> | 3 <script src="../fast/dom/shadow/resources/shadow-dom.js"></script> |
| 4 <style> | 4 <style> |
| 5 div { background-color: white; } | 5 div { background-color: white; } |
| 6 div:focus { background-color: green; } | 6 div:focus { background-color: green; } |
| 7 </style> | 7 </style> |
| 8 <body> | 8 <body> |
| 9 <div id="sandbox"></div> | 9 <div id="sandbox"></div> |
| 10 </body> | 10 </body> |
| 11 <script> | 11 <script> |
| 12 description('Test if :focus matching state of shadow host is properly handled in
case of DOM mutation.'); | 12 description('Test if :focus matching state of shadow host is properly handled in
case of DOM mutation.'); |
| 13 | 13 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 backgroundColorShouldBe('host', 'rgb(255, 255, 255)'); | 49 backgroundColorShouldBe('host', 'rgb(255, 255, 255)'); |
| 50 input.focus(); | 50 input.focus(); |
| 51 backgroundColorShouldBe('host', 'rgb(0, 128, 0)'); | 51 backgroundColorShouldBe('host', 'rgb(0, 128, 0)'); |
| 52 dest.appendChild(input); | 52 dest.appendChild(input); |
| 53 backgroundColorShouldBe('host', 'rgb(255, 255, 255)'); | 53 backgroundColorShouldBe('host', 'rgb(255, 255, 255)'); |
| 54 input.focus(); | 54 input.focus(); |
| 55 host.shadowRoot.appendChild(input); | 55 host.shadowRoot.appendChild(input); |
| 56 // appendChild() will blur the focus from input element, thus input is no longer
focused. | 56 // appendChild() will blur the focus from input element, thus input is no longer
focused. |
| 57 backgroundColorShouldBe('host', 'rgb(255, 255, 255)'); | 57 backgroundColorShouldBe('host', 'rgb(255, 255, 255)'); |
| 58 </script> | 58 </script> |
| OLD | NEW |