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/downloads/download_notifying_observer.h" | 5 #include "components/offline_pages/core/downloads/download_notifying_observer.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "components/offline_pages/background/save_page_request.h" | 8 #include "components/offline_pages/core/background/save_page_request.h" |
9 #include "components/offline_pages/client_namespace_constants.h" | 9 #include "components/offline_pages/core/client_namespace_constants.h" |
10 #include "components/offline_pages/client_policy_controller.h" | 10 #include "components/offline_pages/core/client_policy_controller.h" |
11 #include "components/offline_pages/downloads/offline_page_download_notifier.h" | 11 #include "components/offline_pages/core/downloads/offline_page_download_notifier
.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace offline_pages { | 14 namespace offline_pages { |
15 | 15 |
16 namespace { | 16 namespace { |
17 static const int64_t kTestOfflineId = 42L; | 17 static const int64_t kTestOfflineId = 42L; |
18 static const char kTestUrl[] = "http://foo.com/bar"; | 18 static const char kTestUrl[] = "http://foo.com/bar"; |
19 static const char kTestGuid[] = "cccccccc-cccc-4ccc-0ccc-ccccccccccc1"; | 19 static const char kTestGuid[] = "cccccccc-cccc-4ccc-0ccc-ccccccccccc1"; |
20 static const ClientId kTestClientId(kDownloadNamespace, kTestGuid); | 20 static const ClientId kTestClientId(kDownloadNamespace, kTestGuid); |
21 static const base::Time kTestCreationTime = base::Time::Now(); | 21 static const base::Time kTestCreationTime = base::Time::Now(); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 for (auto name_space : name_spaces) { | 275 for (auto name_space : name_spaces) { |
276 ClientId invisible_client_id(name_space, kTestGuid); | 276 ClientId invisible_client_id(name_space, kTestGuid); |
277 SavePageRequest request(kTestOfflineId, GURL(kTestUrl), invisible_client_id, | 277 SavePageRequest request(kTestOfflineId, GURL(kTestUrl), invisible_client_id, |
278 kTestCreationTime, kTestUserRequested); | 278 kTestCreationTime, kTestUserRequested); |
279 observer()->OnAdded(request); | 279 observer()->OnAdded(request); |
280 EXPECT_EQ(LastNotificationType::NONE, notifier()->last_notification_type()); | 280 EXPECT_EQ(LastNotificationType::NONE, notifier()->last_notification_type()); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 } // namespace offline_pages | 284 } // namespace offline_pages |
OLD | NEW |