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 16 matching lines...) Expand all Loading... |
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; | 33 sandbox.offsetTop; |
34 | 34 |
35 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 35 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
36 | 36 |
37 var host = getNodeInTreeOfTrees('shadow-host'); | 37 var host = getNodeInComposedTree('shadow-host'); |
38 var innerInput = getNodeInTreeOfTrees('shadow-host/inner-input'); | 38 var innerInput = getNodeInComposedTree('shadow-host/inner-input'); |
39 var lightdomInput = getNodeInTreeOfTrees('lightdom-input'); | 39 var lightdomInput = getNodeInComposedTree('lightdom-input'); |
40 var outerInput1 = getNodeInTreeOfTrees('outer-input1'); | 40 var outerInput1 = getNodeInComposedTree('outer-input1'); |
41 var outerInput2 = getNodeInTreeOfTrees('outer-input2'); | 41 var outerInput2 = getNodeInComposedTree('outer-input2'); |
42 | 42 |
43 debug('Test shadow host without tabindex'); | 43 debug('Test shadow host without tabindex'); |
44 outerInput1.focus(); | 44 outerInput1.focus(); |
45 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 45 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
46 outerInput2.focus(); | 46 outerInput2.focus(); |
47 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 47 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
48 innerInput.focus(); | 48 innerInput.focus(); |
49 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 49 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
50 lightdomInput.focus(); | 50 lightdomInput.focus(); |
51 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 51 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
(...skipping 22 matching lines...) Expand all Loading... |
74 innerInput.focus(); | 74 innerInput.focus(); |
75 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 75 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
76 lightdomInput.focus(); | 76 lightdomInput.focus(); |
77 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); | 77 backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)'); |
78 host.focus(); | 78 host.focus(); |
79 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); | 79 backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)'); |
80 } | 80 } |
81 | 81 |
82 testWithoutDelegatesFocus(); | 82 testWithoutDelegatesFocus(); |
83 </script> | 83 </script> |
OLD | NEW |