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="../fast/dom/shadow/resources/shadow-dom.js"></script> | 3 <script src="../fast/dom/shadow/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 16 matching lines...) Expand all Loading... |
27 document.createTextNode('div { background-color: yellow;
} div#inner-shadow-host:focus { background-color: blue; }')), | 27 document.createTextNode('div { background-color: yellow;
} div#inner-shadow-host:focus { background-color: blue; }')), |
28 createDOM('div', {'id': 'inner-div'}, | 28 createDOM('div', {'id': 'inner-div'}, |
29 document.createTextNode('Blink')), | 29 document.createTextNode('Blink')), |
30 createDOM('input', {'id': 'inner-input'}), | 30 createDOM('input', {'id': 'inner-input'}), |
31 createDOM('div', {'id': 'inner-shadow-host'}, | 31 createDOM('div', {'id': 'inner-shadow-host'}, |
32 attachShadow( | 32 attachShadow( |
33 {'mode': 'open', 'delegatesFocus': delegatesFocus2}, | 33 {'mode': 'open', 'delegatesFocus': delegatesFocus2}, |
34 createDOM('div', {'id': 'inner-div2'}, | 34 createDOM('div', {'id': 'inner-div2'}, |
35 document.createTextNode('Blink')), | 35 document.createTextNode('Blink')), |
36 createDOM('input', {'id': 'inner-input2'}))))))); | 36 createDOM('input', {'id': 'inner-input2'}))))))); |
37 sandbox.offsetTop; | |
38 } | 37 } |
39 | 38 |
40 function testShadowComposedTree() { | 39 function testShadowComposedTree() { |
41 debug('testing shadow composed tree'); | 40 debug('testing shadow composed tree'); |
42 | 41 |
43 debug('(1/4) both shadow hosts\' delegateFocus are false'); | 42 debug('(1/4) both shadow hosts\' delegateFocus are false'); |
44 buildShadowComposedTree(false, false); | 43 buildShadowComposedTree(false, false); |
45 | 44 |
46 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 45 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
47 backgroundColorShouldBe('shadow-host/inner-shadow-host', 'rgb(255, 255, 0)')
; | 46 backgroundColorShouldBe('shadow-host/inner-shadow-host', 'rgb(255, 255, 0)')
; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 host.focus(); | 141 host.focus(); |
143 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 142 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
144 backgroundColorShouldBe('shadow-host/inner-shadow-host', 'rgb(255, 255, 0)')
; | 143 backgroundColorShouldBe('shadow-host/inner-shadow-host', 'rgb(255, 255, 0)')
; |
145 innerHost.focus(); | 144 innerHost.focus(); |
146 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 145 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
147 backgroundColorShouldBe('shadow-host/inner-shadow-host', 'rgb(0, 0, 255)'); | 146 backgroundColorShouldBe('shadow-host/inner-shadow-host', 'rgb(0, 0, 255)'); |
148 } | 147 } |
149 | 148 |
150 testShadowComposedTree(); | 149 testShadowComposedTree(); |
151 </script> | 150 </script> |
OLD | NEW |