Index: content/common/sandbox_mac_unittest_helper.mm |
=================================================================== |
--- content/common/sandbox_mac_unittest_helper.mm (revision 163460) |
+++ content/common/sandbox_mac_unittest_helper.mm (working copy) |
@@ -17,8 +17,7 @@ |
#include "content/test/test_content_client.h" |
#include "testing/multiprocess_func_list.h" |
-using sandbox::Sandbox; |
- |
+namespace content { |
namespace { |
const char* kSandboxTypeKey = "CHROMIUM_SANDBOX_SANDBOX_TYPE"; |
@@ -27,8 +26,6 @@ |
} // namespace |
-namespace sandboxtest { |
- |
// Support infrastructure for REGISTER_SANDBOX_TEST_CASE macro. |
namespace internal { |
@@ -55,11 +52,11 @@ |
const char* test_data) { |
// Go through all the sandbox types, and run the test case in each of them |
// if one fails, abort. |
- for(int i = static_cast<int>(content::SANDBOX_TYPE_FIRST_TYPE); |
- i < content::SANDBOX_TYPE_AFTER_LAST_TYPE; |
+ for(int i = static_cast<int>(SANDBOX_TYPE_FIRST_TYPE); |
+ i < SANDBOX_TYPE_AFTER_LAST_TYPE; |
++i) { |
- if (!RunTestInSandbox(static_cast<content::SandboxType>(i), |
+ if (!RunTestInSandbox(static_cast<SandboxType>(i), |
test_name, test_data)) { |
LOG(ERROR) << "Sandboxed test (" << test_name << ")" << |
"Failed in sandbox type " << i << |
@@ -70,7 +67,7 @@ |
return true; |
} |
-bool MacSandboxTest::RunTestInSandbox(content::SandboxType sandbox_type, |
+bool MacSandboxTest::RunTestInSandbox(SandboxType sandbox_type, |
const char* test_name, |
const char* test_data) { |
std::stringstream s; |
@@ -119,23 +116,18 @@ |
return it->second; |
} |
-} // namespace sandboxtest |
- |
-namespace { |
- |
// Main function for driver process that enables the sandbox and runs test |
// code. |
MULTIPROCESS_TEST_MAIN(mac_sandbox_test_runner) { |
TestContentClient content_client; |
- content::SetContentClient(&content_client); |
+ SetContentClient(&content_client); |
// Extract parameters. |
char* sandbox_type_str = getenv(kSandboxTypeKey); |
if (!sandbox_type_str) { |
LOG(ERROR) << "Sandbox type not specified"; |
return -1; |
} |
- content::SandboxType sandbox_type = |
- static_cast<content::SandboxType>(atoi(sandbox_type_str)); |
+ SandboxType sandbox_type = static_cast<SandboxType>(atoi(sandbox_type_str)); |
char* sandbox_test_name = getenv(kSandboxTestNameKey); |
if (!sandbox_test_name) { |
LOG(ERROR) << "Sandbox test name not specified"; |
@@ -145,8 +137,8 @@ |
const char* test_data = getenv(kTestDataKey); |
// Find Test Function to run; |
- scoped_ptr<sandboxtest::MacSandboxTestCase> |
- test_case(sandboxtest::SandboxTestForName(sandbox_test_name)); |
+ scoped_ptr<MacSandboxTestCase> |
+ test_case(SandboxTestForName(sandbox_test_name)); |
if (!test_case.get()) { |
LOG(ERROR) << "Invalid sandbox test name (" << sandbox_test_name << ")"; |
return -1; |
@@ -175,4 +167,4 @@ |
return 0; |
} |
-} // namespace |
+} // namespace content |