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

Unified Diff: ash/shell_unittest.cc

Issue 9600006: Aura: Remove overlapping window mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/shell.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell_unittest.cc
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index 1f16bf0aa93b0668914b0facf34889d179a54b8c..a6791cecf15801a9f8985cbb717a6b84efd549d6 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -301,14 +301,6 @@ TEST_F(ShellTest, ComputeWindowMode) {
EXPECT_EQ(Shell::MODE_COMPACT,
test_api.ComputeWindowMode(&command_line_force));
- // The user can set overlapping mode.
- CommandLine command_line_overlapping(CommandLine::NO_PROGRAM);
- command_line_overlapping.AppendSwitchASCII(
- switches::kAuraWindowMode,
- switches::kAuraWindowModeOverlapping);
- EXPECT_EQ(Shell::MODE_OVERLAPPING,
- test_api.ComputeWindowMode(&command_line_overlapping));
-
// The user can set compact mode.
CommandLine command_line_compact(CommandLine::NO_PROGRAM);
command_line_compact.AppendSwitchASCII(switches::kAuraWindowMode,
@@ -326,11 +318,11 @@ TEST_F(ShellTest, ComputeWindowMode) {
// Fails on Mac, see http://crbug.com/115662
#if defined(OS_MACOSX)
-#define MAYBE_OverlappingWindowModeBasics FAILS_OverlappingWindowModeBasics
+#define MAYBE_ManagedWindowModeBasics FAILS_ManagedWindowModeBasics
#else
-#define MAYBE_OverlappingWindowModeBasics OverlappingWindowModeBasics
+#define MAYBE_ManagedWindowModeBasics ManagedWindowModeBasics
#endif
-TEST_F(ShellTest, MAYBE_OverlappingWindowModeBasics) {
+TEST_F(ShellTest, MAYBE_ManagedWindowModeBasics) {
Shell* shell = Shell::GetInstance();
Shell::TestApi test_api(shell);
@@ -389,23 +381,17 @@ TEST_F(ShellTest, FullscreenWindowHidesShelf) {
widget->Close();
}
-// Window mode is computed at Shell initialization time. Rather than changing
-// the global command line to select compact mode we set a switch before
-// initializing the shell.
+// By implementing GetOverrideWindowMode we make the Shell come up in compact
+// window mode.
class ShellCompactWindowModeTest : public test::AshTestBase {
public:
ShellCompactWindowModeTest() {}
virtual ~ShellCompactWindowModeTest() {}
- virtual void SetUp() OVERRIDE {
- // Must set this before base class initializes the shell.
- Shell::set_compact_window_mode_for_test(true);
- test::AshTestBase::SetUp();
- }
-
- virtual void TearDown() OVERRIDE {
- test::AshTestBase::TearDown();
- Shell::set_compact_window_mode_for_test(false);
+ protected:
+ virtual bool GetOverrideWindowMode(Shell::WindowMode* window_mode) {
+ *window_mode = Shell::MODE_COMPACT;
+ return true;
}
private:
« no previous file with comments | « ash/shell.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698