| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/public/common/page_transition_types.h" | |
| 13 #include "content/public/test/browser_test.h" | 12 #include "content/public/test/browser_test.h" |
| 14 #include "content/public/test/browser_test_base.h" | 13 #include "content/public/test/browser_test_base.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "ui/base/page_transition_types.h" |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 | 18 |
| 19 class CommandLine; | 19 class CommandLine; |
| 20 | 20 |
| 21 #if defined(OS_MACOSX) | 21 #if defined(OS_MACOSX) |
| 22 namespace mac { | 22 namespace mac { |
| 23 class ScopedNSAutoreleasePool; | 23 class ScopedNSAutoreleasePool; |
| 24 } // namespace mac | 24 } // namespace mac |
| 25 #endif // defined(OS_MACOSX) | 25 #endif // defined(OS_MACOSX) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 virtual void TearDown() OVERRIDE; | 104 virtual void TearDown() OVERRIDE; |
| 105 | 105 |
| 106 protected: | 106 protected: |
| 107 // Returns the browser created by CreateBrowser. | 107 // Returns the browser created by CreateBrowser. |
| 108 Browser* browser() const { return browser_; } | 108 Browser* browser() const { return browser_; } |
| 109 | 109 |
| 110 // Convenience methods for adding tabs to a Browser. | 110 // Convenience methods for adding tabs to a Browser. |
| 111 void AddTabAtIndexToBrowser(Browser* browser, | 111 void AddTabAtIndexToBrowser(Browser* browser, |
| 112 int index, | 112 int index, |
| 113 const GURL& url, | 113 const GURL& url, |
| 114 content::PageTransition transition); | 114 ui::PageTransition transition); |
| 115 void AddTabAtIndex(int index, const GURL& url, | 115 void AddTabAtIndex(int index, const GURL& url, |
| 116 content::PageTransition transition); | 116 ui::PageTransition transition); |
| 117 | 117 |
| 118 // Initializes the contents of the user data directory. Called by SetUp() | 118 // Initializes the contents of the user data directory. Called by SetUp() |
| 119 // 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. |
| 120 // If a test wishes to set up some initial non-empty state in the user data | 120 // If a test wishes to set up some initial non-empty state in the user data |
| 121 // directory before the browser starts up, it can do so here. Returns true if | 121 // directory before the browser starts up, it can do so here. Returns true if |
| 122 // successful. | 122 // successful. |
| 123 virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT; | 123 virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT; |
| 124 | 124 |
| 125 // BrowserTestBase: | 125 // BrowserTestBase: |
| 126 virtual void RunTestOnMainThreadLoop() OVERRIDE; | 126 virtual void RunTestOnMainThreadLoop() OVERRIDE; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 #if defined(OS_MACOSX) | 208 #if defined(OS_MACOSX) |
| 209 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; | 209 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
| 210 #endif // OS_MACOSX | 210 #endif // OS_MACOSX |
| 211 | 211 |
| 212 #if defined(OS_WIN) | 212 #if defined(OS_WIN) |
| 213 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; | 213 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; |
| 214 #endif | 214 #endif |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 217 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
| OLD | NEW |