diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-13 08:02:06 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-13 08:02:06 +0000 |
commit | b0c7f613f8b7fd87106e730d6418c76e48764ba8 (patch) | |
tree | fd9fe89ee72120cdc7af117659f9e21c7d457474 /chrome/common/sandbox_mac.h | |
parent | 38a74e7cecca512ae344b206d0729764512b2401 (diff) | |
download | chromium_src-b0c7f613f8b7fd87106e730d6418c76e48764ba8.zip chromium_src-b0c7f613f8b7fd87106e730d6418c76e48764ba8.tar.gz chromium_src-b0c7f613f8b7fd87106e730d6418c76e48764ba8.tar.bz2 |
Mac: Testing infrastructure for sandboxed tests.
Create an initial framework for running tests across all Chrome sandbox types.
Also added 2 simple initial tests to illustrate usage.
The main motivation for adding this code is for an upcoming x-process font loading cl which needs this infrastructure.
Test case registration is currently done manually. It would be better to have a macro that does this at compile time but given the small number of current tests this seems like overkill at this point.
BUG=37285
TEST=Unit tests should pass
Review URL: http://codereview.chromium.org/1993005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/sandbox_mac.h')
-rw-r--r-- | chrome/common/sandbox_mac.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/common/sandbox_mac.h b/chrome/common/sandbox_mac.h index c8ef4c3..8065298 100644 --- a/chrome/common/sandbox_mac.h +++ b/chrome/common/sandbox_mac.h @@ -10,7 +10,10 @@ namespace sandbox { enum SandboxProcessType { - SANDBOX_TYPE_RENDERER, + + SANDBOX_TYPE_FIRST_TYPE, // Placeholder to ease iteration. + + SANDBOX_TYPE_RENDERER = SANDBOX_TYPE_FIRST_TYPE, // The worker processes uses the most restrictive sandbox which has almost // *everything* locked down. Only a couple of /System/Library/ paths and @@ -26,6 +29,8 @@ enum SandboxProcessType { // loader contains the user's untrusted code. SANDBOX_TYPE_NACL_PLUGIN, SANDBOX_TYPE_NACL_LOADER, + + SANDBOX_AFTER_TYPE_LAST_TYPE, // Placeholder to ease iteration. }; // Warm up System APIs that empirically need to be accessed before the Sandbox |