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 "chrome/browser/android/offline_pages/offline_page_tab_helper.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h" | 25 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h" |
26 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h" | 26 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h" |
27 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 27 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
28 #include "chrome/test/base/testing_profile.h" | 28 #include "chrome/test/base/testing_profile.h" |
29 #include "components/offline_pages/client_namespace_constants.h" | 29 #include "components/offline_pages/client_namespace_constants.h" |
30 #include "components/offline_pages/offline_page_feature.h" | 30 #include "components/offline_pages/offline_page_feature.h" |
31 #include "components/offline_pages/offline_page_item.h" | 31 #include "components/offline_pages/offline_page_item.h" |
32 #include "components/offline_pages/offline_page_model.h" | 32 #include "components/offline_pages/offline_page_model.h" |
33 #include "components/offline_pages/offline_page_test_archiver.h" | 33 #include "components/offline_pages/offline_page_test_archiver.h" |
34 #include "components/offline_pages/offline_page_types.h" | 34 #include "components/offline_pages/offline_page_types.h" |
35 #include "components/previews/previews_experiments.h" | 35 #include "components/previews/core/previews_experiments.h" |
36 #include "content/public/browser/navigation_entry.h" | 36 #include "content/public/browser/navigation_entry.h" |
37 #include "content/public/browser/web_contents.h" | 37 #include "content/public/browser/web_contents.h" |
38 #include "net/base/net_errors.h" | 38 #include "net/base/net_errors.h" |
39 #include "net/base/network_change_notifier.h" | 39 #include "net/base/network_change_notifier.h" |
40 #include "net/nqe/network_quality_estimator.h" | 40 #include "net/nqe/network_quality_estimator.h" |
41 #include "testing/gtest/include/gtest/gtest.h" | 41 #include "testing/gtest/include/gtest/gtest.h" |
42 | 42 |
43 namespace offline_pages { | 43 namespace offline_pages { |
44 | 44 |
45 namespace { | 45 namespace { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 444 |
445 const OfflinePageItem* item = | 445 const OfflinePageItem* item = |
446 OfflinePageUtils::GetOfflinePageFromWebContents(web_contents()); | 446 OfflinePageUtils::GetOfflinePageFromWebContents(web_contents()); |
447 EXPECT_EQ(expected_offline_id, item->offline_id); | 447 EXPECT_EQ(expected_offline_id, item->offline_id); |
448 EXPECT_EQ(expected_offline_url, item->GetOfflineURL()); | 448 EXPECT_EQ(expected_offline_url, item->GetOfflineURL()); |
449 EXPECT_EQ(kAsyncNamespace, item->client_id.name_space); | 449 EXPECT_EQ(kAsyncNamespace, item->client_id.name_space); |
450 EXPECT_FALSE(offline_page_tab_helper()->is_offline_preview()); | 450 EXPECT_FALSE(offline_page_tab_helper()->is_offline_preview()); |
451 } | 451 } |
452 | 452 |
453 } // namespace offline_pages | 453 } // namespace offline_pages |
OLD | NEW |