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

Unified 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, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html
new file mode 100644
index 0000000000000000000000000000000000000000..4b4230f15c2d5a2ec519018c570d2eee42f82e17
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html
@@ -0,0 +1,40 @@
+<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>

Powered by Google App Engine
This is Rietveld 408576698