| <html> |
| <head> |
| |
| <script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
| |
| <style> |
| body { |
| min-height: 2000px; |
| } |
| </style> |
| |
| <script> |
| function test() |
| { |
| InspectorTest.sendCommand("Runtime.evaluate", { "expression": "window.scrollTo(0, 200);"} ); |
| |
| InspectorTest.sendCommand("Page.getLayoutMetrics", {}, onGetLayoutMetrics); |
| |
| function onGetLayoutMetrics(message) |
| { |
| if (message.error) { |
| InspectorTest.log(message.error.message); |
| InspectorTest.completeTest(); |
| return; |
| } |
| |
| InspectorTest.logObject(message.result.layoutViewport, "LayoutViewport: "); |
| InspectorTest.logObject(message.result.visualViewport, "VisualViewport: "); |
| InspectorTest.completeTest(); |
| } |
| } |
| </script> |
| |
| </head> |
| <body onload="runTest()"> |
| <p> |
| Tests that Page.getLayoutMetrics returns reasonable values. |
| </p> |
| </body> |
| </html> |