| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 | |
| 4 <script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></s
cript> | |
| 5 | |
| 6 <style> | |
| 7 body { | |
| 8 min-height: 2000px; | |
| 9 } | |
| 10 </style> | |
| 11 | |
| 12 <script> | |
| 13 function test() | |
| 14 { | |
| 15 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "window.scroll
To(0, 200);"} ); | |
| 16 | |
| 17 InspectorTest.sendCommand("Page.getLayoutMetrics", {}, onGetLayoutMetrics); | |
| 18 | |
| 19 function onGetLayoutMetrics(message) | |
| 20 { | |
| 21 if (message.error) { | |
| 22 InspectorTest.log(message.error.message); | |
| 23 InspectorTest.completeTest(); | |
| 24 return; | |
| 25 } | |
| 26 | |
| 27 InspectorTest.logObject(message.result.layoutViewport, "LayoutViewport:
"); | |
| 28 InspectorTest.logObject(message.result.visualViewport, "VisualViewport:
"); | |
| 29 InspectorTest.completeTest(); | |
| 30 } | |
| 31 } | |
| 32 </script> | |
| 33 | |
| 34 </head> | |
| 35 <body onload="runTest()"> | |
| 36 <p> | |
| 37 Tests that Page.getLayoutMetrics returns reasonable values. | |
| 38 </p> | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |