OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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> | |
9 | 8 |
10 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
11 #include "base/file_util.h" | 10 #include "base/file_util.h" |
12 #include "base/path_service.h" | 11 #include "base/path_service.h" |
13 #include "base/process_util.h" | 12 #include "base/process_util.h" |
14 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
15 #include "base/string_util.h" | 14 #include "base/string_util.h" |
16 #include "chrome/installer/util/work_item.h" | 15 #include "chrome/installer/util/work_item.h" |
17 #include "chrome/installer/util/move_tree_work_item.h" | 16 #include "chrome/installer/util/move_tree_work_item.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 EXPECT_TRUE(file_util::ContentsEqual(exe_full_path, to_file)); | 384 EXPECT_TRUE(file_util::ContentsEqual(exe_full_path, to_file)); |
386 | 385 |
387 // test rollback() | 386 // test rollback() |
388 work_item->Rollback(); | 387 work_item->Rollback(); |
389 | 388 |
390 EXPECT_TRUE(file_util::PathExists(from_dir)); | 389 EXPECT_TRUE(file_util::PathExists(from_dir)); |
391 EXPECT_TRUE(file_util::ContentsEqual(exe_full_path, from_file)); | 390 EXPECT_TRUE(file_util::ContentsEqual(exe_full_path, from_file)); |
392 EXPECT_TRUE(file_util::PathExists(to_dir)); | 391 EXPECT_TRUE(file_util::PathExists(to_dir)); |
393 EXPECT_EQ(0, ReadTextFile(to_file.value()).compare(text_content_1)); | 392 EXPECT_EQ(0, ReadTextFile(to_file.value()).compare(text_content_1)); |
394 } | 393 } |
OLD | NEW |