Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6542)

Unified Diff: chrome/test/base/browser_with_content_test.h

Issue 1393233002: Mac Energy Test Harness/Framework Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Snapshot of scripts for http://crbug.com/391646 Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/base/browser_with_content_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/base/browser_with_content_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698