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