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

Unified Diff: components/offline_pages/background/request_coordinator_unittest.cc

Issue 2064323004: Defines initial DeviceConditions and and plumbs down through StartProcessing() call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/offline_pages/background/request_coordinator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/request_coordinator_unittest.cc
diff --git a/components/offline_pages/background/request_coordinator_unittest.cc b/components/offline_pages/background/request_coordinator_unittest.cc
index 7e0ba5f1fe7b54c28e8577b73f1670cb4d200cf9..8cdcf4fd3930fbabdc8749ef702e3385e9b66fa4 100644
--- a/components/offline_pages/background/request_coordinator_unittest.cc
+++ b/components/offline_pages/background/request_coordinator_unittest.cc
@@ -12,6 +12,7 @@
#include "base/location.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "components/offline_pages/background/device_conditions.h"
#include "components/offline_pages/background/offliner.h"
#include "components/offline_pages/background/offliner_factory.h"
#include "components/offline_pages/background/offliner_policy.h"
@@ -165,11 +166,13 @@ void RequestCoordinatorTest::SendOfflinerDoneCallback(
TEST_F(RequestCoordinatorTest, StartProcessingWithNoRequests) {
+ DeviceConditions device_conditions(false, 75,
+ net::NetworkChangeNotifier::CONNECTION_3G);
base::Callback<void(bool)> callback =
base::Bind(
&RequestCoordinatorTest::EmptyCallbackFunction,
base::Unretained(this));
- EXPECT_TRUE(coordinator()->StartProcessing(callback));
+ EXPECT_TRUE(coordinator()->StartProcessing(device_conditions, callback));
}
TEST_F(RequestCoordinatorTest, SavePageLater) {
@@ -195,7 +198,6 @@ TEST_F(RequestCoordinatorTest, SavePageLater) {
}
TEST_F(RequestCoordinatorTest, OfflinerDone) {
-
// Add a request to the queue, wait for callbacks to finish.
offline_pages::SavePageRequest request(
kRequestId, kUrl, kClientId, base::Time::Now());
« no previous file with comments | « components/offline_pages/background/request_coordinator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698