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

Unified Diff: third_party/WebKit/LayoutTests/inspector/device-mode/default-background-color.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/default-background-color.html
diff --git a/third_party/WebKit/LayoutTests/inspector/device-mode/default-background-color.html b/third_party/WebKit/LayoutTests/inspector/device-mode/default-background-color.html
new file mode 100644
index 0000000000000000000000000000000000000000..16f57a4883a386bc961716a1c5d0eb15000ead73
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/device-mode/default-background-color.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+
+<style>
+html {
+ margin: 0;
+}
+</style>
+
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+
+<script>
+function test()
+{
+ InspectorTest.evaluateInPage("testRunner.dumpAsTextWithPixelResults();", () => {
+ InspectorTest.EmulationAgent.invoke_setDefaultBackgroundColorOverride({color: {r: 0x12, g: 0x34, b: 0x56, a: 1.0}}).then(backgroundColorSet);
+ });
+
+ function backgroundColorSet(messageObject) {
+ if (messageObject[Protocol.Error])
+ InspectorTest.log("FAIL: unexpected exception: " + messageObject[Protocol.Error]);
+
+ // Complete the test without closing the inspector, so that the override stays active for the picture.
+ InspectorTest.flushResults();
+ InspectorTest.evaluateInPage("testRunner.notifyDone();");
+ }
+}
+</script>
+
+</head>
+<body onload="runTest()">
+<p>
+Tests that Emulation.setDefaultBackgroundColorOverride changes the background color of a page that does not specify one.
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698