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

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

Issue 227573007: Third part of porting Chrome Ash to Windows 7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lf Created 6 years, 8 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 unified diff | Download patch
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"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { 148 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) {
149 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { 149 if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
150 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); 150 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread"));
151 base::Thread::Options options; 151 base::Thread::Options options;
152 options.message_loop_type = base::MessageLoop::TYPE_IO; 152 options.message_loop_type = base::MessageLoop::TYPE_IO;
153 ipc_thread_->StartWithOptions(options); 153 ipc_thread_->StartWithOptions(options);
154 metro_viewer_host_.reset( 154 metro_viewer_host_.reset(
155 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); 155 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy()));
156 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( 156 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection(
157 win8::test::kDefaultTestAppUserModelId)); 157 win8::test::kDefaultTestAppUserModelId));
158 aura::RemoteWindowTreeHostWin* window_tree_host =
159 aura::RemoteWindowTreeHostWin::Instance();
160 CHECK(window_tree_host != NULL);
161 } 158 }
162 ash::WindowPositioner::SetMaximizeFirstWindow(true); 159 ash::WindowPositioner::SetMaximizeFirstWindow(true);
163 } 160 }
164 #endif 161 #endif
165 } 162 }
166 163
167 void AshTestBase::TearDown() { 164 void AshTestBase::TearDown() {
168 teardown_called_ = true; 165 teardown_called_ = true;
169 // Flush the message loop to finish pending release tasks. 166 // Flush the message loop to finish pending release tasks.
170 RunAllPendingInMessageLoop(); 167 RunAllPendingInMessageLoop();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 349
353 void AshTestBase::UnblockUserSession() { 350 void AshTestBase::UnblockUserSession() {
354 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 351 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
355 SetSessionStarted(true); 352 SetSessionStarted(true);
356 SetUserAddingScreenRunning(false); 353 SetUserAddingScreenRunning(false);
357 } 354 }
358 355
359 356
360 } // namespace test 357 } // namespace test
361 } // namespace ash 358 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698