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

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

Issue 2906423002: [vr] Migrate from vr::Colorf to SkColor (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_shell_gl.cc » ('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 e88d601f3b3f548d84ec74ea7644e271e390edbb..9247280109911074542523e2dfc53a425cb07002 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
@@ -84,11 +84,6 @@ class UiSceneManagerTest : public testing::Test {
std::unique_ptr<MockBrowserInterface> browser_;
std::unique_ptr<UiScene> scene_;
std::unique_ptr<UiSceneManager> manager_;
-
- bool ColorEquals(vr::Colorf expected, vr::Colorf actual) {
- return (expected.r == actual.r) && (expected.g == actual.g) &&
- (expected.b == actual.b) && (expected.a == actual.a);
- }
};
TEST_F(UiSceneManagerTest, ExitPresentAndFullscreenOnAppButtonClick) {
@@ -158,7 +153,7 @@ TEST_F(UiSceneManagerTest, UiUpdatesForFullscreenChanges) {
MakeManager(kNotInCct, kNotInWebVr);
// Hold onto the background color to make sure it changes.
- vr::Colorf initial_background = scene_->GetBackgroundColor();
+ SkColor initial_background = scene_->GetBackgroundColor();
for (const auto& element : scene_->GetUiElements()) {
SCOPED_TRACE(element->debug_id());
@@ -181,7 +176,7 @@ TEST_F(UiSceneManagerTest, UiUpdatesForFullscreenChanges) {
{
SCOPED_TRACE("Entered Fullsceen");
// Make sure background has changed for fullscreen.
- EXPECT_FALSE(ColorEquals(initial_background, scene_->GetBackgroundColor()));
+ EXPECT_NE(initial_background, scene_->GetBackgroundColor());
}
// Exit fullscreen.
@@ -196,7 +191,7 @@ TEST_F(UiSceneManagerTest, UiUpdatesForFullscreenChanges) {
}
{
SCOPED_TRACE("Exited Fullsceen");
- EXPECT_TRUE(ColorEquals(initial_background, scene_->GetBackgroundColor()));
+ EXPECT_EQ(initial_background, scene_->GetBackgroundColor());
}
}
« 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