Commit 9146066c authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Added WebView test for meta color-scheme.

Check that a dark color-scheme meta results in a dark content background
color for the web view.

Bug: 1103667
Change-Id: If71c3211a4ae54af9826d925517a7ec79cdef76d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440595Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812873}
parent 25de7bc1
...@@ -70,6 +70,12 @@ public class AwContentsRenderTest { ...@@ -70,6 +70,12 @@ public class AwContentsRenderTest {
setBackgroundColorOnUiThread(Color.YELLOW); setBackgroundColorOnUiThread(Color.YELLOW);
GraphicsTestUtils.pollForBackgroundColor(mAwContents, Color.YELLOW); GraphicsTestUtils.pollForBackgroundColor(mAwContents, Color.YELLOW);
final String html_meta = "<html><head><meta name=color-scheme content=dark></head></html>";
mActivityTestRule.loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
"data:text/html," + html_meta);
final int dark_scheme_color = 0xFF121212;
GraphicsTestUtils.pollForBackgroundColor(mAwContents, dark_scheme_color);
final String html = "<html><head><style>body {background-color:#227788}</style></head>" final String html = "<html><head><style>body {background-color:#227788}</style></head>"
+ "<body></body></html>"; + "<body></body></html>";
// Loading the html via a data URI requires us to encode '#' symbols as '%23'. // Loading the html via a data URI requires us to encode '#' symbols as '%23'.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment