| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_utils.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_utils.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/feature_list.h" | 12 #include "base/feature_list.h" |
| 13 #include "base/files/file.h" | 13 #include "base/files/file.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
| 16 #include "base/test/test_simple_task_runner.h" | 16 #include "base/test/test_simple_task_runner.h" |
| 17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
| 18 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 18 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
| 19 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" | 19 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" |
| 20 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
| 21 #include "chrome/test/base/testing_profile.h" | 21 #include "chrome/test/base/testing_profile.h" |
| 22 #include "components/offline_pages/client_namespace_constants.h" |
| 22 #include "components/offline_pages/offline_page_feature.h" | 23 #include "components/offline_pages/offline_page_feature.h" |
| 23 #include "components/offline_pages/offline_page_model.h" | 24 #include "components/offline_pages/offline_page_model.h" |
| 24 #include "components/offline_pages/offline_page_test_archiver.h" | 25 #include "components/offline_pages/offline_page_test_archiver.h" |
| 25 #include "components/offline_pages/offline_page_test_store.h" | 26 #include "components/offline_pages/offline_page_test_store.h" |
| 26 #include "components/offline_pages/offline_page_types.h" | 27 #include "components/offline_pages/offline_page_types.h" |
| 27 #include "net/base/filename_util.h" | 28 #include "net/base/filename_util.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 29 #include "url/gurl.h" | 30 #include "url/gurl.h" |
| 30 | 31 |
| 31 namespace offline_pages { | 32 namespace offline_pages { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 TEST_F(OfflinePageUtilsTest, HasOfflinePageForOnlineURL) { | 218 TEST_F(OfflinePageUtilsTest, HasOfflinePageForOnlineURL) { |
| 218 EXPECT_TRUE( | 219 EXPECT_TRUE( |
| 219 OfflinePageUtils::HasOfflinePageForOnlineURL(profile(), kTestPage1Url)); | 220 OfflinePageUtils::HasOfflinePageForOnlineURL(profile(), kTestPage1Url)); |
| 220 EXPECT_TRUE( | 221 EXPECT_TRUE( |
| 221 OfflinePageUtils::HasOfflinePageForOnlineURL(profile(), kTestPage2Url)); | 222 OfflinePageUtils::HasOfflinePageForOnlineURL(profile(), kTestPage2Url)); |
| 222 EXPECT_FALSE( | 223 EXPECT_FALSE( |
| 223 OfflinePageUtils::HasOfflinePageForOnlineURL(profile(), kTestPage3Url)); | 224 OfflinePageUtils::HasOfflinePageForOnlineURL(profile(), kTestPage3Url)); |
| 224 } | 225 } |
| 225 | 226 |
| 226 } // namespace offline_pages | 227 } // namespace offline_pages |
| OLD | NEW |