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

Side by Side Diff: components/offline_pages/core/background/cleanup_task_unittest.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years 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 "components/offline_pages/background/cleanup_task.h" 5 #include "components/offline_pages/core/background/cleanup_task.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/test/test_simple_task_runner.h" 11 #include "base/test/test_simple_task_runner.h"
12 #include "base/threading/thread_task_runner_handle.h" 12 #include "base/threading/thread_task_runner_handle.h"
13 #include "components/offline_pages/background/offliner_policy.h" 13 #include "components/offline_pages/core/background/offliner_policy.h"
14 #include "components/offline_pages/background/request_coordinator.h" 14 #include "components/offline_pages/core/background/request_coordinator.h"
15 #include "components/offline_pages/background/request_coordinator_event_logger.h " 15 #include "components/offline_pages/core/background/request_coordinator_event_log ger.h"
16 #include "components/offline_pages/background/request_notifier.h" 16 #include "components/offline_pages/core/background/request_notifier.h"
17 #include "components/offline_pages/background/request_queue_in_memory_store.h" 17 #include "components/offline_pages/core/background/request_queue_in_memory_store .h"
18 #include "components/offline_pages/background/request_queue_store.h" 18 #include "components/offline_pages/core/background/request_queue_store.h"
19 #include "components/offline_pages/background/save_page_request.h" 19 #include "components/offline_pages/core/background/save_page_request.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 namespace offline_pages { 22 namespace offline_pages {
23 23
24 namespace { 24 namespace {
25 // Data for request 1. 25 // Data for request 1.
26 const int64_t kRequestId1 = 17; 26 const int64_t kRequestId1 = 17;
27 const GURL kUrl1("https://google.com"); 27 const GURL kUrl1("https://google.com");
28 const ClientId kClientId1("bookmark", "1234"); 28 const ClientId kClientId1("bookmark", "1234");
29 // Data for request 2. 29 // Data for request 2.
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // though it is expired because it was listed as in-progress while cleaning. 270 // though it is expired because it was listed as in-progress while cleaning.
271 // Request2 should have been cleaned out of the queue. 271 // Request2 should have been cleaned out of the queue.
272 store()->GetRequests(base::Bind(&CleanupTaskTest::GetRequestsCallback, 272 store()->GetRequests(base::Bind(&CleanupTaskTest::GetRequestsCallback,
273 base::Unretained(this))); 273 base::Unretained(this)));
274 PumpLoop(); 274 PumpLoop();
275 EXPECT_EQ(1UL, found_requests().size()); 275 EXPECT_EQ(1UL, found_requests().size());
276 EXPECT_EQ(kRequestId1, found_requests().at(0)->request_id()); 276 EXPECT_EQ(kRequestId1, found_requests().at(0)->request_id());
277 } 277 }
278 278
279 } // namespace offline_pages 279 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698