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

Unified Diff: ui/display/chromeos/display_configurator_unittest.cc

Issue 1019623002: Remove DisplayState from the public interface for DisplayConfigurator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 5 years, 9 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 | « ui/display/chromeos/display_configurator.cc ('k') | ui/display/chromeos/display_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/display_configurator_unittest.cc
diff --git a/ui/display/chromeos/display_configurator_unittest.cc b/ui/display/chromeos/display_configurator_unittest.cc
index 6b940be5be0c88dc770c5ed5ac4a9d8713948b29..c95bf716d5b1e49bc0c51f67a300c5e38965e414 100644
--- a/ui/display/chromeos/display_configurator_unittest.cc
+++ b/ui/display/chromeos/display_configurator_unittest.cc
@@ -854,7 +854,7 @@ TEST_F(DisplayConfiguratorTest, UpdateCachedOutputsEvenAfterFailure) {
const DisplayConfigurator::DisplayStateList* cached =
&configurator_.cached_displays();
ASSERT_EQ(static_cast<size_t>(1), cached->size());
- EXPECT_EQ(outputs_[0].current_mode(), (*cached)[0].display->current_mode());
+ EXPECT_EQ(outputs_[0].current_mode(), (*cached)[0]->current_mode());
// After connecting a second output, check that it shows up in
// |cached_displays_| even if an invalid state is requested.
@@ -862,8 +862,8 @@ TEST_F(DisplayConfiguratorTest, UpdateCachedOutputsEvenAfterFailure) {
UpdateOutputs(2, true);
cached = &configurator_.cached_displays();
ASSERT_EQ(static_cast<size_t>(2), cached->size());
- EXPECT_EQ(outputs_[0].current_mode(), (*cached)[0].display->current_mode());
- EXPECT_EQ(outputs_[1].current_mode(), (*cached)[1].display->current_mode());
+ EXPECT_EQ(outputs_[0].current_mode(), (*cached)[0]->current_mode());
+ EXPECT_EQ(outputs_[1].current_mode(), (*cached)[1]->current_mode());
}
TEST_F(DisplayConfiguratorTest, PanelFitting) {
@@ -898,21 +898,15 @@ TEST_F(DisplayConfiguratorTest, PanelFitting) {
// Both outputs should be using the small mode.
ASSERT_EQ(1, observer_.num_changes());
ASSERT_EQ(static_cast<size_t>(2), observer_.latest_outputs().size());
- EXPECT_EQ(&small_mode_, observer_.latest_outputs()[0].mirror_mode);
- EXPECT_EQ(&small_mode_,
- observer_.latest_outputs()[0].display->current_mode());
- EXPECT_EQ(&small_mode_, observer_.latest_outputs()[1].mirror_mode);
- EXPECT_EQ(&small_mode_,
- observer_.latest_outputs()[1].display->current_mode());
+ EXPECT_EQ(&small_mode_, observer_.latest_outputs()[0]->current_mode());
+ EXPECT_EQ(&small_mode_, observer_.latest_outputs()[1]->current_mode());
// Also check that the newly-added small mode is present in the internal
// snapshot that was passed to the observer (http://crbug.com/289159).
- const DisplayConfigurator::DisplayState& state =
- observer_.latest_outputs()[0];
- ASSERT_NE(state.display->modes().end(),
- std::find(state.display->modes().begin(),
- state.display->modes().end(),
- &small_mode_));
+ DisplaySnapshot* state = observer_.latest_outputs()[0];
+ ASSERT_NE(
+ state->modes().end(),
+ std::find(state->modes().begin(), state->modes().end(), &small_mode_));
}
TEST_F(DisplayConfiguratorTest, ContentProtection) {
« no previous file with comments | « ui/display/chromeos/display_configurator.cc ('k') | ui/display/chromeos/display_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698