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

Unified Diff: components/offline_pages/core/background/request_queue_unittest.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: more rebase Created 4 years, 1 month 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
Index: components/offline_pages/core/background/request_queue_unittest.cc
diff --git a/components/offline_pages/background/request_queue_unittest.cc b/components/offline_pages/core/background/request_queue_unittest.cc
similarity index 95%
rename from components/offline_pages/background/request_queue_unittest.cc
rename to components/offline_pages/core/background/request_queue_unittest.cc
index 8ba805a9b7f3c95c95e6ef263462cc81f76f5819..84fb78a4d9f3fa49a4d9015bce66037ddab76e69 100644
--- a/components/offline_pages/background/request_queue_unittest.cc
+++ b/components/offline_pages/core/background/request_queue_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/offline_pages/background/request_queue.h"
+#include "components/offline_pages/core/background/request_queue.h"
#include <memory>
#include <utility>
@@ -10,13 +10,13 @@
#include "base/bind.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_policy.h"
-#include "components/offline_pages/background/request_coordinator.h"
-#include "components/offline_pages/background/request_coordinator_event_logger.h"
-#include "components/offline_pages/background/request_notifier.h"
-#include "components/offline_pages/background/request_queue_in_memory_store.h"
-#include "components/offline_pages/background/save_page_request.h"
+#include "components/offline_pages/core/background/device_conditions.h"
+#include "components/offline_pages/core/background/offliner_policy.h"
+#include "components/offline_pages/core/background/request_coordinator.h"
+#include "components/offline_pages/core/background/request_coordinator_event_logger.h"
+#include "components/offline_pages/core/background/request_notifier.h"
+#include "components/offline_pages/core/background/request_queue_in_memory_store.h"
+#include "components/offline_pages/core/background/save_page_request.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace offline_pages {
@@ -105,9 +105,7 @@ class RequestQueueTest : public testing::Test {
RequestQueue* queue() { return queue_.get(); }
AddRequestResult last_add_result() const { return last_add_result_; }
- SavePageRequest* last_added_request() {
- return last_added_request_.get();
- }
+ SavePageRequest* last_added_request() { return last_added_request_.get(); }
UpdateRequestResult last_update_result() const { return last_update_result_; }
@@ -201,8 +199,8 @@ TEST_F(RequestQueueTest, GetRequestsEmpty) {
TEST_F(RequestQueueTest, AddRequest) {
base::Time creation_time = base::Time::Now();
- SavePageRequest request(
- kRequestId, kUrl, kClientId, creation_time, kUserRequested);
+ SavePageRequest request(kRequestId, kUrl, kClientId, creation_time,
+ kUserRequested);
queue()->AddRequest(request, base::Bind(&RequestQueueTest::AddRequestDone,
base::Unretained(this)));
PumpLoop();
@@ -219,8 +217,8 @@ TEST_F(RequestQueueTest, AddRequest) {
TEST_F(RequestQueueTest, RemoveRequest) {
base::Time creation_time = base::Time::Now();
- SavePageRequest request(
- kRequestId, kUrl, kClientId, creation_time, kUserRequested);
+ SavePageRequest request(kRequestId, kUrl, kClientId, creation_time,
+ kUserRequested);
queue()->AddRequest(request, base::Bind(&RequestQueueTest::AddRequestDone,
base::Unretained(this)));
PumpLoop();
@@ -363,14 +361,14 @@ TEST_F(RequestQueueTest, PauseAndResume) {
// listing multiple items and removing the right item.
TEST_F(RequestQueueTest, MultipleRequestsAddGetRemove) {
base::Time creation_time = base::Time::Now();
- SavePageRequest request1(
- kRequestId, kUrl, kClientId, creation_time, kUserRequested);
+ SavePageRequest request1(kRequestId, kUrl, kClientId, creation_time,
+ kUserRequested);
queue()->AddRequest(request1, base::Bind(&RequestQueueTest::AddRequestDone,
base::Unretained(this)));
PumpLoop();
ASSERT_EQ(request1.request_id(), last_added_request()->request_id());
- SavePageRequest request2(
- kRequestId2, kUrl2, kClientId2, creation_time, kUserRequested);
+ SavePageRequest request2(kRequestId2, kUrl2, kClientId2, creation_time,
+ kUserRequested);
queue()->AddRequest(request2, base::Bind(&RequestQueueTest::AddRequestDone,
base::Unretained(this)));
PumpLoop();

Powered by Google App Engine
This is Rietveld 408576698