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

Side by Side Diff: content/common/sandbox_mac_unittest_helper.mm

Issue 347783002: Alter the design of the bootstrap sandbox to only take over the bootstrap port of children when nec… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/sandbox_mac.mm ('k') | content/plugin/plugin_main_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/sandbox_mac_unittest_helper.h" 5 #include "content/common/sandbox_mac_unittest_helper.h"
6 6
7 extern "C" { 7 extern "C" {
8 #include <sandbox.h> 8 #include <sandbox.h>
9 } 9 }
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 } // namespace internal 50 } // namespace internal
51 51
52 bool MacSandboxTest::RunTestInAllSandboxTypes(const char* test_name, 52 bool MacSandboxTest::RunTestInAllSandboxTypes(const char* test_name,
53 const char* test_data) { 53 const char* test_data) {
54 // Go through all the sandbox types, and run the test case in each of them 54 // Go through all the sandbox types, and run the test case in each of them
55 // if one fails, abort. 55 // if one fails, abort.
56 for(int i = static_cast<int>(SANDBOX_TYPE_FIRST_TYPE); 56 for(int i = static_cast<int>(SANDBOX_TYPE_FIRST_TYPE);
57 i < SANDBOX_TYPE_AFTER_LAST_TYPE; 57 i < SANDBOX_TYPE_AFTER_LAST_TYPE;
58 ++i) { 58 ++i) {
59 // This sandbox type is not enforced using a Seatbelt policy.
60 if (i == SANDBOX_TYPE_NPAPI)
61 continue;
62
63 if (!RunTestInSandbox(static_cast<SandboxType>(i), 59 if (!RunTestInSandbox(static_cast<SandboxType>(i),
64 test_name, test_data)) { 60 test_name, test_data)) {
65 LOG(ERROR) << "Sandboxed test (" << test_name << ")" << 61 LOG(ERROR) << "Sandboxed test (" << test_name << ")" <<
66 "Failed in sandbox type " << i << 62 "Failed in sandbox type " << i <<
67 "user data: (" << test_data << ")"; 63 "user data: (" << test_data << ")";
68 return false; 64 return false;
69 } 65 }
70 } 66 }
71 return true; 67 return true;
72 } 68 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 160
165 if (!test_case->SandboxedTest()) { 161 if (!test_case->SandboxedTest()) {
166 LOG(ERROR) << sandbox_test_name << "Failed sandboxed test"; 162 LOG(ERROR) << sandbox_test_name << "Failed sandboxed test";
167 return -1; 163 return -1;
168 } 164 }
169 165
170 return 0; 166 return 0;
171 } 167 }
172 168
173 } // namespace content 169 } // namespace content
OLDNEW
« no previous file with comments | « content/common/sandbox_mac.mm ('k') | content/plugin/plugin_main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698