Index: chrome/test/base/browser_with_content_test.h |
diff --git a/chrome/test/base/browser_with_content_test.h b/chrome/test/base/browser_with_content_test.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d69ec6731aedcc1db70d214d6203b8dbacbb5705 |
--- /dev/null |
+++ b/chrome/test/base/browser_with_content_test.h |
@@ -0,0 +1,55 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_TEST_BASE_BROWSER_WITH_CONTENT_TEST_H_ |
+#define CHROME_TEST_BASE_BROWSER_WITH_CONTENT_TEST_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "content/public/test/browser_test.h" |
+#include "content/public/test/browser_test_base.h" |
+ |
+namespace base { |
+ |
+#if defined(OS_MACOSX) |
+namespace mac { |
+class ScopedNSAutoreleasePool; |
+} // namespace mac |
+#endif |
+ |
+} // namespace base |
+ |
+#if defined(OS_MACOSX) |
+class ScopedBundleSwizzlerMac; |
+#endif |
+ |
+class Browser; |
+class TestingProfile; |
+ |
+// Base class for multiprocess browser based unit tests. BrowserWithContentTest |
+// creates a platform-specific Browser window with a TestingProfile, but uses a |
+// shell ContentBrowserClient, rather than Chrome's. |
+class BrowserWithContentTest : public content::BrowserTestBase { |
+ public: |
+ BrowserWithContentTest(); |
+ ~BrowserWithContentTest() override; |
+ |
+ // content::BrowserTestBase: |
+ void SetUp() override; |
+ void SetUpOnMainThread() override; |
+ void TearDownOnMainThread() override; |
+ void RunTestOnMainThreadLoop() override; |
+ |
+ private: |
+ scoped_ptr<TestingProfile> profile_; |
+ Browser* browser_; |
+ |
+#if defined(OS_MACOSX) |
+ base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
+ scoped_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_; |
+#endif // OS_MACOSX |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BrowserWithContentTest); |
+}; |
+ |
+#endif // CHROME_TEST_BASE_BROWSER_WITH_CONTENT_TEST_H_ |