OLD | NEW |
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 "chrome/browser/apps/app_browsertest_util.h" | 5 #include "chrome/browser/apps/app_browsertest_util.h" |
6 #include "chrome/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/extensions/app_launch_params.h" | |
9 #include "chrome/browser/ui/extensions/application_launch.h" | 8 #include "chrome/browser/ui/extensions/application_launch.h" |
10 #include "content/public/browser/notification_service.h" | 9 #include "content/public/browser/notification_service.h" |
11 #include "content/public/test/test_utils.h" | 10 #include "content/public/test/test_utils.h" |
12 #include "extensions/browser/app_window/app_window_geometry_cache.h" | 11 #include "extensions/browser/app_window/app_window_geometry_cache.h" |
13 #include "extensions/common/constants.h" | 12 #include "extensions/common/constants.h" |
14 #include "extensions/common/extension.h" | 13 #include "extensions/common/extension.h" |
15 #include "extensions/test/extension_test_message_listener.h" | 14 #include "extensions/test/extension_test_message_listener.h" |
16 #include "extensions/test/result_catcher.h" | 15 #include "extensions/test/result_catcher.h" |
17 | 16 |
18 using extensions::AppWindowGeometryCache; | 17 using extensions::AppWindowGeometryCache; |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ExtensionTestMessageListener launched_listener("Launched", true); | 209 ExtensionTestMessageListener launched_listener("Launched", true); |
211 | 210 |
212 content::WindowedNotificationObserver app_loaded_observer( | 211 content::WindowedNotificationObserver app_loaded_observer( |
213 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 212 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
214 content::NotificationService::AllSources()); | 213 content::NotificationService::AllSources()); |
215 | 214 |
216 const extensions::Extension* extension = LoadExtension( | 215 const extensions::Extension* extension = LoadExtension( |
217 test_data_dir_.AppendASCII("platform_apps").AppendASCII("window_api")); | 216 test_data_dir_.AppendASCII("platform_apps").AppendASCII("window_api")); |
218 EXPECT_TRUE(extension); | 217 EXPECT_TRUE(extension); |
219 | 218 |
220 OpenApplication(AppLaunchParams(browser()->profile(), extension, | 219 OpenApplication(AppLaunchParams(browser()->profile(), |
221 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, | 220 extension, |
222 extensions::SOURCE_UNTRACKED)); | 221 extensions::LAUNCH_CONTAINER_NONE, |
| 222 NEW_WINDOW)); |
223 | 223 |
224 ExtensionTestMessageListener geometry_listener("ListenGeometryChange", true); | 224 ExtensionTestMessageListener geometry_listener("ListenGeometryChange", true); |
225 | 225 |
226 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); | 226 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
227 launched_listener.Reply("testRestoreAfterGeometryCacheChange"); | 227 launched_listener.Reply("testRestoreAfterGeometryCacheChange"); |
228 | 228 |
229 ASSERT_TRUE(geometry_listener.WaitUntilSatisfied()); | 229 ASSERT_TRUE(geometry_listener.WaitUntilSatisfied()); |
230 | 230 |
231 GeometryCacheChangeHelper geo_change_helper_1( | 231 GeometryCacheChangeHelper geo_change_helper_1( |
232 AppWindowGeometryCache::Get(browser()->profile()), | 232 AppWindowGeometryCache::Get(browser()->profile()), |
(...skipping 28 matching lines...) Expand all Loading... |
261 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestFrameColors) { | 261 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestFrameColors) { |
262 ASSERT_TRUE(RunAppWindowAPITest("testFrameColors")) << message_; | 262 ASSERT_TRUE(RunAppWindowAPITest("testFrameColors")) << message_; |
263 } | 263 } |
264 #endif | 264 #endif |
265 | 265 |
266 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestVisibleOnAllWorkspaces) { | 266 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestVisibleOnAllWorkspaces) { |
267 ASSERT_TRUE( | 267 ASSERT_TRUE( |
268 RunAppWindowAPITestAndWaitForRoundTrip("testVisibleOnAllWorkspaces")) | 268 RunAppWindowAPITestAndWaitForRoundTrip("testVisibleOnAllWorkspaces")) |
269 << message_; | 269 << message_; |
270 } | 270 } |
OLD | NEW |