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

Side by Side Diff: chrome/installer/setup/setup_util_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/setup/setup_main.cc ('k') | chrome/installer/util/copy_tree_work_item.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/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_temp_dir.h"
10 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
13 #include "chrome/common/chrome_paths.h" 13 #include "chrome/common/chrome_paths.h"
14 #include "chrome/installer/setup/setup_util.h" 14 #include "chrome/installer/setup/setup_util.h"
15 #include "chrome/installer/util/master_preferences.h" 15 #include "chrome/installer/util/master_preferences.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 namespace { 18 namespace {
19 class SetupUtilTest : public testing::Test { 19 class SetupUtilTest : public testing::Test {
20 protected: 20 protected:
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 TEST_F(SetupUtilTest, DeleteFileFromTempProcess) { 144 TEST_F(SetupUtilTest, DeleteFileFromTempProcess) {
145 FilePath test_file; 145 FilePath test_file;
146 file_util::CreateTemporaryFileInDir(test_dir_.path(), &test_file); 146 file_util::CreateTemporaryFileInDir(test_dir_.path(), &test_file);
147 ASSERT_TRUE(file_util::PathExists(test_file)); 147 ASSERT_TRUE(file_util::PathExists(test_file));
148 file_util::WriteFile(test_file, "foo", 3); 148 file_util::WriteFile(test_file, "foo", 3);
149 EXPECT_TRUE(installer::DeleteFileFromTempProcess(test_file, 0)); 149 EXPECT_TRUE(installer::DeleteFileFromTempProcess(test_file, 0));
150 base::PlatformThread::Sleep(200); 150 base::PlatformThread::Sleep(200);
151 EXPECT_FALSE(file_util::PathExists(test_file)); 151 EXPECT_FALSE(file_util::PathExists(test_file));
152 } 152 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/copy_tree_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698