Chromium Code Reviews| 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 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. | 101 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. |
| 102 void SetUp() override; | 102 void SetUp() override; |
| 103 | 103 |
| 104 // Restores state configured in SetUp. | 104 // Restores state configured in SetUp. |
| 105 void TearDown() override; | 105 void TearDown() override; |
| 106 | 106 |
| 107 protected: | 107 protected: |
| 108 // Returns the browser created by CreateBrowser. | 108 // Returns the browser created by CreateBrowser. |
| 109 Browser* browser() const { return browser_; } | 109 Browser* browser() const { return browser_; } |
| 110 | 110 |
| 111 // Closes the given browser and synchronously flushes all of its outstanding | |
| 112 // resources. | |
| 113 void CloseBrowserSynchronously(Browser* browser); | |
| 114 | |
| 115 // Closes all browsers. No guarantees are made about the destruction of | |
| 116 // outstanding resources. | |
|
erikchen
2015/07/08 22:05:44
There is only one caller of this method, and I jus
| |
| 117 void CloseAllBrowsers(); | |
| 118 | |
| 111 // Convenience methods for adding tabs to a Browser. | 119 // Convenience methods for adding tabs to a Browser. |
| 112 void AddTabAtIndexToBrowser(Browser* browser, | 120 void AddTabAtIndexToBrowser(Browser* browser, |
| 113 int index, | 121 int index, |
| 114 const GURL& url, | 122 const GURL& url, |
| 115 ui::PageTransition transition, | 123 ui::PageTransition transition, |
| 116 bool check_navigation_success); | 124 bool check_navigation_success); |
| 117 void AddTabAtIndex(int index, | 125 void AddTabAtIndex(int index, |
| 118 const GURL& url, | 126 const GURL& url, |
| 119 ui::PageTransition transition); | 127 ui::PageTransition transition); |
| 120 | 128 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 #if defined(OS_MACOSX) | 233 #if defined(OS_MACOSX) |
| 226 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; | 234 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
| 227 #endif // OS_MACOSX | 235 #endif // OS_MACOSX |
| 228 | 236 |
| 229 #if defined(OS_WIN) | 237 #if defined(OS_WIN) |
| 230 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; | 238 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; |
| 231 #endif | 239 #endif |
| 232 }; | 240 }; |
| 233 | 241 |
| 234 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 242 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
| OLD | NEW |