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

Side by Side Diff: chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc

Issue 2915143002: VR: Soften the floor grid (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/vr_shell/ui_scene_manager.h" 5 #include "chrome/browser/android/vr_shell/ui_scene_manager.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/test/scoped_task_environment.h" 8 #include "base/test/scoped_task_environment.h"
9 #include "chrome/browser/android/vr_shell/ui_elements/ui_element.h" 9 #include "chrome/browser/android/vr_shell/ui_elements/ui_element.h"
10 #include "chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h" 10 #include "chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 manager_->SetIncognito(false); 190 manager_->SetIncognito(false);
191 191
192 { 192 {
193 SCOPED_TRACE("Exited Incognito"); 193 SCOPED_TRACE("Exited Incognito");
194 EXPECT_EQ(initial_background, scene_->GetBackgroundColor()); 194 EXPECT_EQ(initial_background, scene_->GetBackgroundColor());
195 } 195 }
196 } 196 }
197 197
198 TEST_F(UiSceneManagerTest, UiUpdatesForFullscreenChanges) { 198 TEST_F(UiSceneManagerTest, UiUpdatesForFullscreenChanges) {
199 std::set<UiElementDebugId> visible_in_browsing = { 199 std::set<UiElementDebugId> visible_in_browsing = {
200 UiElementDebugId::kContentQuad, UiElementDebugId::kBackplane, 200 UiElementDebugId::kContentQuad, UiElementDebugId::kBackplane,
201 UiElementDebugId::kCeiling, UiElementDebugId::kFloor, 201 UiElementDebugId::kCeiling, UiElementDebugId::kFloor,
202 UiElementDebugId::kFloorGrid, UiElementDebugId::kUrlBar, 202 UiElementDebugId::kUrlBar, UiElementDebugId::kLoadingIndicator};
203 UiElementDebugId::kLoadingIndicator};
204 std::set<UiElementDebugId> visible_in_fullscreen = { 203 std::set<UiElementDebugId> visible_in_fullscreen = {
205 UiElementDebugId::kContentQuad, UiElementDebugId::kBackplane, 204 UiElementDebugId::kContentQuad, UiElementDebugId::kBackplane,
206 UiElementDebugId::kCeiling, UiElementDebugId::kFloor, 205 UiElementDebugId::kCeiling, UiElementDebugId::kFloor};
207 UiElementDebugId::kFloorGrid};
208 206
209 MakeManager(kNotInCct, kNotInWebVr); 207 MakeManager(kNotInCct, kNotInWebVr);
210 208
211 // Hold onto the background color to make sure it changes. 209 // Hold onto the background color to make sure it changes.
212 SkColor initial_background = scene_->GetBackgroundColor(); 210 SkColor initial_background = scene_->GetBackgroundColor();
213 211
214 for (const auto& element : scene_->GetUiElements()) { 212 for (const auto& element : scene_->GetUiElements()) {
215 SCOPED_TRACE(element->debug_id()); 213 SCOPED_TRACE(element->debug_id());
216 bool should_be_visible = visible_in_browsing.find(element->debug_id()) != 214 bool should_be_visible = visible_in_browsing.find(element->debug_id()) !=
217 visible_in_browsing.end(); 215 visible_in_browsing.end();
(...skipping 27 matching lines...) Expand all
245 visible_in_browsing.end(); 243 visible_in_browsing.end();
246 EXPECT_EQ(should_be_visible, element->visible()); 244 EXPECT_EQ(should_be_visible, element->visible());
247 } 245 }
248 { 246 {
249 SCOPED_TRACE("Exited Fullsceen"); 247 SCOPED_TRACE("Exited Fullsceen");
250 EXPECT_EQ(initial_background, scene_->GetBackgroundColor()); 248 EXPECT_EQ(initial_background, scene_->GetBackgroundColor());
251 } 249 }
252 } 250 }
253 251
254 } // namespace vr_shell 252 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698