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

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

Issue 326813004: Added quick lock mechanism while in Touchview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ASH_EXPORT to SessionStateAnimator 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
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | ash/wm/power_button_controller.h » ('j') | 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 b393bfc443ceabc86a8e8de50cf467fbdfc397c2..b7a18b87ff0deea23e01c1a22d135257592b6482 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
@@ -12,8 +12,6 @@
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/display_manager_test_api.h"
-#include "ash/test/test_lock_state_controller_delegate.h"
-#include "ash/test/test_screenshot_delegate.h"
#include "ash/test/test_system_tray_delegate.h"
#include "ash/test/test_volume_control_delegate.h"
#include "base/test/simple_test_tick_clock.h"
@@ -401,34 +399,6 @@ TEST_F(MaximizeModeControllerTest, RotationOnlyInMaximizeMode) {
EXPECT_EQ(gfx::Display::ROTATE_0, GetInternalDisplayRotation());
}
-#if defined(OS_CHROMEOS)
-// Tests that a screenshot can be taken in maximize mode by holding volume down
-// and pressing power.
-TEST_F(MaximizeModeControllerTest, Screenshot) {
- Shell::GetInstance()->lock_state_controller()->SetDelegate(
- new test::TestLockStateControllerDelegate);
- aura::Window* root = Shell::GetPrimaryRootWindow();
- ui::test::EventGenerator event_generator(root, root);
- test::TestScreenshotDelegate* delegate = GetScreenshotDelegate();
- delegate->set_can_take_screenshot(true);
-
- // Open up 270 degrees.
- OpenLidToAngle(270.0f);
- ASSERT_TRUE(IsMaximizeModeStarted());
-
- // Pressing power alone does not take a screenshot.
- event_generator.PressKey(ui::VKEY_POWER, 0);
- event_generator.ReleaseKey(ui::VKEY_POWER, 0);
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
-
- // Holding volume down and pressing power takes a screenshot.
- event_generator.PressKey(ui::VKEY_VOLUME_DOWN, 0);
- event_generator.PressKey(ui::VKEY_POWER, 0);
- event_generator.ReleaseKey(ui::VKEY_POWER, 0);
- EXPECT_EQ(1, delegate->handle_take_screenshot_count());
- event_generator.ReleaseKey(ui::VKEY_VOLUME_DOWN, 0);
-}
-#endif // OS_CHROMEOS
TEST_F(MaximizeModeControllerTest, LaptopTest) {
// Feeds in sample accelerometer data and verifies that there are no
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | ash/wm/power_button_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698