OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 | 3 |
4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
5 body { | 5 body { |
6 margin: 0; | 6 margin: 0; |
7 } | 7 } |
8 | 8 |
9 #main { | 9 #main { |
10 width: 1024px; | 10 width: 1024px; |
11 } | 11 } |
12 </style> | 12 </style> |
13 | 13 |
14 <script src="../../http/tests/inspector/inspector-test.js"></script> | 14 <script src="../../http/tests/inspector/inspector-test.js"></script> |
15 <script> | 15 <script> |
16 | 16 |
17 function mainElement() | 17 function mainElement() |
18 { | 18 { |
19 return document.getElementById("main"); | 19 return document.getElementById("main"); |
20 } | 20 } |
21 | 21 |
22 function getDimensions() | 22 function getDimensions() |
23 { | 23 { |
| 24 if (!window.internals) |
| 25 return "Internals is required"; |
24 return JSON.stringify({ | 26 return JSON.stringify({ |
25 width: document.width, | 27 width: internals.unscaledViewportRect().width, |
26 height: document.height, | 28 height: internals.unscaledViewportRect().height, |
27 mainWidth: mainElement().offsetWidth, | 29 mainWidth: mainElement().offsetWidth, |
28 mainHeight: mainElement().offsetHeight, | 30 mainHeight: mainElement().offsetHeight, |
29 innerWidth: window.innerWidth, | 31 innerWidth: window.innerWidth, |
30 innerHeight: window.innerHeight | 32 innerHeight: window.innerHeight |
31 }); | 33 }); |
32 } | 34 } |
33 | 35 |
34 function test() | 36 function test() |
35 { | 37 { |
36 PageAgent.enable(); | 38 PageAgent.enable(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 | 116 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 |
115 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 | 117 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 |
116 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 | 118 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 |
117 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 | 119 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 |
118 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 | 120 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 |
119 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 | 121 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 |
120 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 | 122 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 |
121 </div> | 123 </div> |
122 </body> | 124 </body> |
123 </html> | 125 </html> |
OLD | NEW |