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

Unified Diff: chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc

Issue 2911943002: [vr] Add incognito coloring (Closed)
Patch Set: Created 3 years, 7 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 | « chrome/browser/android/vr_shell/ui_scene_manager.cc ('k') | chrome/browser/android/vr_shell/vr_gl_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
index dadafd9b05da0ab0405b79fec195e6a7ea8b448b..ae49e7c7c3fa006c0a658521e206a6073c162e3b 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
@@ -140,6 +140,61 @@ TEST_F(UiSceneManagerTest, CctButtonVisibleInCct) {
EXPECT_TRUE(IsVisible(kCloseButton));
}
+TEST_F(UiSceneManagerTest, UiUpdatesForIncognito) {
+ MakeManager(kNotInCct, kNotInWebVr);
+
+ // Hold onto the background color to make sure it changes.
+ SkColor initial_background = scene_->GetBackgroundColor();
+ manager_->SetFullscreen(true);
+
+ {
+ SCOPED_TRACE("Entered Fullsceen");
+ // Make sure background has changed for fullscreen.
+ EXPECT_NE(initial_background, scene_->GetBackgroundColor());
+ }
+
+ SkColor fullscreen_background = scene_->GetBackgroundColor();
+
+ manager_->SetIncognito(true);
+
+ {
+ SCOPED_TRACE("Entered Incognito");
+ // Make sure background has changed for incognito.
+ EXPECT_NE(fullscreen_background, scene_->GetBackgroundColor());
+ EXPECT_NE(initial_background, scene_->GetBackgroundColor());
+ }
+
+ SkColor incognito_background = scene_->GetBackgroundColor();
+
+ manager_->SetIncognito(false);
+
+ {
+ SCOPED_TRACE("Exited Incognito");
+ EXPECT_EQ(fullscreen_background, scene_->GetBackgroundColor());
+ }
+
+ manager_->SetFullscreen(false);
+
+ {
+ SCOPED_TRACE("Exited Fullsceen");
+ EXPECT_EQ(initial_background, scene_->GetBackgroundColor());
+ }
+
+ manager_->SetIncognito(true);
+
+ {
+ SCOPED_TRACE("Entered Incognito");
+ EXPECT_EQ(incognito_background, scene_->GetBackgroundColor());
+ }
+
+ manager_->SetIncognito(false);
+
+ {
+ SCOPED_TRACE("Exited Incognito");
+ EXPECT_EQ(initial_background, scene_->GetBackgroundColor());
+ }
+}
+
TEST_F(UiSceneManagerTest, UiUpdatesForFullscreenChanges) {
std::set<UiElementDebugId> visible_in_browsing = {
UiElementDebugId::kContentQuad, UiElementDebugId::kBackplane,
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.cc ('k') | chrome/browser/android/vr_shell/vr_gl_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698