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

Unified Diff: ash/display/display_color_manager_chromeos_unittest.cc

Issue 1914343003: Reland: ash: reset color management when new screens are hotplugged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: ash/display/display_color_manager_chromeos_unittest.cc
diff --git a/ash/display/display_color_manager_chromeos_unittest.cc b/ash/display/display_color_manager_chromeos_unittest.cc
index 9766c10983a600dc75dd80f784994039198d1900..f6b745aeff7ae96550b84170b27c95c1ba723217 100644
--- a/ash/display/display_color_manager_chromeos_unittest.cc
+++ b/ash/display/display_color_manager_chromeos_unittest.cc
@@ -26,6 +26,7 @@ namespace ash {
namespace {
+const char kResetGammaAction[] = "*set_color_correction(id=123)";
const char kSetGammaAction[] =
"set_color_correction(id=123,gamma[0]*gamma[255]=???????????\?)";
const char kSetFullCTMAction[] =
@@ -191,8 +192,9 @@ TEST_F(DisplayColorManagerTest, VCGTOnly) {
configurator_.OnConfigurationChanged();
EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
+ EXPECT_TRUE(
+ base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction));
- log_->GetActionsAndClear();
WaitOnColorCalibration();
EXPECT_TRUE(base::MatchPattern(log_->GetActionsAndClear(), kSetGammaAction));
}
@@ -214,10 +216,12 @@ TEST_F(DisplayColorManagerTest, VCGTOnlyWithPlatformCTM) {
outputs.push_back(&snapshot);
native_display_delegate_->set_outputs(outputs);
+ log_->GetActionsAndClear();
configurator_.OnConfigurationChanged();
EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
+ EXPECT_TRUE(
+ base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction));
- log_->GetActionsAndClear();
WaitOnColorCalibration();
EXPECT_TRUE(base::MatchPattern(log_->GetActionsAndClear(), kSetGammaAction));
}
@@ -241,8 +245,9 @@ TEST_F(DisplayColorManagerTest, FullWithPlatformCTM) {
configurator_.OnConfigurationChanged();
EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
+ EXPECT_TRUE(
+ base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction));
- log_->GetActionsAndClear();
WaitOnColorCalibration();
EXPECT_TRUE(
base::MatchPattern(log_->GetActionsAndClear(), kSetFullCTMAction));
@@ -267,8 +272,9 @@ TEST_F(DisplayColorManagerTest, FullWithoutPlatformCTM) {
configurator_.OnConfigurationChanged();
EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
+ EXPECT_TRUE(
+ base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction));
- log_->GetActionsAndClear();
WaitOnColorCalibration();
EXPECT_STREQ("", log_->GetActionsAndClear().c_str());
}
@@ -292,8 +298,9 @@ TEST_F(DisplayColorManagerTest, NoMatchProductID) {
configurator_.OnConfigurationChanged();
EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
+ EXPECT_TRUE(
+ base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction));
- log_->GetActionsAndClear();
WaitOnColorCalibration();
EXPECT_STREQ("", log_->GetActionsAndClear().c_str());
}
@@ -317,8 +324,9 @@ TEST_F(DisplayColorManagerTest, NoVCGT) {
configurator_.OnConfigurationChanged();
EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
+ EXPECT_TRUE(
+ base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction));
- log_->GetActionsAndClear();
WaitOnColorCalibration();
EXPECT_STREQ("", log_->GetActionsAndClear().c_str());
}

Powered by Google App Engine
This is Rietveld 408576698