OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <fstream> | 7 #include <fstream> |
8 #include <iostream> | 8 #include <iostream> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 // Create a fresh, empty copy of this test directory. | 29 // Create a fresh, empty copy of this test directory. |
30 file_util::Delete(test_dir_, true); | 30 file_util::Delete(test_dir_, true); |
31 file_util::CreateDirectoryW(test_dir_); | 31 file_util::CreateDirectoryW(test_dir_); |
32 | 32 |
33 ASSERT_TRUE(file_util::PathExists(test_dir_)); | 33 ASSERT_TRUE(file_util::PathExists(test_dir_)); |
34 } | 34 } |
35 | 35 |
36 virtual void TearDown() { | 36 virtual void TearDown() { |
37 // Clean up test directory | 37 // Clean up test directory |
38 ASSERT_TRUE(file_util::Delete(test_dir_, false)); | 38 ASSERT_TRUE(file_util::Delete(test_dir_, true)); |
39 ASSERT_FALSE(file_util::PathExists(test_dir_)); | 39 ASSERT_FALSE(file_util::PathExists(test_dir_)); |
40 } | 40 } |
41 | 41 |
42 // the path to temporary directory used to contain the test operations | 42 // the path to temporary directory used to contain the test operations |
43 FilePath test_dir_; | 43 FilePath test_dir_; |
44 }; | 44 }; |
45 | 45 |
46 // Simple function to dump some text into a new file. | 46 // Simple function to dump some text into a new file. |
47 void CreateTextFile(const std::wstring& filename, | 47 void CreateTextFile(const std::wstring& filename, |
48 const std::wstring& contents) { | 48 const std::wstring& contents) { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 // verify everything is still there. | 214 // verify everything is still there. |
215 EXPECT_TRUE(file_util::PathExists(key_path)); | 215 EXPECT_TRUE(file_util::PathExists(key_path)); |
216 EXPECT_TRUE(file_util::PathExists(file_name_delete_1)); | 216 EXPECT_TRUE(file_util::PathExists(file_name_delete_1)); |
217 EXPECT_TRUE(file_util::PathExists(file_name_delete_2)); | 217 EXPECT_TRUE(file_util::PathExists(file_name_delete_2)); |
218 | 218 |
219 TerminateProcess(pi.hProcess, 0); | 219 TerminateProcess(pi.hProcess, 0); |
220 // make sure the handle is closed. | 220 // make sure the handle is closed. |
221 WaitForSingleObject(pi.hProcess, INFINITE); | 221 WaitForSingleObject(pi.hProcess, INFINITE); |
222 } | 222 } |
OLD | NEW |