Home | History | Annotate | Download | only in ui

Lines Matching refs:browser

8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_init.h"
13 #include "chrome/browser/ui/browser_list.h"
14 #include "chrome/browser/ui/browser_window.h"
28 ExtensionService* service = browser()->profile()->GetExtensionService();
33 // Code that opens a new browser assumes we start with exactly one.
34 ASSERT_EQ(1u, BrowserList::GetBrowserCount(browser()->profile()));
39 ExtensionService* service = browser()->profile()->GetExtensionService();
43 // Check that there are two browsers. Find the one that is not |browser()|.
44 void FindOneOtherBrowser(Browser** out_other_browser) {
45 // There should only be one other browser.
46 ASSERT_EQ(2u, BrowserList::GetBrowserCount(browser()->profile()));
48 // Find the new browser.
49 Browser* other_browser = NULL;
52 if (*i != browser())
56 ASSERT_TRUE(other_browser != browser());
65 virtual void OnBrowserAdded(const Browser* browser) {
66 added_browser_ = browser;
69 virtual void OnBrowserRemoved(const Browser* browser) { }
71 const Browser* added_browser_;
74 // Test that when there is a popup as the active browser any requests to
82 // active" browser. That's because the browsers are set as "active" by
89 Browser* popup = Browser::CreateForType(Browser::TYPE_POPUP,
90 browser()->profile());
91 ASSERT_EQ(popup->type(), Browser::TYPE_POPUP);
116 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false));
119 // The launch should have created a new browser.
120 Browser* new_browser = NULL;
125 EXPECT_EQ(Browser::TYPE_APP, new_browser->type());
127 // The browser's app_name should include the app's ID.
144 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false));
147 // window. The launch should have created a new browser. Find the new
148 // browser.
149 Browser* new_browser = NULL;
154 EXPECT_EQ(Browser::TYPE_APP, new_browser->type());
156 // The browser's app_name should include the app's ID.
174 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false));
177 // open, the tab is open in a new browser window. Expect a new window.
178 ASSERT_EQ(2u, BrowserList::GetBrowserCount(browser()->profile()));
180 Browser* new_browser = NULL;
185 EXPECT_EQ(Browser::TYPE_NORMAL, new_browser->type());
187 // The browser's app_name should not include the app's ID: It is in a
188 // normal browser.
203 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false));
205 // The launch should have created a new browser, with a panel type.
206 Browser* new_browser = NULL;
211 EXPECT_EQ(Browser::TYPE_APP_POPUP, new_browser->type());
213 // The new browser's app_name should include the app's ID.