OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include <iostream> | 8 #include <iostream> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
14 #include "base/scoped_ptr.h" | |
15 #include "base/string_util.h" | 14 #include "base/string_util.h" |
16 #include "chrome/installer/util/helper.h" | 15 #include "chrome/installer/util/helper.h" |
17 #include "chrome/installer/util/work_item.h" | 16 #include "chrome/installer/util/work_item.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
19 | 18 |
20 namespace { | 19 namespace { |
21 class SetupHelperTest : public testing::Test { | 20 class SetupHelperTest : public testing::Test { |
22 protected: | 21 protected: |
23 virtual void SetUp() { | 22 virtual void SetUp() { |
24 // Name a subdirectory of the user temp directory. | 23 // Name a subdirectory of the user temp directory. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 EXPECT_FALSE(file_util::PathExists(chrome_dir_1)); | 184 EXPECT_FALSE(file_util::PathExists(chrome_dir_1)); |
186 EXPECT_FALSE(file_util::PathExists(chrome_dir_3)); | 185 EXPECT_FALSE(file_util::PathExists(chrome_dir_3)); |
187 // every thing under in used version should stay | 186 // every thing under in used version should stay |
188 EXPECT_TRUE(file_util::PathExists(chrome_dir_2)); | 187 EXPECT_TRUE(file_util::PathExists(chrome_dir_2)); |
189 EXPECT_TRUE(file_util::PathExists(chrome_dll_2)); | 188 EXPECT_TRUE(file_util::PathExists(chrome_dll_2)); |
190 EXPECT_TRUE(file_util::PathExists(chrome_othera_2)); | 189 EXPECT_TRUE(file_util::PathExists(chrome_othera_2)); |
191 EXPECT_TRUE(file_util::PathExists(chrome_otherb_2)); | 190 EXPECT_TRUE(file_util::PathExists(chrome_otherb_2)); |
192 // the latest version should stay | 191 // the latest version should stay |
193 EXPECT_TRUE(file_util::PathExists(chrome_dll_4)); | 192 EXPECT_TRUE(file_util::PathExists(chrome_dll_4)); |
194 } | 193 } |
OLD | NEW |