OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_TEST_BASE_BROWSER_WITH_CONTENT_TEST_H_ |
| 6 #define CHROME_TEST_BASE_BROWSER_WITH_CONTENT_TEST_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/public/test/browser_test.h" |
| 10 #include "content/public/test/browser_test_base.h" |
| 11 |
| 12 namespace base { |
| 13 |
| 14 #if defined(OS_MACOSX) |
| 15 namespace mac { |
| 16 class ScopedNSAutoreleasePool; |
| 17 } // namespace mac |
| 18 #endif |
| 19 |
| 20 } // namespace base |
| 21 |
| 22 #if defined(OS_MACOSX) |
| 23 class ScopedBundleSwizzlerMac; |
| 24 #endif |
| 25 |
| 26 class Browser; |
| 27 class TestingProfile; |
| 28 |
| 29 // Base class for multiprocess browser based unit tests. BrowserWithContentTest |
| 30 // creates a platform-specific Browser window with a TestingProfile, but uses a |
| 31 // shell ContentBrowserClient, rather than Chrome's. |
| 32 class BrowserWithContentTest : public content::BrowserTestBase { |
| 33 public: |
| 34 BrowserWithContentTest(); |
| 35 ~BrowserWithContentTest() override; |
| 36 |
| 37 // content::BrowserTestBase: |
| 38 void SetUp() override; |
| 39 void SetUpOnMainThread() override; |
| 40 void TearDownOnMainThread() override; |
| 41 void RunTestOnMainThreadLoop() override; |
| 42 |
| 43 private: |
| 44 scoped_ptr<TestingProfile> profile_; |
| 45 Browser* browser_; |
| 46 |
| 47 #if defined(OS_MACOSX) |
| 48 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
| 49 scoped_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_; |
| 50 #endif // OS_MACOSX |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(BrowserWithContentTest); |
| 53 }; |
| 54 |
| 55 #endif // CHROME_TEST_BASE_BROWSER_WITH_CONTENT_TEST_H_ |
OLD | NEW |