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

Unified Diff: third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-reset.html

Issue 2960263002: [DevTools] Move pixel tests from inspector-protocol to inspector (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/device-mode/forced-viewport-reset.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-reset.html b/third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-reset.html
similarity index 62%
rename from third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-reset.html
rename to third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-reset.html
index 55f5b30f8f82b2fb6fb27794ffba5c626446d093..83bdf0487c26565e0fc5dd83972fb54e32658401 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-reset.html
+++ b/third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-reset.html
@@ -1,7 +1,7 @@
<html>
<head>
-<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
<style>
html {
@@ -36,19 +36,20 @@ body {
<script>
function test()
{
- InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunner.dumpAsTextWithPixelResults();"} );
-
- InspectorTest.sendCommand("Emulation.forceViewport", { "x": 200, "y": 9000, "scale": 2.0 }, overrideActive);
+ InspectorTest.evaluateInPage("testRunner.dumpAsTextWithPixelResults();", () => {
+ InspectorTest.EmulationAgent.invoke_forceViewport({x: 200, y: 9000, scale: 2.0}).then(overrideActive);
+ });
function overrideActive()
{
- InspectorTest.sendCommand("Emulation.resetViewport", {}, overrideCleared);
+ InspectorTest.EmulationAgent.invoke_resetViewport({}).then(overrideCleared);
}
function overrideCleared()
{
// Complete the test without closing the inspector, so that the override stays active for the picture.
- InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunner.notifyDone();"} );
+ InspectorTest.flushResults();
+ InspectorTest.evaluateInPage("testRunner.notifyDone();");
}
}
</script>

Powered by Google App Engine
This is Rietveld 408576698