Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1817)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html

Issue 2438023003: devtools: Adds Page.getLayoutMetrics. (Closed)
Patch Set: address comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698