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

Unified Diff: ui/ozone/platform/dri/screen_manager_unittest.cc

Issue 522463005: [Ozone-GBM] Handle GPU crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated to allow proper restore of secondary displays Created 6 years, 3 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/ozone/platform/dri/screen_manager_unittest.cc
diff --git a/ui/ozone/platform/dri/screen_manager_unittest.cc b/ui/ozone/platform/dri/screen_manager_unittest.cc
index f98f5c095d50600658093f193b6af3364444ece2..8eda243f66bc82c00a46735fe284ae05755a85d6 100644
--- a/ui/ozone/platform/dri/screen_manager_unittest.cc
+++ b/ui/ozone/platform/dri/screen_manager_unittest.cc
@@ -75,6 +75,7 @@ TEST_F(ScreenManagerTest, CheckWithNoControllers) {
}
TEST_F(ScreenManagerTest, CheckWithValidController) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
@@ -87,6 +88,7 @@ TEST_F(ScreenManagerTest, CheckWithValidController) {
}
TEST_F(ScreenManagerTest, CheckWithInvalidBounds) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
@@ -97,18 +99,23 @@ TEST_F(ScreenManagerTest, CheckWithInvalidBounds) {
}
TEST_F(ScreenManagerTest, CheckForSecondValidController) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
kDefaultMode);
- screen_manager_->ConfigureDisplayController(
- 3, 4, GetSecondaryBounds().origin(), kDefaultMode);
+ screen_manager_->AddDisplayController(kSecondaryCrtc, kSecondaryConnector);
+ screen_manager_->ConfigureDisplayController(kSecondaryCrtc,
+ kSecondaryConnector,
+ GetSecondaryBounds().origin(),
+ kDefaultMode);
EXPECT_TRUE(screen_manager_->GetDisplayController(GetPrimaryBounds()));
EXPECT_TRUE(screen_manager_->GetDisplayController(GetSecondaryBounds()));
}
TEST_F(ScreenManagerTest, CheckControllerAfterItIsRemoved) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
@@ -122,6 +129,7 @@ TEST_F(ScreenManagerTest, CheckControllerAfterItIsRemoved) {
}
TEST_F(ScreenManagerTest, CheckDuplicateConfiguration) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
@@ -136,6 +144,7 @@ TEST_F(ScreenManagerTest, CheckDuplicateConfiguration) {
}
TEST_F(ScreenManagerTest, CheckChangingMode) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
@@ -155,10 +164,12 @@ TEST_F(ScreenManagerTest, CheckChangingMode) {
}
TEST_F(ScreenManagerTest, CheckForControllersInMirroredMode) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
kDefaultMode);
+ screen_manager_->AddDisplayController(kSecondaryCrtc, kSecondaryConnector);
screen_manager_->ConfigureDisplayController(kSecondaryCrtc,
kSecondaryConnector,
GetPrimaryBounds().origin(),
@@ -169,10 +180,12 @@ TEST_F(ScreenManagerTest, CheckForControllersInMirroredMode) {
}
TEST_F(ScreenManagerTest, CheckMirrorModeTransitions) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
kDefaultMode);
+ screen_manager_->AddDisplayController(kSecondaryCrtc, kSecondaryConnector);
screen_manager_->ConfigureDisplayController(kSecondaryCrtc,
kSecondaryConnector,
GetSecondaryBounds().origin(),
@@ -205,10 +218,12 @@ TEST_F(ScreenManagerTest, CheckMirrorModeTransitions) {
}
TEST_F(ScreenManagerTest, MonitorGoneInMirrorMode) {
+ screen_manager_->AddDisplayController(kPrimaryCrtc, kPrimaryConnector);
screen_manager_->ConfigureDisplayController(kPrimaryCrtc,
kPrimaryConnector,
GetPrimaryBounds().origin(),
kDefaultMode);
+ screen_manager_->AddDisplayController(kSecondaryCrtc, kSecondaryConnector);
screen_manager_->ConfigureDisplayController(kSecondaryCrtc,
kSecondaryConnector,
GetPrimaryBounds().origin(),
« ui/ozone/platform/dri/screen_manager.cc ('K') | « ui/ozone/platform/dri/screen_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698