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

Unified Diff: ash/wm/maximize_mode/maximize_mode_controller_unittest.cc

Issue 1588883005: Make sure the event blocker is destroyed when we leave maximize mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
index 3d384bf949ae1c867ef8f8a9a66e767545d3a026..5bbceaf82899ff17861fbd9a0f05a978141a1654 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
@@ -155,6 +155,10 @@ class MaximizeModeControllerTest : public test::AshTestBase {
return maximize_mode_controller()->WasLidOpenedRecently();
}
+ bool AreEventsBlocked() {
+ return !!maximize_mode_controller()->event_blocker_.get();
+ }
+
base::UserActionTester* user_action_tester() { return &user_action_tester_; }
private:
@@ -454,6 +458,7 @@ TEST_F(MaximizeModeControllerTest, NoMaximizeModeWithDisabledInternalDisplay) {
OpenLidToAngle(270.0f);
EXPECT_TRUE(IsMaximizeModeStarted());
+ EXPECT_TRUE(AreEventsBlocked());
// Deactivate internal display to simulate Docked Mode.
std::vector<DisplayInfo> secondary_only;
@@ -462,9 +467,11 @@ TEST_F(MaximizeModeControllerTest, NoMaximizeModeWithDisabledInternalDisplay) {
display_manager->OnNativeDisplaysChanged(secondary_only);
ASSERT_FALSE(display_manager->IsActiveDisplayId(internal_display_id));
EXPECT_FALSE(IsMaximizeModeStarted());
+ EXPECT_FALSE(AreEventsBlocked());
OpenLidToAngle(270.0f);
EXPECT_FALSE(IsMaximizeModeStarted());
+ EXPECT_FALSE(AreEventsBlocked());
}
class MaximizeModeControllerSwitchesTest : public MaximizeModeControllerTest {
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698