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/recent_tab_helper.h" | 5 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/test/scoped_feature_list.h" | 10 #include "base/test/scoped_feature_list.h" |
11 #include "base/test/test_mock_time_task_runner.h" | 11 #include "base/test/test_mock_time_task_runner.h" |
12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 13 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
14 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" | 14 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" |
15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
16 #include "components/offline_pages/offline_page_feature.h" | 16 #include "components/offline_pages/core/offline_page_feature.h" |
17 #include "components/offline_pages/offline_page_item.h" | 17 #include "components/offline_pages/core/offline_page_item.h" |
18 #include "components/offline_pages/offline_page_model.h" | 18 #include "components/offline_pages/core/offline_page_model.h" |
19 #include "components/offline_pages/offline_page_test_archiver.h" | 19 #include "components/offline_pages/core/offline_page_test_archiver.h" |
20 #include "content/public/browser/navigation_entry.h" | 20 #include "content/public/browser/navigation_entry.h" |
21 #include "content/public/browser/navigation_handle.h" | 21 #include "content/public/browser/navigation_handle.h" |
22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 namespace offline_pages { | 25 namespace offline_pages { |
26 | 26 |
27 namespace { | 27 namespace { |
28 const GURL kTestPageUrl("http://mystery.site/foo.html"); | 28 const GURL kTestPageUrl("http://mystery.site/foo.html"); |
29 const GURL kTestPageUrlOther("http://crazy.site/foo_other.html"); | 29 const GURL kTestPageUrlOther("http://crazy.site/foo_other.html"); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 GetAllPages(); | 329 GetAllPages(); |
330 EXPECT_EQ(1U, all_pages().size()); | 330 EXPECT_EQ(1U, all_pages().size()); |
331 const OfflinePageItem& page = all_pages()[0]; | 331 const OfflinePageItem& page = all_pages()[0]; |
332 EXPECT_EQ(kTestPageUrl, page.url); | 332 EXPECT_EQ(kTestPageUrl, page.url); |
333 EXPECT_EQ("download", page.client_id.name_space); | 333 EXPECT_EQ("download", page.client_id.name_space); |
334 EXPECT_EQ("id1", page.client_id.id); | 334 EXPECT_EQ("id1", page.client_id.id); |
335 EXPECT_EQ(153l, page.offline_id); | 335 EXPECT_EQ(153l, page.offline_id); |
336 } | 336 } |
337 | 337 |
338 } // namespace offline_pages | 338 } // namespace offline_pages |
OLD | NEW |