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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 8733004: Make ExtensionService use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: + Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #if defined(OS_MACOSX) 10 #if defined(OS_MACOSX)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 return page_title; 158 return page_title;
159 #else 159 #else
160 // Do we need to use the above code on POSIX as well? 160 // Do we need to use the above code on POSIX as well?
161 return page_title; 161 return page_title;
162 #endif 162 #endif
163 } 163 }
164 164
165 // Returns the app extension aptly named "App Test". 165 // Returns the app extension aptly named "App Test".
166 const Extension* GetExtension() { 166 const Extension* GetExtension() {
167 const ExtensionList* extensions = 167 const ExtensionSet* extensions =
168 browser()->profile()->GetExtensionService()->extensions(); 168 browser()->profile()->GetExtensionService()->extensions();
169 for (size_t i = 0; i < extensions->size(); ++i) { 169 for (ExtensionSet::const_iterator it = extensions->begin();
170 if ((*extensions)[i]->name() == "App Test") 170 it != extensions->end(); ++it) {
171 return (*extensions)[i]; 171 if ((*it)->name() == "App Test")
172 return *it;
172 } 173 }
173 NOTREACHED(); 174 NOTREACHED();
174 return NULL; 175 return NULL;
175 } 176 }
176 }; 177 };
177 178
178 // Launch the app on a page with no title, check that the app title was set 179 // Launch the app on a page with no title, check that the app title was set
179 // correctly. 180 // correctly.
180 IN_PROC_BROWSER_TEST_F(BrowserTest, NoTitle) { 181 IN_PROC_BROWSER_TEST_F(BrowserTest, NoTitle) {
181 ui_test_utils::NavigateToURL(browser(), 182 ui_test_utils::NavigateToURL(browser(),
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 1393
1393 // The normal browser should now have four. 1394 // The normal browser should now have four.
1394 EXPECT_EQ(4, browser()->tab_count()); 1395 EXPECT_EQ(4, browser()->tab_count());
1395 1396
1396 // Close the additional browsers. 1397 // Close the additional browsers.
1397 popup_browser->CloseAllTabs(); 1398 popup_browser->CloseAllTabs();
1398 app_browser->CloseAllTabs(); 1399 app_browser->CloseAllTabs();
1399 app_popup_browser->CloseAllTabs(); 1400 app_popup_browser->CloseAllTabs();
1400 } 1401 }
1401 #endif 1402 #endif
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698