| 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 081042e8a6c9018434b992bee9ca55f068d5e9ba..4be549980f99feec9760a3c2b39a347db53c0d97 100644
|
| --- a/ash/display/display_color_manager_chromeos_unittest.cc
|
| +++ b/ash/display/display_color_manager_chromeos_unittest.cc
|
| @@ -105,9 +105,9 @@ TEST_F(DisplayColorManagerTest, VCGTOnly) {
|
| ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */
|
| false, /* is_aspect_preserving_scaling */
|
| 0x06af5c10, /* product_id */
|
| + false, /* has_color_correction_matrix */
|
| modes, /* modes */
|
| - modes[0] /* current_mode */,
|
| - modes[0] /* native_mode */));
|
| + modes[0] /* current_mode */, modes[0] /* native_mode */));
|
| std::vector<ui::DisplaySnapshot*> outputs;
|
| outputs.push_back(snapshot.get());
|
| native_display_delegate_->set_outputs(outputs);
|
| @@ -120,7 +120,91 @@ TEST_F(DisplayColorManagerTest, VCGTOnly) {
|
|
|
| EXPECT_TRUE(base::MatchPattern(
|
| log_->GetActionsAndClear(),
|
| - "set_gamma_ramp(id=123,rgb[0]*rgb[255]=???????????\?)"));
|
| + "set_color_correction(id=123,gamma[0]*gamma[255]=???????????\?)"));
|
| +}
|
| +
|
| +TEST_F(DisplayColorManagerTest, VCGTOnlyWithPlatformCTM) {
|
| + std::vector<const ui::DisplayMode*> modes;
|
| + ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f);
|
| + modes.push_back(&mode);
|
| + scoped_ptr<ui::TestDisplaySnapshot> snapshot =
|
| + make_scoped_ptr(new ui::TestDisplaySnapshot(
|
| + 123, gfx::Point(0, 0), /* origin */
|
| + gfx::Size(0, 0), /* physical_size */
|
| + ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */
|
| + false, /* is_aspect_preserving_scaling */
|
| + 0x06af5c10, /* product_id */
|
| + true, /* has_color_correction_matrix */
|
| + modes, /* modes */
|
| + modes[0] /* current_mode */, modes[0] /* native_mode */));
|
| + std::vector<ui::DisplaySnapshot*> outputs;
|
| + outputs.push_back(snapshot.get());
|
| + native_display_delegate_->set_outputs(outputs);
|
| +
|
| + configurator_.OnConfigurationChanged();
|
| + EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
|
| + log_->GetActionsAndClear();
|
| +
|
| + RunBlockingPoolTask();
|
| +
|
| + EXPECT_TRUE(base::MatchPattern(
|
| + log_->GetActionsAndClear(),
|
| + "set_color_correction(id=123,gamma[0]*gamma[255]=???????????\?)"));
|
| +}
|
| +
|
| +TEST_F(DisplayColorManagerTest, FullWithPlatformCTM) {
|
| + std::vector<const ui::DisplayMode*> modes;
|
| + ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f);
|
| + modes.push_back(&mode);
|
| + scoped_ptr<ui::TestDisplaySnapshot> snapshot =
|
| + make_scoped_ptr(new ui::TestDisplaySnapshot(
|
| + 123, gfx::Point(0, 0), /* origin */
|
| + gfx::Size(0, 0), /* physical_size */
|
| + ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */
|
| + false, /* is_aspect_preserving_scaling */
|
| + 0x4c834a42, /* product_id */
|
| + true, /* has_color_correction_matrix */
|
| + modes, /* modes */
|
| + modes[0] /* current_mode */, modes[0] /* native_mode */));
|
| + std::vector<ui::DisplaySnapshot*> outputs;
|
| + outputs.push_back(snapshot.get());
|
| + native_display_delegate_->set_outputs(outputs);
|
| +
|
| + configurator_.OnConfigurationChanged();
|
| + EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
|
| + log_->GetActionsAndClear();
|
| +
|
| + RunBlockingPoolTask();
|
| +
|
| + EXPECT_TRUE(base::MatchPattern(
|
| + log_->GetActionsAndClear(),
|
| + "set_color_correction(id=123,degamma[0]*gamma[0]*ctm[0]*ctm[8]*)"));
|
| +}
|
| +
|
| +TEST_F(DisplayColorManagerTest, FullWithoutPlatformCTM) {
|
| + std::vector<const ui::DisplayMode*> modes;
|
| + ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f);
|
| + modes.push_back(&mode);
|
| + scoped_ptr<ui::TestDisplaySnapshot> snapshot =
|
| + make_scoped_ptr(new ui::TestDisplaySnapshot(
|
| + 123, gfx::Point(0, 0), /* origin */
|
| + gfx::Size(0, 0), /* physical_size */
|
| + ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */
|
| + false, /* is_aspect_preserving_scaling */
|
| + 0x4c834a42, /* product_id */
|
| + false, /* has_color_correction_matrix */
|
| + modes, /* modes */
|
| + modes[0] /* current_mode */, modes[0] /* native_mode */));
|
| + std::vector<ui::DisplaySnapshot*> outputs;
|
| + outputs.push_back(snapshot.get());
|
| + native_display_delegate_->set_outputs(outputs);
|
| +
|
| + configurator_.OnConfigurationChanged();
|
| + EXPECT_TRUE(test_api_.TriggerConfigureTimeout());
|
| + log_->GetActionsAndClear();
|
| +
|
| + RunBlockingPoolTask();
|
| + EXPECT_STREQ("", log_->GetActionsAndClear().c_str());
|
| }
|
|
|
| TEST_F(DisplayColorManagerTest, NoMatchProductID) {
|
| @@ -134,9 +218,9 @@ TEST_F(DisplayColorManagerTest, NoMatchProductID) {
|
| ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */
|
| false, /* is_aspect_preserving_scaling */
|
| 0, /* product_id */
|
| + false, /* has_color_correction_matrix */
|
| modes, /* modes */
|
| - modes[0] /* current_mode */,
|
| - modes[0] /* native_mode */));
|
| + modes[0] /* current_mode */, modes[0] /* native_mode */));
|
| std::vector<ui::DisplaySnapshot*> outputs;
|
| outputs.push_back(snapshot.get());
|
| native_display_delegate_->set_outputs(outputs);
|
| @@ -160,9 +244,9 @@ TEST_F(DisplayColorManagerTest, NoVCGT) {
|
| ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */
|
| false, /* is_aspect_preserving_scaling */
|
| 0x0dae3211, /* product_id */
|
| + false, /* has_color_correction_matrix */
|
| modes, /* modes */
|
| - modes[0] /* current_mode */,
|
| - modes[0] /* native_mode */));
|
| + modes[0] /* current_mode */, modes[0] /* native_mode */));
|
| std::vector<ui::DisplaySnapshot*> outputs;
|
| outputs.push_back(snapshot.get());
|
| native_display_delegate_->set_outputs(outputs);
|
|
|