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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.js

Issue 2947303002: [DevTools] Migrate inspector-protocol/{page,dom-snapshot} tests to new harness (Closed)
Patch Set: rebased Created 3 years, 6 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.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.js
new file mode 100644
index 0000000000000000000000000000000000000000..be11743dc98eb4bba9e2a7dc5589e8879adc5fb6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.js
@@ -0,0 +1,21 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startHTML(`
+ <style>
+ body {
+ min-height: 2000px;
+ }
+ </style>
+ `, 'Tests that Page.getLayoutMetrics returns reasonable values.');
+
+ session.evaluate('window.scrollTo(0, 200);');
+ var message = await dp.Page.getLayoutMetrics();
+ if (message.error) {
+ testRunner.log(message.error.message);
+ testRunner.completeTest();
+ return;
+ }
+
+ testRunner.logObject(message.result.layoutViewport, 'LayoutViewport: ');
+ testRunner.logObject(message.result.visualViewport, 'VisualViewport: ');
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698