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

Unified Diff: sandbox/linux/tests/main.cc

Issue 881733002: Add namespace sandbox class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nested namespace sandboxes aren't supported. Created 5 years, 11 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
Index: sandbox/linux/tests/main.cc
diff --git a/sandbox/linux/tests/main.cc b/sandbox/linux/tests/main.cc
index 81a0b320b19c85486a457855d3dbcded3212bfd5..17b4fe7e501ca0aed5869278046a2e5a9d1f86d8 100644
--- a/sandbox/linux/tests/main.cc
+++ b/sandbox/linux/tests/main.cc
@@ -3,11 +3,14 @@
// found in the LICENSE file.
#include "base/at_exit.h"
+#include "base/base_switches.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/test/test_suite.h"
#include "sandbox/linux/tests/test_utils.h"
#include "sandbox/linux/tests/unit_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/multiprocess_func_list.h"
namespace sandbox {
namespace {
@@ -30,6 +33,15 @@ void UnitTestAssertHandler(const std::string& str) {
#endif
int main(int argc, char* argv[]) {
+ base::CommandLine::Init(argc, argv);
+ std::string client_func =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kTestChildProcess);
+ if (!client_func.empty()) {
+ base::AtExitManager exit_manager;
+ return multi_process_function_list::InvokeChildProcessTest(client_func);
+ }
+
#if defined(OS_ANDROID)
// The use of Callbacks requires an AtExitManager.
base::AtExitManager exit_manager;

Powered by Google App Engine
This is Rietveld 408576698