OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "apps/shell_window.h" | 5 #include "apps/shell_window.h" |
6 #include "apps/shell_window_registry.h" | 6 #include "apps/shell_window_registry.h" |
7 #include "apps/ui/native_app_window.h" | 7 #include "apps/ui/native_app_window.h" |
8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
9 #include "ash/desktop_background/desktop_background_controller_observer.h" | 9 #include "ash/desktop_background/desktop_background_controller_observer.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 virtual ~KioskTest() {} | 242 virtual ~KioskTest() {} |
243 | 243 |
244 protected: | 244 protected: |
245 virtual void SetUp() OVERRIDE { | 245 virtual void SetUp() OVERRIDE { |
246 base::FilePath test_data_dir; | 246 base::FilePath test_data_dir; |
247 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); | 247 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); |
248 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); | 248 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); |
249 embedded_test_server()->RegisterRequestHandler( | 249 embedded_test_server()->RegisterRequestHandler( |
250 base::Bind(&FakeGaia::HandleRequest, base::Unretained(&fake_gaia_))); | 250 base::Bind(&FakeGaia::HandleRequest, base::Unretained(&fake_gaia_))); |
251 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 251 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
252 embedded_test_server()->StopThread(); | |
satorux1
2013/11/26 01:22:58
this is not obvious. could you add some comment ab
oshima
2013/11/26 02:18:43
I added comment.
| |
252 | 253 |
253 mock_user_manager_.reset(new MockUserManager); | 254 mock_user_manager_.reset(new MockUserManager); |
254 AppLaunchController::SkipSplashWaitForTesting(); | 255 AppLaunchController::SkipSplashWaitForTesting(); |
255 AppLaunchController::SetNetworkWaitForTesting(kTestNetworkTimeoutSeconds); | 256 AppLaunchController::SetNetworkWaitForTesting(kTestNetworkTimeoutSeconds); |
256 | 257 |
257 InProcessBrowserTest::SetUp(); | 258 InProcessBrowserTest::SetUp(); |
258 } | 259 } |
259 | 260 |
260 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 261 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
261 host_resolver()->AddRule("*", "127.0.0.1"); | 262 host_resolver()->AddRule("*", "127.0.0.1"); |
262 } | 263 } |
263 | 264 |
265 virtual void SetUpOnMainThread() OVERRIDE { | |
266 embedded_test_server()->StartThread(); | |
267 } | |
268 | |
264 virtual void CleanUpOnMainThread() OVERRIDE { | 269 virtual void CleanUpOnMainThread() OVERRIDE { |
265 // We need to clean up these objects in this specific order. | 270 // We need to clean up these objects in this specific order. |
266 fake_network_notifier_.reset(NULL); | 271 fake_network_notifier_.reset(NULL); |
267 disable_network_notifier_.reset(NULL); | 272 disable_network_notifier_.reset(NULL); |
268 | 273 |
269 AppLaunchController::SetNetworkTimeoutCallbackForTesting(NULL); | 274 AppLaunchController::SetNetworkTimeoutCallbackForTesting(NULL); |
270 AppLaunchSigninScreen::SetUserManagerForTesting(NULL); | 275 AppLaunchSigninScreen::SetUserManagerForTesting(NULL); |
271 | 276 |
272 // If the login display is still showing, exit gracefully. | 277 // If the login display is still showing, exit gracefully. |
273 if (LoginDisplayHostImpl::default_host()) { | 278 if (LoginDisplayHostImpl::default_host()) { |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
966 content::WindowedNotificationObserver( | 971 content::WindowedNotificationObserver( |
967 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, | 972 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, |
968 content::NotificationService::AllSources()).Wait(); | 973 content::NotificationService::AllSources()).Wait(); |
969 | 974 |
970 // Wait for the wallpaper to load. | 975 // Wait for the wallpaper to load. |
971 WaitForWallpaper(); | 976 WaitForWallpaper(); |
972 EXPECT_TRUE(wallpaper_loaded()); | 977 EXPECT_TRUE(wallpaper_loaded()); |
973 } | 978 } |
974 | 979 |
975 } // namespace chromeos | 980 } // namespace chromeos |
OLD | NEW |