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

Side by Side Diff: chrome/browser/ui/panels/panel_app_browsertest.cc

Issue 10332071: Pass command line arguments onto platform apps which provide the right intent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows tests fixed Created 8 years, 7 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 | Annotate | Revision Log
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "chrome/browser/extensions/extension_browsertest.h" 7 #include "chrome/browser/extensions/extension_browsertest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 EXPECT_TRUE(extension); 48 EXPECT_TRUE(extension);
49 49
50 size_t browser_count = BrowserList::size(); 50 size_t browser_count = BrowserList::size();
51 51
52 application_launch::OpenApplication( 52 application_launch::OpenApplication(
53 browser()->profile(), 53 browser()->profile(),
54 extension, 54 extension,
55 // Overriding manifest to open in a panel. 55 // Overriding manifest to open in a panel.
56 extension_misc::LAUNCH_PANEL, 56 extension_misc::LAUNCH_PANEL,
57 GURL(), 57 GURL(),
58 NEW_WINDOW); 58 NEW_WINDOW,
59 NULL);
59 60
60 // Now we have a new browser instance. 61 // Now we have a new browser instance.
61 EXPECT_EQ(browser_count + 1, BrowserList::size()); 62 EXPECT_EQ(browser_count + 1, BrowserList::size());
62 } 63 }
63 64
64 void CloseWindowAndWait(Browser* browser) { 65 void CloseWindowAndWait(Browser* browser) {
65 // Closing a browser window may involve several async tasks. Need to use 66 // Closing a browser window may involve several async tasks. Need to use
66 // message pump and wait for the notification. 67 // message pump and wait for the notification.
67 size_t browser_count = BrowserList::size(); 68 size_t browser_count = BrowserList::size();
68 ui_test_utils::WindowedNotificationObserver signal( 69 ui_test_utils::WindowedNotificationObserver signal(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 EXPECT_TRUE(new_browser->is_type_panel()); 101 EXPECT_TRUE(new_browser->is_type_panel());
101 102
102 // Now also check that PanelManager has one new Panel under management. 103 // Now also check that PanelManager has one new Panel under management.
103 EXPECT_EQ(1, panel_manager->num_panels()); 104 EXPECT_EQ(1, panel_manager->num_panels());
104 105
105 CloseWindowAndWait(new_browser); 106 CloseWindowAndWait(new_browser);
106 107
107 EXPECT_EQ(0, panel_manager->num_panels()); 108 EXPECT_EQ(0, panel_manager->num_panels());
108 EXPECT_EQ(1u, BrowserList::size()); 109 EXPECT_EQ(1u, BrowserList::size());
109 } 110 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/application_launch.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698