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/files/file.h" | 12 #include "base/files/file.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
17 #include "base/test/scoped_feature_list.h" | 17 #include "base/test/scoped_feature_list.h" |
18 #include "base/threading/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 20 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
21 #include "chrome/browser/android/offline_pages/request_coordinator_factory.h" | 21 #include "chrome/browser/android/offline_pages/request_coordinator_factory.h" |
22 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" | 22 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" |
23 #include "chrome/browser/android/offline_pages/test_request_coordinator_builder.
h" | 23 #include "chrome/browser/android/offline_pages/test_request_coordinator_builder.
h" |
24 #include "chrome/common/chrome_constants.h" | 24 #include "chrome/common/chrome_constants.h" |
25 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
26 #include "components/offline_pages/background/network_quality_provider_stub.h" | 26 #include "components/offline_pages/core/background/network_quality_provider_stub
.h" |
27 #include "components/offline_pages/background/request_coordinator.h" | 27 #include "components/offline_pages/core/background/request_coordinator.h" |
28 #include "components/offline_pages/client_namespace_constants.h" | 28 #include "components/offline_pages/core/client_namespace_constants.h" |
29 #include "components/offline_pages/offline_page_feature.h" | 29 #include "components/offline_pages/core/offline_page_feature.h" |
30 #include "components/offline_pages/offline_page_model.h" | 30 #include "components/offline_pages/core/offline_page_model.h" |
31 #include "components/offline_pages/offline_page_test_archiver.h" | 31 #include "components/offline_pages/core/offline_page_test_archiver.h" |
32 #include "components/offline_pages/offline_page_test_store.h" | 32 #include "components/offline_pages/core/offline_page_test_store.h" |
33 #include "components/offline_pages/offline_page_types.h" | 33 #include "components/offline_pages/core/offline_page_types.h" |
34 #include "content/public/test/test_browser_thread_bundle.h" | 34 #include "content/public/test/test_browser_thread_bundle.h" |
35 #include "net/base/filename_util.h" | 35 #include "net/base/filename_util.h" |
36 #include "testing/gtest/include/gtest/gtest.h" | 36 #include "testing/gtest/include/gtest/gtest.h" |
37 #include "url/gurl.h" | 37 #include "url/gurl.h" |
38 | 38 |
39 namespace offline_pages { | 39 namespace offline_pages { |
40 namespace { | 40 namespace { |
41 | 41 |
42 const GURL kTestPage1Url("http://test.org/page1"); | 42 const GURL kTestPage1Url("http://test.org/page1"); |
43 const GURL kTestPage2Url("http://test.org/page2"); | 43 const GURL kTestPage2Url("http://test.org/page2"); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 GURL("http://example.com/"), GURL("http://example.com/#test"))); | 254 GURL("http://example.com/"), GURL("http://example.com/#test"))); |
255 EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment( | 255 EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment( |
256 GURL("http://example.com/#test"), GURL("http://example.com/"))); | 256 GURL("http://example.com/#test"), GURL("http://example.com/"))); |
257 EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment( | 257 EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment( |
258 GURL("http://example.com/#test"), GURL("http://example.com/#test2"))); | 258 GURL("http://example.com/#test"), GURL("http://example.com/#test2"))); |
259 EXPECT_FALSE(OfflinePageUtils::EqualsIgnoringFragment( | 259 EXPECT_FALSE(OfflinePageUtils::EqualsIgnoringFragment( |
260 GURL("http://example.com/"), GURL("http://test.com/#test"))); | 260 GURL("http://example.com/"), GURL("http://test.com/#test"))); |
261 } | 261 } |
262 | 262 |
263 } // namespace offline_pages | 263 } // namespace offline_pages |
OLD | NEW |