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

Unified Diff: third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-near.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-near.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-near.html b/third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-near.html
similarity index 62%
rename from third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-near.html
rename to third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-near.html
index ff228e90a6535359a6c2101ec6cdc9ab80e50e60..811b629cd989a2d146f367c5752c63844897d0fa 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-near.html
+++ b/third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-near.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": 100, "y": 100, "scale": 1.0 }, firstOverrideActive);
+ InspectorTest.evaluateInPage("testRunner.dumpAsTextWithPixelResults();", () => {
+ InspectorTest.EmulationAgent.invoke_forceViewport({x: 100, y: 100, scale: 1.0}).then(firstOverrideActive);
+ });
function firstOverrideActive()
{
- InspectorTest.sendCommand("Emulation.forceViewport", { "x": 200, "y": 200, "scale": 2.0 }, secondOverrideActive);
+ InspectorTest.EmulationAgent.invoke_forceViewport({x: 200, y: 200, scale: 2.0}).then(secondOverrideActive);
}
function secondOverrideActive()
{
// 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