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

Side by Side Diff: sandbox/win/src/win_utils_unittest.cc

Issue 10689170: Move the Windows sandbox to sandbox/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of tree (properly this time) Created 8 years, 5 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 | « sandbox/win/src/win_utils.cc ('k') | sandbox/win/src/window.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) 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 <windows.h> 5 #include <windows.h>
6 6
7 #include "base/win/scoped_handle.h" 7 #include "base/win/scoped_handle.h"
8 #include "sandbox/src/win_utils.h" 8 #include "sandbox/win/src/win_utils.h"
9 #include "sandbox/tests/common/test_utils.h" 9 #include "sandbox/win/tests/common/test_utils.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 TEST(WinUtils, IsReparsePoint) { 12 TEST(WinUtils, IsReparsePoint) {
13 using sandbox::IsReparsePoint; 13 using sandbox::IsReparsePoint;
14 14
15 // Create a temp file because we need write access to it. 15 // Create a temp file because we need write access to it.
16 wchar_t temp_directory[MAX_PATH]; 16 wchar_t temp_directory[MAX_PATH];
17 wchar_t my_folder[MAX_PATH]; 17 wchar_t my_folder[MAX_PATH];
18 ASSERT_NE(::GetTempPath(MAX_PATH, temp_directory), 0u); 18 ASSERT_NE(::GetTempPath(MAX_PATH, temp_directory), 0u);
19 ASSERT_NE(::GetTempFileName(temp_directory, L"test", 0, my_folder), 0u); 19 ASSERT_NE(::GetTempFileName(temp_directory, L"test", 0, my_folder), 0u);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 EXPECT_TRUE(file.IsValid()); 74 EXPECT_TRUE(file.IsValid());
75 std::wstring file_name_nt1 = std::wstring(L"\\??\\") + file_name; 75 std::wstring file_name_nt1 = std::wstring(L"\\??\\") + file_name;
76 std::wstring file_name_nt2 = std::wstring(L"\\??\\") + folder + L"\\FOO.txT"; 76 std::wstring file_name_nt2 = std::wstring(L"\\??\\") + folder + L"\\FOO.txT";
77 EXPECT_TRUE(SameObject(file.Get(), file_name_nt1.c_str())); 77 EXPECT_TRUE(SameObject(file.Get(), file_name_nt1.c_str()));
78 EXPECT_TRUE(SameObject(file.Get(), file_name_nt2.c_str())); 78 EXPECT_TRUE(SameObject(file.Get(), file_name_nt2.c_str()));
79 79
80 file.Close(); 80 file.Close();
81 EXPECT_TRUE(::RemoveDirectory(my_folder)); 81 EXPECT_TRUE(::RemoveDirectory(my_folder));
82 } 82 }
OLDNEW
« no previous file with comments | « sandbox/win/src/win_utils.cc ('k') | sandbox/win/src/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698