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

Unified Diff: content/test/browser_test_base.cc

Issue 8036044: Add (not yet working) content_browsertests target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | « content/test/browser_test_base.h ('k') | content/test/content_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/browser_test_base.cc
===================================================================
--- content/test/browser_test_base.cc (revision 0)
+++ content/test/browser_test_base.cc (revision 0)
@@ -0,0 +1,47 @@
+// Copyright (c) 2011 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.
+
+#include "content/test/browser_test_base.h"
+
+#include "base/command_line.h"
+#include "base/task.h"
+#include "content/common/main_function_params.h"
+#include "sandbox/src/dep.h"
+
+#if defined(OS_MACOSX)
+#include "base/mac/mac_util.h"
+#include "base/system_monitor/system_monitor.h"
+#endif
+
+extern int BrowserMain(const MainFunctionParams&);
+
+BrowserTestBase::BrowserTestBase() {
+#if defined(OS_MACOSX)
+ base::mac::SetOverrideAmIBundled(true);
+ base::SystemMonitor::AllocateSystemIOPorts();
+#endif
+}
+
+BrowserTestBase::~BrowserTestBase() {
+}
+
+void BrowserTestBase::SetUp() {
+ SandboxInitWrapper sandbox_wrapper;
+ MainFunctionParams params(*CommandLine::ForCurrentProcess(),
+ sandbox_wrapper,
+ NULL);
+ params.ui_task =
+ NewRunnableMethod(this, &BrowserTestBase::ProxyRunTestOnMainThreadLoop);
+
+ SetUpInProcessBrowserTestFixture();
+ BrowserMain(params);
+ TearDownInProcessBrowserTestFixture();
+}
+
+void BrowserTestBase::TearDown() {
+}
+
+void BrowserTestBase::ProxyRunTestOnMainThreadLoop() {
+ RunTestOnMainThreadLoop();
+}
Property changes on: content\test\browser_test_base.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/test/browser_test_base.h ('k') | content/test/content_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698