OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 | 148 |
149 OfflinePageMHTMLArchiverTest::~OfflinePageMHTMLArchiverTest() { | 149 OfflinePageMHTMLArchiverTest::~OfflinePageMHTMLArchiverTest() { |
150 } | 150 } |
151 | 151 |
152 std::unique_ptr<TestMHTMLArchiver> OfflinePageMHTMLArchiverTest::CreateArchive( | 152 std::unique_ptr<TestMHTMLArchiver> OfflinePageMHTMLArchiverTest::CreateArchive( |
153 const GURL& url, | 153 const GURL& url, |
154 TestMHTMLArchiver::TestScenario scenario) { | 154 TestMHTMLArchiver::TestScenario scenario) { |
155 std::unique_ptr<TestMHTMLArchiver> archiver( | 155 std::unique_ptr<TestMHTMLArchiver> archiver( |
156 new TestMHTMLArchiver(url, scenario)); | 156 new TestMHTMLArchiver(url, scenario)); |
| 157 std::vector<std::string> extra_data; |
157 archiver->CreateArchive(GetTestFilePath(), | 158 archiver->CreateArchive(GetTestFilePath(), |
158 OfflinePageArchiver::CreateArchiveParams(), | 159 OfflinePageArchiver::CreateArchiveParams(), |
| 160 extra_data, |
159 callback()); | 161 callback()); |
160 PumpLoop(); | 162 PumpLoop(); |
161 return archiver; | 163 return archiver; |
162 } | 164 } |
163 | 165 |
164 void OfflinePageMHTMLArchiverTest::OnCreateArchiveDone( | 166 void OfflinePageMHTMLArchiverTest::OnCreateArchiveDone( |
165 OfflinePageArchiver* archiver, | 167 OfflinePageArchiver* archiver, |
166 OfflinePageArchiver::ArchiverResult result, | 168 OfflinePageArchiver::ArchiverResult result, |
167 const GURL& url, | 169 const GURL& url, |
168 const base::FilePath& file_path, | 170 const base::FilePath& file_path, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 PumpLoop(); | 227 PumpLoop(); |
226 | 228 |
227 EXPECT_EQ(archiver.get(), last_archiver()); | 229 EXPECT_EQ(archiver.get(), last_archiver()); |
228 EXPECT_EQ(OfflinePageArchiver::ArchiverResult::SUCCESSFULLY_CREATED, | 230 EXPECT_EQ(OfflinePageArchiver::ArchiverResult::SUCCESSFULLY_CREATED, |
229 last_result()); | 231 last_result()); |
230 EXPECT_EQ(GetTestFilePath(), last_file_path()); | 232 EXPECT_EQ(GetTestFilePath(), last_file_path()); |
231 EXPECT_EQ(kTestFileSize, last_file_size()); | 233 EXPECT_EQ(kTestFileSize, last_file_size()); |
232 } | 234 } |
233 | 235 |
234 } // namespace offline_pages | 236 } // namespace offline_pages |
OLD | NEW |