| OLD | NEW |
| 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 #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 15 matching lines...) Expand all Loading... |
| 26 class ScopedNSAutoreleasePool; | 26 class ScopedNSAutoreleasePool; |
| 27 } // namespace mac | 27 } // namespace mac |
| 28 } // namespace base | 28 } // namespace base |
| 29 #endif // OS_MACOSX | 29 #endif // OS_MACOSX |
| 30 | 30 |
| 31 class Browser; | 31 class Browser; |
| 32 class CommandLine; | 32 class CommandLine; |
| 33 class Profile; | 33 class Profile; |
| 34 | 34 |
| 35 namespace content { | 35 namespace content { |
| 36 class BrowserContext; |
| 36 class ContentRendererClient; | 37 class ContentRendererClient; |
| 37 class ResourceContext; | 38 class ResourceContext; |
| 38 } | 39 } |
| 39 | 40 |
| 40 namespace net { | 41 namespace net { |
| 41 class RuleBasedHostResolverProc; | 42 class RuleBasedHostResolverProc; |
| 42 } | 43 } |
| 43 | 44 |
| 44 // Base class for tests wanting to bring up a browser in the unit test process. | 45 // Base class for tests wanting to bring up a browser in the unit test process. |
| 45 // Writing tests with InProcessBrowserTest is slightly different than that of | 46 // Writing tests with InProcessBrowserTest is slightly different than that of |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. | 91 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. |
| 91 virtual void SetUp() OVERRIDE; | 92 virtual void SetUp() OVERRIDE; |
| 92 | 93 |
| 93 // Restores state configured in SetUp. | 94 // Restores state configured in SetUp. |
| 94 virtual void TearDown() OVERRIDE; | 95 virtual void TearDown() OVERRIDE; |
| 95 | 96 |
| 96 protected: | 97 protected: |
| 97 // Returns the browser created by CreateBrowser. | 98 // Returns the browser created by CreateBrowser. |
| 98 Browser* browser() const { return browser_; } | 99 Browser* browser() const { return browser_; } |
| 99 | 100 |
| 100 // Returns the ResourceContext from browser_. Needed because tests in content | 101 // Returns the Resource/BrowserContext from browser_. Needed because tests in |
| 101 // don't have access to Profile. | 102 // content don't have access to Profile. |
| 103 content::BrowserContext* GetBrowserContext(); |
| 102 content::ResourceContext* GetResourceContext(); | 104 content::ResourceContext* GetResourceContext(); |
| 103 | 105 |
| 104 // Convenience methods for adding tabs to a Browser. | 106 // Convenience methods for adding tabs to a Browser. |
| 105 void AddTabAtIndexToBrowser(Browser* browser, | 107 void AddTabAtIndexToBrowser(Browser* browser, |
| 106 int index, | 108 int index, |
| 107 const GURL& url, | 109 const GURL& url, |
| 108 content::PageTransition transition); | 110 content::PageTransition transition); |
| 109 void AddTabAtIndex(int index, const GURL& url, | 111 void AddTabAtIndex(int index, const GURL& url, |
| 110 content::PageTransition transition); | 112 content::PageTransition transition); |
| 111 | 113 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 #if defined(OS_CHROMEOS) | 240 #if defined(OS_CHROMEOS) |
| 239 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; | 241 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; |
| 240 #endif // defined(OS_CHROMEOS) | 242 #endif // defined(OS_CHROMEOS) |
| 241 | 243 |
| 242 #if defined(OS_MACOSX) | 244 #if defined(OS_MACOSX) |
| 243 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; | 245 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
| 244 #endif // OS_MACOSX | 246 #endif // OS_MACOSX |
| 245 }; | 247 }; |
| 246 | 248 |
| 247 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 249 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
| OLD | NEW |