Commit d8f82289 authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Fix dark mode by adding missing background color

Also add render test.

Bug: 1146983
Change-Id: I3c411741e9043ff780708bed3a49e07b4a197453
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2526443
Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Ehimare Okoyomon <eokoyomon@chromium.org>
Reviewed-by: default avatarEhimare Okoyomon <eokoyomon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825411}
parent 3db438d5
...@@ -18,6 +18,7 @@ import static org.hamcrest.CoreMatchers.containsString; ...@@ -18,6 +18,7 @@ import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.chromium.chrome.browser.preferences.ChromePreferenceKeys.UI_THEME_SETTING;
import static org.chromium.chrome.test.util.ViewUtils.onViewWaiting; import static org.chromium.chrome.test.util.ViewUtils.onViewWaiting;
import static org.chromium.components.content_settings.PrefNames.COOKIE_CONTROLS_MODE; import static org.chromium.components.content_settings.PrefNames.COOKIE_CONTROLS_MODE;
...@@ -38,7 +39,9 @@ import org.chromium.base.test.util.DisabledTest; ...@@ -38,7 +39,9 @@ import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Feature;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.browser.night_mode.ThemeType;
import org.chromium.chrome.browser.notifications.channels.SiteChannelsManager; import org.chromium.chrome.browser.notifications.channels.SiteChannelsManager;
import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.ChromeTabbedActivityTestRule;
...@@ -305,6 +308,22 @@ public class PageInfoViewTest { ...@@ -305,6 +308,22 @@ public class PageInfoViewTest {
mRenderTestRule.render(getPageInfoView(), "PageInfo_SecureWebsiteV2"); mRenderTestRule.render(getPageInfoView(), "PageInfo_SecureWebsiteV2");
} }
/**
* Tests the new PageInfo UI on a secure website in dark mode.
*/
@Test
@MediumTest
@Feature({"RenderTest"})
@Features.EnableFeatures(PageInfoFeatureList.PAGE_INFO_V2)
public void testShowOnSecureWebsiteDarkV2() throws IOException {
TestThreadUtils.runOnUiThreadBlocking(() -> {
SharedPreferencesManager.getInstance().writeInt(UI_THEME_SETTING, ThemeType.DARK);
});
mActivityTestRule.startMainActivityOnBlankPage();
loadUrlAndOpenPageInfo(mTestServerRule.getServer().getURL(sSimpleHtml));
mRenderTestRule.render(getPageInfoView(), "PageInfo_SecureWebsiteDarkV2");
}
/** /**
* Tests the connection info page of the new PageInfo UI. * Tests the connection info page of the new PageInfo UI.
*/ */
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/sheet_bg_color"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
......
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