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> |