OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/path_service.h" | |
15 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
16 #include "base/threading/platform_thread.h" | 15 #include "base/threading/platform_thread.h" |
17 #include "chrome/installer/util/copy_tree_work_item.h" | 16 #include "chrome/installer/util/copy_tree_work_item.h" |
18 #include "chrome/installer/util/work_item.h" | 17 #include "chrome/installer/util/work_item.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
20 | 19 |
21 namespace { | 20 namespace { |
22 | 21 |
23 class CopyTreeWorkItemTest : public testing::Test { | 22 class CopyTreeWorkItemTest : public testing::Test { |
24 protected: | 23 protected: |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 EXPECT_TRUE(base::ContentsEqual(file_name_from_1, file_name_to_1)); | 714 EXPECT_TRUE(base::ContentsEqual(file_name_from_1, file_name_to_1)); |
716 | 715 |
717 base::FilePath file_name_to_2(dir_name_to); | 716 base::FilePath file_name_to_2(dir_name_to); |
718 file_name_to_2 = file_name_to_2.AppendASCII("2"); | 717 file_name_to_2 = file_name_to_2.AppendASCII("2"); |
719 file_name_to_2 = file_name_to_2.AppendASCII("File_2.txt"); | 718 file_name_to_2 = file_name_to_2.AppendASCII("File_2.txt"); |
720 EXPECT_TRUE(base::PathExists(file_name_to_2)); | 719 EXPECT_TRUE(base::PathExists(file_name_to_2)); |
721 VLOG(1) << "compare " << file_name_from_2.value() | 720 VLOG(1) << "compare " << file_name_from_2.value() |
722 << " and " << file_name_to_2.value(); | 721 << " and " << file_name_to_2.value(); |
723 EXPECT_TRUE(base::ContentsEqual(file_name_from_2, file_name_to_2)); | 722 EXPECT_TRUE(base::ContentsEqual(file_name_from_2, file_name_to_2)); |
724 } | 723 } |
OLD | NEW |