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 12 matching lines...) Expand all Loading... |
23 sandbox.innerHTML = ''; | 23 sandbox.innerHTML = ''; |
24 sandbox.appendChild( | 24 sandbox.appendChild( |
25 createDOM('div', {}, | 25 createDOM('div', {}, |
26 createDOM('input', {'id': 'outer-input1'}), | 26 createDOM('input', {'id': 'outer-input1'}), |
27 createDOM('div', {'id': 'shadow-host'}, | 27 createDOM('div', {'id': 'shadow-host'}, |
28 createDOM('input', {'id': 'lightdom-input'}), | 28 createDOM('input', {'id': 'lightdom-input'}), |
29 createShadowRoot( | 29 createShadowRoot( |
30 createDOM('content'), | 30 createDOM('content'), |
31 createDOM('input', {'id': 'inner-input'}))), | 31 createDOM('input', {'id': 'inner-input'}))), |
32 createDOM('input', {'id': 'outer-input2'}))); | 32 createDOM('input', {'id': 'outer-input2'}))); |
33 sandbox.offsetTop; | |
34 | 33 |
35 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 34 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
36 | 35 |
37 var host = getNodeInComposedTree('shadow-host'); | 36 var host = getNodeInComposedTree('shadow-host'); |
38 var innerInput = getNodeInComposedTree('shadow-host/inner-input'); | 37 var innerInput = getNodeInComposedTree('shadow-host/inner-input'); |
39 var lightdomInput = getNodeInComposedTree('lightdom-input'); | 38 var lightdomInput = getNodeInComposedTree('lightdom-input'); |
40 var outerInput1 = getNodeInComposedTree('outer-input1'); | 39 var outerInput1 = getNodeInComposedTree('outer-input1'); |
41 var outerInput2 = getNodeInComposedTree('outer-input2'); | 40 var outerInput2 = getNodeInComposedTree('outer-input2'); |
42 | 41 |
43 debug('Test shadow host without tabindex'); | 42 debug('Test shadow host without tabindex'); |
(...skipping 30 matching lines...) Expand all Loading... |
74 innerInput.focus(); | 73 innerInput.focus(); |
75 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 74 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
76 lightdomInput.focus(); | 75 lightdomInput.focus(); |
77 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 76 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
78 host.focus(); | 77 host.focus(); |
79 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 78 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
80 } | 79 } |
81 | 80 |
82 testWithoutDelegatesFocus(); | 81 testWithoutDelegatesFocus(); |
83 </script> | 82 </script> |
OLD | NEW |