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

Side by Side Diff: chrome/installer/util/self_cleaning_temp_dir_unittest.cc

Issue 7048007: Move scoped_temp_dir and scoped_native_library back from base/memory to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unknwn Created 9 years, 7 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/installer/util/product_unittest.h ('k') | chrome/installer/util/shell_util_unittest.cc » ('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 #include <wincrypt.h> 6 #include <wincrypt.h>
7 7
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/installer/util/self_cleaning_temp_dir.h" 12 #include "chrome/installer/util/self_cleaning_temp_dir.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace { 15 namespace {
16 16
17 // Returns a string of 8 characters consisting of the letter 'R' followed by 17 // Returns a string of 8 characters consisting of the letter 'R' followed by
18 // seven random hex digits. 18 // seven random hex digits.
19 std::wstring GetRandomFilename() { 19 std::wstring GetRandomFilename() {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 file_util::WriteFile(parent_temp_dir.Append(GetRandomFilename()), 128 file_util::WriteFile(parent_temp_dir.Append(GetRandomFilename()),
129 kHiHon, arraysize(kHiHon) - 1)); 129 kHiHon, arraysize(kHiHon) - 1));
130 } 130 }
131 EXPECT_FALSE(file_util::DirectoryExists(parent_temp_dir.Append(L"Three"))); 131 EXPECT_FALSE(file_util::DirectoryExists(parent_temp_dir.Append(L"Three")));
132 EXPECT_TRUE(file_util::DirectoryExists(parent_temp_dir)); 132 EXPECT_TRUE(file_util::DirectoryExists(parent_temp_dir));
133 EXPECT_TRUE(work_dir.Delete()); 133 EXPECT_TRUE(work_dir.Delete());
134 EXPECT_FALSE(file_util::DirectoryExists(parent_temp_dir.DirName().DirName())); 134 EXPECT_FALSE(file_util::DirectoryExists(parent_temp_dir.DirName().DirName()));
135 } 135 }
136 136
137 } // namespace installer 137 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/product_unittest.h ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698