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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html

Issue 1638953002: [DevTools] Migrate device-emulation tests from OverridesSupport to inspector-protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/emulation/device-emulation-partial.html
diff --git a/third_party/WebKit/LayoutTests/inspector/device-emulation/device-emulation-partial.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html
similarity index 83%
rename from third_party/WebKit/LayoutTests/inspector/device-emulation/device-emulation-partial.html
rename to third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html
index d58f571ffa005ab211e1e11637de6a70aede6a88..03e0a44b7663cb56f9269ad7ec26b3908c866088 100644
--- a/third_party/WebKit/LayoutTests/inspector/device-emulation/device-emulation-partial.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html
@@ -1,7 +1,7 @@
<html>
<head>
-<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<style>
body {
@@ -32,7 +32,7 @@ function test()
function parse(json)
{
- callback(JSON.parse(json.value));
+ callback(JSON.parse(json));
}
}
@@ -42,11 +42,11 @@ function test()
{
var params = {width: 0, height: 0, deviceScaleFactor: 0, mobile: false, fitWindow: false};
if (name === null) {
- InspectorTest.PageAgent.clearDeviceMetricsOverride(getPageMetrics.bind(null, check));
+ InspectorTest.sendCommandOrDie("Emulation.clearDeviceMetricsOverride", {}, getPageMetrics.bind(null, check));
} else {
if (name)
params[name] = value;
- InspectorTest.PageAgent.invoke_setDeviceMetricsOverride(params, getPageMetrics.bind(null, check));
+ InspectorTest.sendCommandOrDie("Emulation.setDeviceMetricsOverride", params, getPageMetrics.bind(null, check));
}
function check(metrics)
@@ -55,12 +55,12 @@ function test()
for (var key in initialMetrics) {
var expected = key === name ? value : initialMetrics[key];
if (metrics[key] !== expected) {
- InspectorTest.addResult("[FAIL]: " + metrics[key] + " instead of " + expected + " for " + key);
+ InspectorTest.log("[FAIL]: " + metrics[key] + " instead of " + expected + " for " + key);
fail = true;
}
}
if (!fail)
- InspectorTest.addResult(name ? ("[PASS]: " + name + "=" + value) : "[PASS]");
+ InspectorTest.log(name ? ("[PASS]: " + name + "=" + value) : "[PASS]");
next();
}
}

Powered by Google App Engine
This is Rietveld 408576698