| OLD | NEW |
| 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/remove_requests_task.h" | 5 #include "components/offline_pages/core/background/remove_requests_task.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/test/test_simple_task_runner.h" | 10 #include "base/test/test_simple_task_runner.h" |
| 11 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "components/offline_pages/background/request_queue_in_memory_store.h" | 12 #include "components/offline_pages/core/background/request_queue_in_memory_store
.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace offline_pages { | 15 namespace offline_pages { |
| 16 namespace { | 16 namespace { |
| 17 const int64_t kRequestId1 = 42; | 17 const int64_t kRequestId1 = 42; |
| 18 const int64_t kRequestId2 = 43; | 18 const int64_t kRequestId2 = 43; |
| 19 const int64_t kRequestId3 = 44; | 19 const int64_t kRequestId3 = 44; |
| 20 const GURL kUrl1("http://example.com"); | 20 const GURL kUrl1("http://example.com"); |
| 21 const GURL kUrl2("http://another-example.com"); | 21 const GURL kUrl2("http://another-example.com"); |
| 22 const ClientId kClientId1("bookmark", "1234"); | 22 const ClientId kClientId1("bookmark", "1234"); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 EXPECT_EQ(ItemActionStatus::SUCCESS, | 188 EXPECT_EQ(ItemActionStatus::SUCCESS, |
| 189 last_result()->item_statuses.at(0).second); | 189 last_result()->item_statuses.at(0).second); |
| 190 EXPECT_EQ(kRequestId3, last_result()->item_statuses.at(1).first); | 190 EXPECT_EQ(kRequestId3, last_result()->item_statuses.at(1).first); |
| 191 EXPECT_EQ(ItemActionStatus::NOT_FOUND, | 191 EXPECT_EQ(ItemActionStatus::NOT_FOUND, |
| 192 last_result()->item_statuses.at(1).second); | 192 last_result()->item_statuses.at(1).second); |
| 193 EXPECT_EQ(1UL, last_result()->updated_items.size()); | 193 EXPECT_EQ(1UL, last_result()->updated_items.size()); |
| 194 EXPECT_EQ(kRequestId1, last_result()->updated_items.at(0).request_id()); | 194 EXPECT_EQ(kRequestId1, last_result()->updated_items.at(0).request_id()); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace offline_pages | 197 } // namespace offline_pages |
| OLD | NEW |