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="resources/shadow-dom.js"></script> |
4 <style> | 4 <style> |
5 div { | 5 div { |
6 background-color: white; | 6 background-color: white; |
7 } | 7 } |
8 | 8 |
9 div#shadow-host:focus { | 9 div#shadow-host:focus { |
10 background-color: green; | 10 background-color: green; |
(...skipping 22 matching lines...) Expand all Loading... |
33 createShadowRoot( | 33 createShadowRoot( |
34 {'delegatesFocus': true}, | 34 {'delegatesFocus': true}, |
35 createDOM('shadow', {}), | 35 createDOM('shadow', {}), |
36 createDOM('div', {'id': 'inner-div2'}, | 36 createDOM('div', {'id': 'inner-div2'}, |
37 document.createTextNode('Blink')), | 37 document.createTextNode('Blink')), |
38 createDOM('input', {'id': 'younger-input'}))))); | 38 createDOM('input', {'id': 'younger-input'}))))); |
39 sandbox.offsetTop; | 39 sandbox.offsetTop; |
40 | 40 |
41 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 41 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
42 | 42 |
43 var host = getNodeInTreeOfTrees('shadow-host'); | 43 var host = getNodeInComposedTree('shadow-host'); |
44 var outerInput = getNodeInTreeOfTrees('outer-input'); | 44 var outerInput = getNodeInComposedTree('outer-input'); |
45 var lightInput = getNodeInTreeOfTrees('light-input'); | 45 var lightInput = getNodeInComposedTree('light-input'); |
46 var olderInput = getNodeInTreeOfTrees('shadow-host/older-input'); | 46 var olderInput = getNodeInComposedTree('shadow-host/older-input'); |
47 var youngerInput = getNodeInTreeOfTrees('shadow-host//younger-input'); | 47 var youngerInput = getNodeInComposedTree('shadow-host//younger-input'); |
48 | 48 |
49 debug('(1/3) shadow host without tabindex'); | 49 debug('(1/3) shadow host without tabindex'); |
50 outerInput.focus(); | 50 outerInput.focus(); |
51 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 51 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
52 lightInput.focus(); | 52 lightInput.focus(); |
53 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 53 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
54 olderInput.focus(); | 54 olderInput.focus(); |
55 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 55 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
56 youngerInput.focus(); | 56 youngerInput.focus(); |
57 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 57 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
(...skipping 22 matching lines...) Expand all Loading... |
80 olderInput.focus(); | 80 olderInput.focus(); |
81 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 81 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
82 youngerInput.focus(); | 82 youngerInput.focus(); |
83 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 83 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
84 host.focus(); | 84 host.focus(); |
85 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 85 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
86 } | 86 } |
87 | 87 |
88 testDistributedNodes(); | 88 testDistributedNodes(); |
89 </script> | 89 </script> |
OLD | NEW |