OLD | NEW |
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 <fstream> | 7 #include <fstream> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "chrome/installer/util/duplicate_tree_detector.h" | 12 #include "chrome/installer/util/duplicate_tree_detector.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 class DuplicateTreeDetectorTest : public testing::Test { | 17 class DuplicateTreeDetectorTest : public testing::Test { |
18 protected: | 18 protected: |
19 virtual void SetUp() { | 19 virtual void SetUp() { |
20 ASSERT_TRUE(temp_source_dir_.CreateUniqueTempDir()); | 20 ASSERT_TRUE(temp_source_dir_.CreateUniqueTempDir()); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 // This file should be different. | 162 // This file should be different. |
163 FilePath other_file(temp_dest_dir_.path()); | 163 FilePath other_file(temp_dest_dir_.path()); |
164 other_file = other_file.AppendASCII("F2"); | 164 other_file = other_file.AppendASCII("F2"); |
165 CreateTextFile(other_file.MaybeAsASCII(), text_content_2_); | 165 CreateTextFile(other_file.MaybeAsASCII(), text_content_2_); |
166 | 166 |
167 EXPECT_TRUE(installer::IsIdenticalFileHierarchy(source_file, dest_file)); | 167 EXPECT_TRUE(installer::IsIdenticalFileHierarchy(source_file, dest_file)); |
168 EXPECT_FALSE(installer::IsIdenticalFileHierarchy(source_file, other_file)); | 168 EXPECT_FALSE(installer::IsIdenticalFileHierarchy(source_file, other_file)); |
169 } | 169 } |
170 | 170 |
OLD | NEW |