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

Side by Side Diff: chrome/test/base/in_process_browser_test.h

Issue 10965047: Remove some methods on InProcessBrowserTest that are no longer needed now that we have content_brow… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 #ifndef CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ 5 #ifndef CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ 6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 13 matching lines...) Expand all
24 class ScopedNSAutoreleasePool; 24 class ScopedNSAutoreleasePool;
25 } // namespace mac 25 } // namespace mac
26 } // namespace base 26 } // namespace base
27 #endif // OS_MACOSX 27 #endif // OS_MACOSX
28 28
29 class Browser; 29 class Browser;
30 class CommandLine; 30 class CommandLine;
31 class Profile; 31 class Profile;
32 32
33 namespace content { 33 namespace content {
34 class BrowserContext;
35 class ContentRendererClient; 34 class ContentRendererClient;
36 class ResourceContext;
37 } 35 }
38 36
39 namespace net { 37 namespace net {
40 class RuleBasedHostResolverProc; 38 class RuleBasedHostResolverProc;
41 } 39 }
42 40
43 // Base class for tests wanting to bring up a browser in the unit test process. 41 // Base class for tests wanting to bring up a browser in the unit test process.
44 // Writing tests with InProcessBrowserTest is slightly different than that of 42 // Writing tests with InProcessBrowserTest is slightly different than that of
45 // other tests. This is necessitated by InProcessBrowserTest running a message 43 // other tests. This is necessitated by InProcessBrowserTest running a message
46 // loop. To use InProcessBrowserTest do the following: 44 // loop. To use InProcessBrowserTest do the following:
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. 100 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop.
103 virtual void SetUp() OVERRIDE; 101 virtual void SetUp() OVERRIDE;
104 102
105 // Restores state configured in SetUp. 103 // Restores state configured in SetUp.
106 virtual void TearDown() OVERRIDE; 104 virtual void TearDown() OVERRIDE;
107 105
108 protected: 106 protected:
109 // Returns the browser created by CreateBrowser. 107 // Returns the browser created by CreateBrowser.
110 Browser* browser() const { return browser_; } 108 Browser* browser() const { return browser_; }
111 109
112 // Returns the Resource/BrowserContext from browser_. Needed because tests in
113 // content don't have access to Profile.
114 content::BrowserContext* GetBrowserContext();
115 content::ResourceContext* GetResourceContext();
116
117 // Convenience methods for adding tabs to a Browser. 110 // Convenience methods for adding tabs to a Browser.
118 void AddTabAtIndexToBrowser(Browser* browser, 111 void AddTabAtIndexToBrowser(Browser* browser,
119 int index, 112 int index,
120 const GURL& url, 113 const GURL& url,
121 content::PageTransition transition); 114 content::PageTransition transition);
122 void AddTabAtIndex(int index, const GURL& url, 115 void AddTabAtIndex(int index, const GURL& url,
123 content::PageTransition transition); 116 content::PageTransition transition);
124 117
125 // Initializes the contents of the user data directory. Called by SetUp() 118 // Initializes the contents of the user data directory. Called by SetUp()
126 // after creating the user data directory, but before any browser is launched. 119 // after creating the user data directory, but before any browser is launched.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 #if defined(OS_CHROMEOS) 201 #if defined(OS_CHROMEOS)
209 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; 202 chromeos::ScopedStubCrosEnabler stub_cros_enabler_;
210 #endif // defined(OS_CHROMEOS) 203 #endif // defined(OS_CHROMEOS)
211 204
212 #if defined(OS_MACOSX) 205 #if defined(OS_MACOSX)
213 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; 206 base::mac::ScopedNSAutoreleasePool* autorelease_pool_;
214 #endif // OS_MACOSX 207 #endif // OS_MACOSX
215 }; 208 };
216 209
217 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ 210 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_test.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698