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

Unified Diff: ash/system/power/tablet_power_button_controller_unittest.cc

Issue 2821303004: cros: Suspend media sessions with display off trigger by tablet power button (Closed)
Patch Set: rebase Created 3 years, 7 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/system/power/tablet_power_button_controller.cc ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/power/tablet_power_button_controller_unittest.cc
diff --git a/ash/system/power/tablet_power_button_controller_unittest.cc b/ash/system/power/tablet_power_button_controller_unittest.cc
index a0bfcda0ff2b6cee8db96218a0b492809c22505a..3a5139d8205d784a9c97c758d2bb2f46d56294f3 100644
--- a/ash/system/power/tablet_power_button_controller_unittest.cc
+++ b/ash/system/power/tablet_power_button_controller_unittest.cc
@@ -558,5 +558,15 @@ TEST_F(TabletPowerButtonControllerTest, EnableOnAccelerometerUpdate) {
EXPECT_TRUE(tablet_controller_);
}
+// Tests that when backlights get forced off due to tablet power button, media
+// sessions should be suspended.
+TEST_F(TabletPowerButtonControllerTest, SuspendMediaSessions) {
+ ASSERT_FALSE(shell_delegate_->media_sessions_suspended());
+ PressPowerButton();
+ ReleasePowerButton();
+ ASSERT_TRUE(GetBacklightsForcedOff());
+ EXPECT_TRUE(shell_delegate_->media_sessions_suspended());
+}
+
} // namespace test
} // namespace ash
« no previous file with comments | « ash/system/power/tablet_power_button_controller.cc ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698