OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <template id='template'> | 4 <template id='template'> |
5 <style> | 5 <style> |
6 div { | 6 div { |
7 background-color: rgb(255, 0, 0); | 7 background-color: rgb(255, 0, 0); |
8 } | 8 } |
9 div:hover { | 9 div:hover { |
10 background-color: rgb(0, 128, 0); | 10 background-color: rgb(0, 128, 0); |
(...skipping 20 matching lines...) Expand all Loading... |
31 color: rgb(0, 0, 255); | 31 color: rgb(0, 0, 255); |
32 } | 32 } |
33 </style> | 33 </style> |
34 </head> | 34 </head> |
35 <body> | 35 <body> |
36 <div id='host'>Top-level text <span>Nested text</span></div> | 36 <div id='host'>Top-level text <span>Nested text</span></div> |
37 <div id='other'>Other div</div> | 37 <div id='other'>Other div</div> |
38 <pre id='console'></pre> | 38 <pre id='console'></pre> |
39 </body> | 39 </body> |
40 | 40 |
41 <script src="../../js/resources/js-test-pre.js"></script> | 41 <script src="../../../resources/js-test.js"></script> |
42 <script> | 42 <script> |
43 var backgroundColor, textColor; | 43 var backgroundColor, textColor; |
44 | 44 |
45 function shouldHaveBackgroundColor(element, bg) { | 45 function shouldHaveBackgroundColor(element, bg) { |
46 backgroundColor = getComputedStyle(element, null).getPropertyValue("backgrou
nd-color") | 46 backgroundColor = getComputedStyle(element, null).getPropertyValue("backgrou
nd-color") |
47 shouldBeEqualToString('backgroundColor', bg) | 47 shouldBeEqualToString('backgroundColor', bg) |
48 } | 48 } |
49 | 49 |
50 function shouldHaveTextColor(element, col) { | 50 function shouldHaveTextColor(element, col) { |
51 textColor = getComputedStyle(element, null).getPropertyValue("color") | 51 textColor = getComputedStyle(element, null).getPropertyValue("color") |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 eventSender.mouseMoveTo(topTextPosX, topTextPosY); | 100 eventSender.mouseMoveTo(topTextPosX, topTextPosY); |
101 shouldHaveBackgroundColor(div, 'rgb(0, 128, 0)'); | 101 shouldHaveBackgroundColor(div, 'rgb(0, 128, 0)'); |
102 eventSender.mouseDown(); | 102 eventSender.mouseDown(); |
103 shouldHaveBackgroundColor(div, 'rgb(0, 255, 255)'); | 103 shouldHaveBackgroundColor(div, 'rgb(0, 255, 255)'); |
104 eventSender.mouseUp(); | 104 eventSender.mouseUp(); |
105 shouldHaveBackgroundColor(div, 'rgb(0, 128, 0)'); | 105 shouldHaveBackgroundColor(div, 'rgb(0, 128, 0)'); |
106 eventSender.mouseMoveTo(otherPosX, otherPosY); | 106 eventSender.mouseMoveTo(otherPosX, otherPosY); |
107 shouldHaveBackgroundColor(div, 'rgb(255, 0, 0)'); | 107 shouldHaveBackgroundColor(div, 'rgb(255, 0, 0)'); |
108 </script> | 108 </script> |
109 </html> | 109 </html> |
OLD | NEW |