Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_request_job_unittest.cc

Issue 2656713002: Merge to M57: Remove popup overlay from MHTML when requested (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_request_job.h" 5 #include "chrome/browser/android/offline_pages/offline_page_request_job.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 public: 207 public:
208 TestOfflinePageArchiver(const GURL& url, 208 TestOfflinePageArchiver(const GURL& url,
209 const base::FilePath& archive_file_path, 209 const base::FilePath& archive_file_path,
210 int archive_file_size) 210 int archive_file_size)
211 : url_(url), 211 : url_(url),
212 archive_file_path_(archive_file_path), 212 archive_file_path_(archive_file_path),
213 archive_file_size_(archive_file_size) {} 213 archive_file_size_(archive_file_size) {}
214 ~TestOfflinePageArchiver() override {} 214 ~TestOfflinePageArchiver() override {}
215 215
216 void CreateArchive(const base::FilePath& archives_dir, 216 void CreateArchive(const base::FilePath& archives_dir,
217 int64_t archive_id, 217 const CreateArchiveParams& create_archive_params,
218 const CreateArchiveCallback& callback) override { 218 const CreateArchiveCallback& callback) override {
219 base::ThreadTaskRunnerHandle::Get()->PostTask( 219 base::ThreadTaskRunnerHandle::Get()->PostTask(
220 FROM_HERE, 220 FROM_HERE,
221 base::Bind(callback, this, ArchiverResult::SUCCESSFULLY_CREATED, 221 base::Bind(callback, this, ArchiverResult::SUCCESSFULLY_CREATED,
222 url_, archive_file_path_, base::string16(), 222 url_, archive_file_path_, base::string16(),
223 archive_file_size_)); 223 archive_file_size_));
224 } 224 }
225 225
226 private: 226 private:
227 const GURL url_; 227 const GURL url_;
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 ASSERT_TRUE(offline_page_tab_helper()->GetOfflinePageForTest()); 897 ASSERT_TRUE(offline_page_tab_helper()->GetOfflinePageForTest());
898 EXPECT_EQ(offline_id4(), 898 EXPECT_EQ(offline_id4(),
899 offline_page_tab_helper()->GetOfflinePageForTest()->offline_id); 899 offline_page_tab_helper()->GetOfflinePageForTest()->offline_id);
900 ExpectOneUniqueSampleForAggregatedRequestResult( 900 ExpectOneUniqueSampleForAggregatedRequestResult(
901 OfflinePageRequestJob::AggregatedRequestResult:: 901 OfflinePageRequestJob::AggregatedRequestResult::
902 SHOW_OFFLINE_ON_DISCONNECTED_NETWORK); 902 SHOW_OFFLINE_ON_DISCONNECTED_NETWORK);
903 ExpectOpenFileErrorCode(net::ERR_FILE_NOT_FOUND); 903 ExpectOpenFileErrorCode(net::ERR_FILE_NOT_FOUND);
904 } 904 }
905 905
906 } // namespace offline_pages 906 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698