| 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/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" |
| 11 #include "base/scoped_temp_dir.h" | 11 #include "base/scoped_temp_dir.h" |
| 12 #include "content/public/common/page_transition_types.h" | 12 #include "content/public/common/page_transition_types.h" |
| 13 #include "content/public/test/browser_test.h" | 13 #include "content/public/test/browser_test.h" |
| 14 #include "content/test/browser_test_base.h" | 14 #include "content/public/test/browser_test_base.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 #if defined(OS_CHROMEOS) | 17 #if defined(OS_CHROMEOS) |
| 18 #include "chrome/browser/chromeos/cros/cros_library.h" | 18 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 19 #endif // defined(OS_CHROMEOS) | 19 #endif // defined(OS_CHROMEOS) |
| 20 | 20 |
| 21 #if defined(OS_MACOSX) | 21 #if defined(OS_MACOSX) |
| 22 namespace base { | 22 namespace base { |
| 23 namespace mac { | 23 namespace mac { |
| 24 class ScopedNSAutoreleasePool; | 24 class ScopedNSAutoreleasePool; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // | 86 // |
| 87 // IN_PROC_BROWSER_TEST_F(Foo, PRE_Bar) { | 87 // IN_PROC_BROWSER_TEST_F(Foo, PRE_Bar) { |
| 88 // do something | 88 // do something |
| 89 // } | 89 // } |
| 90 // | 90 // |
| 91 // IN_PROC_BROWSER_TEST_F(Foo, Bar) { | 91 // IN_PROC_BROWSER_TEST_F(Foo, Bar) { |
| 92 // verify something persisted from before | 92 // verify something persisted from before |
| 93 // } | 93 // } |
| 94 // | 94 // |
| 95 // This is recursive, so PRE_PRE_Bar would run before PRE_BAR. | 95 // This is recursive, so PRE_PRE_Bar would run before PRE_BAR. |
| 96 class InProcessBrowserTest : public BrowserTestBase { | 96 class InProcessBrowserTest : public content::BrowserTestBase { |
| 97 public: | 97 public: |
| 98 InProcessBrowserTest(); | 98 InProcessBrowserTest(); |
| 99 virtual ~InProcessBrowserTest(); | 99 virtual ~InProcessBrowserTest(); |
| 100 | 100 |
| 101 // Configures everything for an in process browser test, then invokes | 101 // Configures everything for an in process browser test, then invokes |
| 102 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. | 102 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. |
| 103 virtual void SetUp() OVERRIDE; | 103 virtual void SetUp() OVERRIDE; |
| 104 | 104 |
| 105 // Restores state configured in SetUp. | 105 // Restores state configured in SetUp. |
| 106 virtual void TearDown() OVERRIDE; | 106 virtual void TearDown() OVERRIDE; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 #if defined(OS_CHROMEOS) | 208 #if defined(OS_CHROMEOS) |
| 209 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; | 209 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; |
| 210 #endif // defined(OS_CHROMEOS) | 210 #endif // defined(OS_CHROMEOS) |
| 211 | 211 |
| 212 #if defined(OS_MACOSX) | 212 #if defined(OS_MACOSX) |
| 213 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; | 213 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
| 214 #endif // OS_MACOSX | 214 #endif // OS_MACOSX |
| 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 |