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

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

Issue 1861593002: chromeos: Turn off displays on suspend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chromeos: Add functions for configuring cached displays 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: 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 aaee7b526b67f0730ee70d3bac89e44ff0a0982c..914b461f8e85dd79d6a1584a9aff91a4a5ce9520 100644
--- a/ui/display/chromeos/display_configurator_unittest.cc
+++ b/ui/display/chromeos/display_configurator_unittest.cc
@@ -851,11 +851,16 @@ TEST_F(DisplayConfiguratorTest, SuspendAndResume) {
NULL),
log_->GetActionsAndClear());
configurator_.ResumeDisplays();
+
+ // Expect the GetFramebuffer and GetCrtc actions to happen twice since we
+ // configure the cached displays on resume to speed things up.
EXPECT_EQ(
JoinActions(
kGrab,
GetFramebufferAction(small_mode_.size(), &outputs_[0], NULL).c_str(),
GetCrtcAction(outputs_[0], &small_mode_, gfx::Point(0, 0)).c_str(),
+ GetFramebufferAction(small_mode_.size(), &outputs_[0], NULL).c_str(),
+ GetCrtcAction(outputs_[0], &small_mode_, gfx::Point(0, 0)).c_str(),
kForceDPMS,
kUngrab,
NULL),
@@ -1295,11 +1300,16 @@ TEST_F(DisplayConfiguratorTest, DoNotConfigureWithSuspendedDisplays) {
EXPECT_EQ(kNoActions, log_->GetActionsAndClear());
configurator_.ResumeDisplays();
+
+ // Expect the GetFramebuffer and GetCrtc actions to happen twice since we
+ // configure the cached displays on resume to speed things up.
EXPECT_EQ(
JoinActions(
kGrab,
GetFramebufferAction(small_mode_.size(), &outputs_[0], NULL).c_str(),
GetCrtcAction(outputs_[0], &small_mode_, gfx::Point(0, 0)).c_str(),
+ GetFramebufferAction(small_mode_.size(), &outputs_[0], NULL).c_str(),
+ GetCrtcAction(outputs_[0], &small_mode_, gfx::Point(0, 0)).c_str(),
kForceDPMS,
kUngrab,
NULL),
« no previous file with comments | « ui/display/chromeos/display_configurator.cc ('k') | ui/display/chromeos/test/test_native_display_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698