OLD | NEW |
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 #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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // Restores state configured in SetUp. | 85 // Restores state configured in SetUp. |
86 virtual void TearDown() OVERRIDE; | 86 virtual void TearDown() OVERRIDE; |
87 | 87 |
88 protected: | 88 protected: |
89 // Returns the browser created by CreateBrowser. | 89 // Returns the browser created by CreateBrowser. |
90 Browser* browser() const { return browser_; } | 90 Browser* browser() const { return browser_; } |
91 | 91 |
92 // Returns the ResourceContext from browser_. Needed because tests in content | 92 // Returns the ResourceContext from browser_. Needed because tests in content |
93 // don't have access to Profile. | 93 // don't have access to Profile. |
94 const content::ResourceContext& GetResourceContext(); | 94 content::ResourceContext* GetResourceContext(); |
95 | 95 |
96 // Convenience methods for adding tabs to a Browser. | 96 // Convenience methods for adding tabs to a Browser. |
97 void AddTabAtIndexToBrowser(Browser* browser, | 97 void AddTabAtIndexToBrowser(Browser* browser, |
98 int index, | 98 int index, |
99 const GURL& url, | 99 const GURL& url, |
100 content::PageTransition transition); | 100 content::PageTransition transition); |
101 void AddTabAtIndex(int index, const GURL& url, | 101 void AddTabAtIndex(int index, const GURL& url, |
102 content::PageTransition transition); | 102 content::PageTransition transition); |
103 | 103 |
104 // Adds a selected tab at |index| to |url| with the specified |transition|. | 104 // Adds a selected tab at |index| to |url| with the specified |transition|. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // Temporary user data directory. Used only when a user data directory is not | 198 // Temporary user data directory. Used only when a user data directory is not |
199 // specified in the command line. | 199 // specified in the command line. |
200 ScopedTempDir temp_user_data_dir_; | 200 ScopedTempDir temp_user_data_dir_; |
201 | 201 |
202 #if defined(OS_CHROMEOS) | 202 #if defined(OS_CHROMEOS) |
203 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; | 203 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; |
204 #endif // defined(OS_CHROMEOS) | 204 #endif // defined(OS_CHROMEOS) |
205 }; | 205 }; |
206 | 206 |
207 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 207 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
OLD | NEW |