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

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

Issue 266223003: Revert 268181 "Enabled volume buttons when TouchView is active" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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
Index: trunk/src/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
===================================================================
--- trunk/src/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc (revision 268197)
+++ trunk/src/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc (working copy)
@@ -7,10 +7,8 @@
#include "ash/accelerometer/accelerometer_controller.h"
#include "ash/display/display_manager.h"
#include "ash/shell.h"
-#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_volume_control_delegate.h"
#include "ui/aura/test/event_generator.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/vector3d_f.h"
@@ -150,7 +148,7 @@
// Tests that when the hinge is nearly vertically aligned, the current state
// persists as the computed angle is highly inaccurate in this orientation.
TEST_F(MaximizeModeControllerTest, HingeAligned) {
- // Laptop in normal orientation lid open 90 degrees.
+ // Laptop in normal orientation lid open 90 degrees.
TriggerAccelerometerUpdate(gfx::Vector3dF(0.0f, 0.0f, 1.0f),
gfx::Vector3dF(-1.0f, 0.0f, 0.0f));
EXPECT_FALSE(IsMaximizeModeStarted());
@@ -311,7 +309,7 @@
EXPECT_EQ(0u, counter.event_count());
counter.reset();
- // Touch should not be blocked.
+ // Touch should not be blocked.
event_generator.PressTouch();
event_generator.ReleaseTouch();
EXPECT_GT(counter.event_count(), 0u);
@@ -329,34 +327,6 @@
counter.reset();
}
-// Tests that maximize mode does not block Volume Up & Down events.
-TEST_F(MaximizeModeControllerTest, AllowsVolumeControl) {
- aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator event_generator(root, root);
-
- TestVolumeControlDelegate* volume_delegate =
- new TestVolumeControlDelegate(false);
- ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate>(volume_delegate).Pass());
-
- // Trigger maximize mode by opening to 270 to begin the test in maximize mode.
- TriggerAccelerometerUpdate(gfx::Vector3dF(0.0f, 0.0f, -1.0f),
- gfx::Vector3dF(-1.0f, 0.0f, 0.0f));
- ASSERT_TRUE(IsMaximizeModeStarted());
-
- // Verify volume down button event is not blocked
- ASSERT_EQ(0, volume_delegate->handle_volume_down_count());
- event_generator.PressKey(ui::VKEY_VOLUME_DOWN, 0);
- event_generator.ReleaseKey(ui::VKEY_VOLUME_DOWN, 0);
- EXPECT_EQ(1, volume_delegate->handle_volume_down_count());
-
- // Verify volume up event is not blocked
- ASSERT_EQ(0, volume_delegate->handle_volume_up_count());
- event_generator.PressKey(ui::VKEY_VOLUME_UP, 0);
- event_generator.ReleaseKey(ui::VKEY_VOLUME_UP, 0);
- EXPECT_EQ(1, volume_delegate->handle_volume_up_count());
-}
-
TEST_F(MaximizeModeControllerTest, LaptopTest) {
// Feeds in sample accelerometer data and verifies that there are no
// transitions into touchview / maximize mode while shaking the device around
« no previous file with comments | « trunk/src/ash/test/test_volume_control_delegate.cc ('k') | trunk/src/ash/wm/maximize_mode/maximize_mode_event_blocker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698