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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html

Issue 2643723008: [devtools] Add a command to emulate the default background color. (Closed)
Patch Set: Force lifecycle update to CompositingCleanPlusScrolling. Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color-cleared.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html
new file mode 100644
index 0000000000000000000000000000000000000000..9fa08a2f40064e3a1293d50750916fcb1b339bd5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html
@@ -0,0 +1,35 @@
+<html>
+<head>
+
+<style>
+html {
+ margin: 0;
+}
+</style>
+
+<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunner.dumpAsTextWithPixelResults();"} );
+
+ InspectorTest.sendCommand("Emulation.setDefaultBackgroundColorOverride", { "color": { "r": 0x12, "g": 0x34, "b": 0x56, "a": 1.0 } }, backgroundColorSet);
+
+ function backgroundColorSet(messageObject) {
+ if (!!messageObject.result.exceptionDetails)
+ InspectorTest.log("FAIL: unexpected exception: " + JSON.stringify(messageObject, null, 2));
+
+ // Complete the test without closing the inspector, so that the override stays active for the picture.
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color-cleared.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698