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

Unified Diff: chrome/installer/util/copy_tree_work_item_unittest.cc

Issue 280004: Revert wstring patch (r29078 and follow up commits). It is causing failures o... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/copy_tree_work_item.cc ('k') | chrome/installer/util/delete_after_reboot_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/copy_tree_work_item_unittest.cc
===================================================================
--- chrome/installer/util/copy_tree_work_item_unittest.cc (revision 29084)
+++ chrome/installer/util/copy_tree_work_item_unittest.cc (working copy)
@@ -61,11 +61,11 @@
file.close();
}
- bool IsFileInUse(const FilePath& path) {
+ bool IsFileInUse(const std::wstring& path) {
if (!file_util::PathExists(path))
return false;
- HANDLE handle = ::CreateFile(path.value().c_str(), FILE_ALL_ACCESS,
+ HANDLE handle = ::CreateFile(path.c_str(), FILE_ALL_ACCESS,
NULL, NULL, OPEN_EXISTING, NULL, NULL);
if (handle == INVALID_HANDLE_VALUE)
return true;
@@ -478,10 +478,10 @@
file_name_from.ToWStringHack(), file_name_to.ToWStringHack(),
temp_dir_.ToWStringHack(), WorkItem::NEW_NAME_IF_IN_USE,
alternate_to.ToWStringHack()));
- if (IsFileInUse(file_name_to))
+ if (IsFileInUse(file_name_to.value()))
PlatformThread::Sleep(2000);
// If file is still in use, the rest of the test will fail.
- ASSERT_FALSE(IsFileInUse(file_name_to));
+ ASSERT_FALSE(IsFileInUse(file_name_to.value()));
EXPECT_TRUE(work_item->Do());
EXPECT_TRUE(file_util::PathExists(file_name_from));
« no previous file with comments | « chrome/installer/util/copy_tree_work_item.cc ('k') | chrome/installer/util/delete_after_reboot_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698