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

Side by Side Diff: ash/accelerators/accelerator_commands_unittest.cc

Issue 42353002: Introduce WindowStateDelegate::ToggleFullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: exclude accelerator_commands_browsertest on win Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/accelerators/accelerator_commands.cc ('k') | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/accelerators/accelerator_commands.h" 5 #include "ash/accelerators/accelerator_commands.h"
6 6
7 #include "ash/test/ash_test_base.h" 7 #include "ash/test/ash_test_base.h"
8 #include "ash/wm/window_state.h" 8 #include "ash/wm/window_state.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 10
11 // Note: The unit tests for |ToggleMaximized()| and
12 // |ToggleFullscreen()| are in
13 // chrome/browser/ui/ash/accelerator_commands_browsertests.cc.
14 // because they depends on chrome implementation of
15 // |ash::wm::WindowStateDelegate|.
16
11 namespace ash { 17 namespace ash {
12 namespace accelerators { 18 namespace accelerators {
13 19
14 typedef test::AshTestBase AcceleratorCommandsTest; 20 typedef test::AshTestBase AcceleratorCommandsTest;
15 21
16 TEST_F(AcceleratorCommandsTest, ToggleMinimized) { 22 TEST_F(AcceleratorCommandsTest, ToggleMinimized) {
17 scoped_ptr<aura::Window> window( 23 scoped_ptr<aura::Window> window(
18 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); 24 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
19 wm::WindowState* window_state = wm::GetWindowState(window.get()); 25 wm::WindowState* window_state = wm::GetWindowState(window.get());
20 window_state->Activate(); 26 window_state->Activate();
21 27
22 ToggleMinimized(); 28 ToggleMinimized();
23 EXPECT_TRUE(window_state->IsMinimized()); 29 EXPECT_TRUE(window_state->IsMinimized());
24 EXPECT_FALSE(window_state->IsNormalShowState()); 30 EXPECT_FALSE(window_state->IsNormalShowState());
25 31
26 ToggleMinimized(); 32 ToggleMinimized();
27 EXPECT_FALSE(window_state->IsMinimized()); 33 EXPECT_FALSE(window_state->IsMinimized());
28 EXPECT_TRUE(window_state->IsNormalShowState()); 34 EXPECT_TRUE(window_state->IsNormalShowState());
29 } 35 }
30 36
31 } // namespace accelerators 37 } // namespace accelerators
32 } // namespace ash 38 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_commands.cc ('k') | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698