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

Side by Side Diff: chrome/browser/nacl_host/nacl_file_host_unittest.cc

Issue 14352005: Rename pnacl_file_host to nacl_file_host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/browser/nacl_host/nacl_file_host.cc ('k') | chrome/browser/nacl_host/pnacl_file_host.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/nacl_host/pnacl_file_host.h" 5 #include "chrome/browser/nacl_host/nacl_file_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/test/scoped_path_override.h" 11 #include "base/test/scoped_path_override.h"
12 #include "chrome/common/chrome_paths.h" 12 #include "chrome/common/chrome_paths.h"
13 13
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using pnacl_file_host::PnaclCanOpenFile; 16 using nacl_file_host::PnaclCanOpenFile;
17 17
18 // Try to pass a few funny filenames with a dummy pnacl directory set. 18 // Try to pass a few funny filenames with a dummy pnacl directory set.
19 TEST(PnaclFileHostTest, TestFilenamesWithPnaclPath) { 19 TEST(PnaclFileHostTest, TestFilenamesWithPnaclPath) {
20 base::ScopedTempDir scoped_tmp_dir; 20 base::ScopedTempDir scoped_tmp_dir;
21 ASSERT_TRUE(scoped_tmp_dir.CreateUniqueTempDir()); 21 ASSERT_TRUE(scoped_tmp_dir.CreateUniqueTempDir());
22 22
23 base::FilePath kDummyPnaclPath = scoped_tmp_dir.path(); 23 base::FilePath kDummyPnaclPath = scoped_tmp_dir.path();
24 base::ScopedPathOverride pnach_dir_override(chrome::DIR_PNACL_COMPONENT, 24 base::ScopedPathOverride pnach_dir_override(chrome::DIR_PNACL_COMPONENT,
25 kDummyPnaclPath); 25 kDummyPnaclPath);
26 ASSERT_TRUE(PathService::Get(chrome::DIR_PNACL_COMPONENT, 26 ASSERT_TRUE(PathService::Get(chrome::DIR_PNACL_COMPONENT,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 EXPECT_FALSE(PnaclCanOpenFile("..\\llc", &out_path)); 64 EXPECT_FALSE(PnaclCanOpenFile("..\\llc", &out_path));
65 EXPECT_FALSE(PnaclCanOpenFile("%SystemRoot%", &out_path)); 65 EXPECT_FALSE(PnaclCanOpenFile("%SystemRoot%", &out_path));
66 EXPECT_FALSE(PnaclCanOpenFile("%SystemRoot%\\explorer.exe", &out_path)); 66 EXPECT_FALSE(PnaclCanOpenFile("%SystemRoot%\\explorer.exe", &out_path));
67 #else 67 #else
68 EXPECT_FALSE(PnaclCanOpenFile("../llc", &out_path)); 68 EXPECT_FALSE(PnaclCanOpenFile("../llc", &out_path));
69 EXPECT_FALSE(PnaclCanOpenFile("/bin/sh", &out_path)); 69 EXPECT_FALSE(PnaclCanOpenFile("/bin/sh", &out_path));
70 EXPECT_FALSE(PnaclCanOpenFile("$HOME", &out_path)); 70 EXPECT_FALSE(PnaclCanOpenFile("$HOME", &out_path));
71 EXPECT_FALSE(PnaclCanOpenFile("$HOME/.bashrc", &out_path)); 71 EXPECT_FALSE(PnaclCanOpenFile("$HOME/.bashrc", &out_path));
72 #endif 72 #endif
73 } 73 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_file_host.cc ('k') | chrome/browser/nacl_host/pnacl_file_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698