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

Side by Side Diff: chrome/browser/apps/app_window_browsertest.cc

Issue 722703002: Make "source" a required argument of AppLaunchParams and fill in the argument in all call points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "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"
8 #include "chrome/browser/ui/extensions/application_launch.h" 9 #include "chrome/browser/ui/extensions/application_launch.h"
9 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
10 #include "content/public/test/test_utils.h" 11 #include "content/public/test/test_utils.h"
11 #include "extensions/browser/app_window/app_window_geometry_cache.h" 12 #include "extensions/browser/app_window/app_window_geometry_cache.h"
12 #include "extensions/common/constants.h" 13 #include "extensions/common/constants.h"
13 #include "extensions/common/extension.h" 14 #include "extensions/common/extension.h"
14 #include "extensions/test/extension_test_message_listener.h" 15 #include "extensions/test/extension_test_message_listener.h"
15 #include "extensions/test/result_catcher.h" 16 #include "extensions/test/result_catcher.h"
16 17
17 using extensions::AppWindowGeometryCache; 18 using extensions::AppWindowGeometryCache;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 ExtensionTestMessageListener launched_listener("Launched", true); 209 ExtensionTestMessageListener launched_listener("Launched", true);
209 210
210 content::WindowedNotificationObserver app_loaded_observer( 211 content::WindowedNotificationObserver app_loaded_observer(
211 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 212 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
212 content::NotificationService::AllSources()); 213 content::NotificationService::AllSources());
213 214
214 const extensions::Extension* extension = LoadExtension( 215 const extensions::Extension* extension = LoadExtension(
215 test_data_dir_.AppendASCII("platform_apps").AppendASCII("window_api")); 216 test_data_dir_.AppendASCII("platform_apps").AppendASCII("window_api"));
216 EXPECT_TRUE(extension); 217 EXPECT_TRUE(extension);
217 218
218 OpenApplication(AppLaunchParams(browser()->profile(), 219 OpenApplication(AppLaunchParams(browser()->profile(), extension,
219 extension, 220 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW,
220 extensions::LAUNCH_CONTAINER_NONE, 221 extensions::SOURCE_UNTRACKED));
221 NEW_WINDOW));
222 222
223 ExtensionTestMessageListener geometry_listener("ListenGeometryChange", true); 223 ExtensionTestMessageListener geometry_listener("ListenGeometryChange", true);
224 224
225 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 225 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
226 launched_listener.Reply("testRestoreAfterGeometryCacheChange"); 226 launched_listener.Reply("testRestoreAfterGeometryCacheChange");
227 227
228 ASSERT_TRUE(geometry_listener.WaitUntilSatisfied()); 228 ASSERT_TRUE(geometry_listener.WaitUntilSatisfied());
229 229
230 GeometryCacheChangeHelper geo_change_helper_1( 230 GeometryCacheChangeHelper geo_change_helper_1(
231 AppWindowGeometryCache::Get(browser()->profile()), 231 AppWindowGeometryCache::Get(browser()->profile()),
(...skipping 28 matching lines...) Expand all
260 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestFrameColors) { 260 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestFrameColors) {
261 ASSERT_TRUE(RunAppWindowAPITest("testFrameColors")) << message_; 261 ASSERT_TRUE(RunAppWindowAPITest("testFrameColors")) << message_;
262 } 262 }
263 #endif 263 #endif
264 264
265 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestVisibleOnAllWorkspaces) { 265 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestVisibleOnAllWorkspaces) {
266 ASSERT_TRUE( 266 ASSERT_TRUE(
267 RunAppWindowAPITestAndWaitForRoundTrip("testVisibleOnAllWorkspaces")) 267 RunAppWindowAPITestAndWaitForRoundTrip("testVisibleOnAllWorkspaces"))
268 << message_; 268 << message_;
269 } 269 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698