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

Unified Diff: chrome/test/nacl_security_tests/nacl_security_tests_mac.cc

Issue 7831053: Move NaCl tests out of chrome/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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: chrome/test/nacl_security_tests/nacl_security_tests_mac.cc
===================================================================
--- chrome/test/nacl_security_tests/nacl_security_tests_mac.cc (revision 100205)
+++ chrome/test/nacl_security_tests/nacl_security_tests_mac.cc (working copy)
@@ -1,46 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-
-#include "chrome/test/nacl_security_tests/nacl_security_tests_posix.h"
-#include <string>
-#include "testing/gtest/include/gtest/gtest.h"
-#include "chrome/test/nacl_security_tests/commands_posix.h"
-
-__attribute__((constructor))
-static void initializer(void) {
-}
-
-__attribute__((destructor))
-static void finalizer(void) {
-}
-
-namespace {
-void CheckDenied(sandbox::SboxTestResult x) {
- EXPECT_EQ(sandbox::SBOX_TEST_DENIED, x);
-}
-} // anon namespace
-
-extern "C"
-__attribute__((visibility("default")))
-bool RunNaClLoaderTests(void) {
- CheckDenied(sandbox::TestOpenReadFile("/etc"));
- CheckDenied(sandbox::TestOpenReadFile("/tmp"));
- CheckDenied(sandbox::TestOpenReadFile("$HOME"));
- CheckDenied(sandbox::TestOpenWriteFile("/etc"));
- CheckDenied(sandbox::TestOpenWriteFile("/etc/passwd"));
- CheckDenied(sandbox::TestOpenWriteFile("/bin"));
- CheckDenied(sandbox::TestOpenWriteFile("/usr/bin"));
- CheckDenied(sandbox::TestOpenWriteFile("/usr/bin/bash"));
- CheckDenied(sandbox::TestOpenWriteFile("/usr/bin/login"));
- CheckDenied(sandbox::TestOpenWriteFile("/usr/sbin"));
- CheckDenied(sandbox::TestOpenWriteFile("$HOME"));
-
- CheckDenied(sandbox::TestCreateProcess("/usr/bin/env"));
- CheckDenied(sandbox::TestConnect("www.archive.org"));
-
- return !(testing::Test::HasFatalFailure() ||
- testing::Test::HasNonfatalFailure());
-}
-

Powered by Google App Engine
This is Rietveld 408576698