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

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

Issue 303293002: Initialize the bootstrap sandbox in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename constant 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/content_browser.gypi » ('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;
59 62
60 if (!RunTestInSandbox(static_cast<SandboxType>(i), 63 if (!RunTestInSandbox(static_cast<SandboxType>(i),
61 test_name, test_data)) { 64 test_name, test_data)) {
62 LOG(ERROR) << "Sandboxed test (" << test_name << ")" << 65 LOG(ERROR) << "Sandboxed test (" << test_name << ")" <<
63 "Failed in sandbox type " << i << 66 "Failed in sandbox type " << i <<
64 "user data: (" << test_data << ")"; 67 "user data: (" << test_data << ")";
65 return false; 68 return false;
66 } 69 }
67 } 70 }
68 return true; 71 return true;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 164
162 if (!test_case->SandboxedTest()) { 165 if (!test_case->SandboxedTest()) {
163 LOG(ERROR) << sandbox_test_name << "Failed sandboxed test"; 166 LOG(ERROR) << sandbox_test_name << "Failed sandboxed test";
164 return -1; 167 return -1;
165 } 168 }
166 169
167 return 0; 170 return 0;
168 } 171 }
169 172
170 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « content/common/sandbox_mac.mm ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698