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

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

Issue 8789018: Revert 113047 - 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
Property Changes:
Added: svn:mergeinfo
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 ExtensionSet* extensions = 167 const ExtensionList* extensions =
168 browser()->profile()->GetExtensionService()->extensions(); 168 browser()->profile()->GetExtensionService()->extensions();
169 for (ExtensionSet::const_iterator it = extensions->begin(); 169 for (size_t i = 0; i < extensions->size(); ++i) {
170 it != extensions->end(); ++it) { 170 if ((*extensions)[i]->name() == "App Test")
171 if ((*it)->name() == "App Test") 171 return (*extensions)[i];
172 return *it;
173 } 172 }
174 NOTREACHED(); 173 NOTREACHED();
175 return NULL; 174 return NULL;
176 } 175 }
177 }; 176 };
178 177
179 // Launch the app on a page with no title, check that the app title was set 178 // Launch the app on a page with no title, check that the app title was set
180 // correctly. 179 // correctly.
181 IN_PROC_BROWSER_TEST_F(BrowserTest, NoTitle) { 180 IN_PROC_BROWSER_TEST_F(BrowserTest, NoTitle) {
182 ui_test_utils::NavigateToURL(browser(), 181 ui_test_utils::NavigateToURL(browser(),
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 1392
1394 // The normal browser should now have four. 1393 // The normal browser should now have four.
1395 EXPECT_EQ(4, browser()->tab_count()); 1394 EXPECT_EQ(4, browser()->tab_count());
1396 1395
1397 // Close the additional browsers. 1396 // Close the additional browsers.
1398 popup_browser->CloseAllTabs(); 1397 popup_browser->CloseAllTabs();
1399 app_browser->CloseAllTabs(); 1398 app_browser->CloseAllTabs();
1400 app_popup_browser->CloseAllTabs(); 1399 app_popup_browser->CloseAllTabs();
1401 } 1400 }
1402 #endif 1401 #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