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

Side by Side Diff: chrome/test/nacl/nacl_sandbox_test.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/nacl/nacl_sandbox_test.h ('k') | chrome/test/nacl/nacl_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/test/nacl/nacl_sandbox_test.h"
6
7 #include "base/file_util.h"
8 #include "base/path_service.h"
9 #include "base/test/test_timeouts.h"
10 #include "chrome/common/chrome_switches.h"
11
12 namespace {
13
14 // Base url is specified in nacl_test.
15 // We just need to visit a page that will trigger the NaCl loader.
16 const FilePath::CharType kANaClHtmlFile[] =
17 FILE_PATH_LITERAL("srpc_hw_ppapi.html");
18
19 } // namespace
20
21 NaClSandboxTest::NaClSandboxTest() {
22 // Append the --test-nacl-sandbox=$TESTDLL flag before launching.
23 FilePath dylib_dir;
24 PathService::Get(base::DIR_EXE, &dylib_dir);
25 #if defined(OS_MACOSX)
26 dylib_dir = dylib_dir.AppendASCII("libnacl_security_tests.dylib");
27 launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir);
28 #elif defined(OS_WIN)
29 // Let the NaCl process detect if it is 64-bit or not and hack on
30 // the appropriate suffix to this dll.
31 dylib_dir = dylib_dir.AppendASCII("nacl_security_tests");
32 launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir);
33 #elif defined(OS_LINUX)
34 // We currently do not test the Chrome Linux SUID or seccomp sandboxes.
35 #endif
36 }
37
38 NaClSandboxTest::~NaClSandboxTest() {
39 }
40
41 // TODO(bradnelson): re-enable after finding a way to inject env variables.
42 TEST_F(NaClSandboxTest, DISABLED_NaClOuterSBTest) {
43 // Load a helloworld .nexe to trigger the nacl loader test.
44 FilePath test_file(kANaClHtmlFile);
45 RunTest(test_file, TestTimeouts::action_max_timeout_ms());
46 }
OLDNEW
« no previous file with comments | « chrome/test/nacl/nacl_sandbox_test.h ('k') | chrome/test/nacl/nacl_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698