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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 <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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 #endif 255 #endif
256 } 256 }
257 257
258 // Returns the app extension aptly named "App Test". 258 // Returns the app extension aptly named "App Test".
259 const Extension* GetExtension() { 259 const Extension* GetExtension() {
260 const ExtensionSet* extensions = extensions::ExtensionSystem::Get( 260 const ExtensionSet* extensions = extensions::ExtensionSystem::Get(
261 browser()->profile())->extension_service()->extensions(); 261 browser()->profile())->extension_service()->extensions();
262 for (ExtensionSet::const_iterator it = extensions->begin(); 262 for (ExtensionSet::const_iterator it = extensions->begin();
263 it != extensions->end(); ++it) { 263 it != extensions->end(); ++it) {
264 if ((*it)->name() == "App Test") 264 if ((*it)->name() == "App Test")
265 return *it; 265 return it->get();
266 } 266 }
267 NOTREACHED(); 267 NOTREACHED();
268 return NULL; 268 return NULL;
269 } 269 }
270 }; 270 };
271 271
272 // Launch the app on a page with no title, check that the app title was set 272 // Launch the app on a page with no title, check that the app title was set
273 // correctly. 273 // correctly.
274 IN_PROC_BROWSER_TEST_F(BrowserTest, NoTitle) { 274 IN_PROC_BROWSER_TEST_F(BrowserTest, NoTitle) {
275 ui_test_utils::NavigateToURL( 275 ui_test_utils::NavigateToURL(
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2195 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2196 } 2196 }
2197 2197
2198 // Shift-middle-clicks open in a foreground tab. 2198 // Shift-middle-clicks open in a foreground tab.
2199 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) { 2199 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) {
2200 int modifiers = WebKit::WebInputEvent::ShiftKey; 2200 int modifiers = WebKit::WebInputEvent::ShiftKey;
2201 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle; 2201 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle;
2202 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB; 2202 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB;
2203 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2203 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2204 } 2204 }
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698