OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.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/macros.h" | 12 #include "base/macros.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "components/update_client/component_patcher.h" | 16 #include "components/update_client/component_patcher.h" |
17 #include "components/update_client/component_patcher_operation.h" | 17 #include "components/update_client/component_patcher_operation.h" |
18 #include "components/update_client/test/component_patcher_unittest.h" | 18 #include "components/update_client/component_patcher_unittest.h" |
19 #include "components/update_client/test/test_installer.h" | 19 #include "components/update_client/test_installer.h" |
20 #include "courgette/courgette.h" | 20 #include "courgette/courgette.h" |
21 #include "courgette/third_party/bsdiff.h" | 21 #include "courgette/third_party/bsdiff.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 class TestCallback { | 26 class TestCallback { |
27 public: | 27 public: |
28 TestCallback(); | 28 TestCallback(); |
29 virtual ~TestCallback() {} | 29 virtual ~TestCallback() {} |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 EXPECT_EQ(true, callback.called_); | 192 EXPECT_EQ(true, callback.called_); |
193 EXPECT_EQ(ComponentUnpacker::kNone, callback.error_); | 193 EXPECT_EQ(ComponentUnpacker::kNone, callback.error_); |
194 EXPECT_EQ(0, callback.extra_code_); | 194 EXPECT_EQ(0, callback.extra_code_); |
195 EXPECT_TRUE(base::ContentsEqual( | 195 EXPECT_TRUE(base::ContentsEqual( |
196 unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")), | 196 unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")), |
197 test_file("binary_output.bin"))); | 197 test_file("binary_output.bin"))); |
198 } | 198 } |
199 | 199 |
200 } // namespace update_client | 200 } // namespace update_client |
OLD | NEW |