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

Side by Side Diff: ash/test/ash_test_base.cc

Issue 62333015: Ensure that the first browser window which is created in Windows 8 ASH is maximized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | « no previous file | ash/wm/window_positioner.h » ('j') | ash/wm/window_positioner.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
11 #include "ash/display/display_controller.h" 11 #include "ash/display/display_controller.h"
12 #include "ash/screen_ash.h" 12 #include "ash/screen_ash.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/shell/toplevel_window.h" 14 #include "ash/shell/toplevel_window.h"
15 #include "ash/test/ash_test_helper.h" 15 #include "ash/test/ash_test_helper.h"
16 #include "ash/test/display_manager_test_api.h" 16 #include "ash/test/display_manager_test_api.h"
17 #include "ash/test/test_session_state_delegate.h" 17 #include "ash/test/test_session_state_delegate.h"
18 #include "ash/test/test_shell_delegate.h" 18 #include "ash/test/test_shell_delegate.h"
19 #include "ash/wm/coordinate_conversion.h" 19 #include "ash/wm/coordinate_conversion.h"
20 #include "ash/wm/window_positioner.h"
20 #include "base/command_line.h" 21 #include "base/command_line.h"
21 #include "content/public/test/web_contents_tester.h" 22 #include "content/public/test/web_contents_tester.h"
22 #include "ui/aura/client/aura_constants.h" 23 #include "ui/aura/client/aura_constants.h"
23 #include "ui/aura/client/screen_position_client.h" 24 #include "ui/aura/client/screen_position_client.h"
24 #include "ui/aura/client/window_tree_client.h" 25 #include "ui/aura/client/window_tree_client.h"
25 #include "ui/aura/root_window.h" 26 #include "ui/aura/root_window.h"
26 #include "ui/aura/test/event_generator.h" 27 #include "ui/aura/test/event_generator.h"
27 #include "ui/aura/test/test_window_delegate.h" 28 #include "ui/aura/test/test_window_delegate.h"
28 #include "ui/aura/window.h" 29 #include "ui/aura/window.h"
29 #include "ui/aura/window_delegate.h" 30 #include "ui/aura/window_delegate.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); 129 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents();
129 130
130 #if defined(OS_WIN) 131 #if defined(OS_WIN)
131 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && 132 if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
132 !command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { 133 !command_line->HasSwitch(ash::switches::kForceAshToDesktop)) {
133 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); 134 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread"));
134 base::Thread::Options options; 135 base::Thread::Options options;
135 options.message_loop_type = base::MessageLoop::TYPE_IO; 136 options.message_loop_type = base::MessageLoop::TYPE_IO;
136 ipc_thread_->StartWithOptions(options); 137 ipc_thread_->StartWithOptions(options);
137 138
139 ash::WindowPositioner::SetMaximizeFirstWindow(true);
138 metro_viewer_host_.reset( 140 metro_viewer_host_.reset(
139 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); 141 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy()));
140 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( 142 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection(
141 win8::test::kDefaultTestAppUserModelId, 143 win8::test::kDefaultTestAppUserModelId,
142 L"test_open")); 144 L"test_open"));
143 aura::RemoteRootWindowHostWin* root_window_host = 145 aura::RemoteRootWindowHostWin* root_window_host =
144 aura::RemoteRootWindowHostWin::Instance(); 146 aura::RemoteRootWindowHostWin::Instance();
145 CHECK(root_window_host != NULL); 147 CHECK(root_window_host != NULL);
146 } 148 }
147 #endif 149 #endif
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 335
334 void AshTestBase::UnblockUserSession() { 336 void AshTestBase::UnblockUserSession() {
335 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 337 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
336 SetSessionStarted(true); 338 SetSessionStarted(true);
337 SetUserAddingScreenRunning(false); 339 SetUserAddingScreenRunning(false);
338 } 340 }
339 341
340 342
341 } // namespace test 343 } // namespace test
342 } // namespace ash 344 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/window_positioner.h » ('j') | ash/wm/window_positioner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698