| 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/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/test/test_mock_time_task_runner.h" | 8 #include "base/test/test_mock_time_task_runner.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
| 11 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" | 11 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" |
| 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 13 #include "components/offline_pages/offline_page_item.h" | 13 #include "components/offline_pages/offline_page_item.h" |
| 14 #include "components/offline_pages/offline_page_model.h" | 14 #include "components/offline_pages/offline_page_model.h" |
| 15 #include "components/offline_pages/offline_page_test_archiver.h" | 15 #include "components/offline_pages/offline_page_test_archiver.h" |
| 16 #include "content/public/browser/navigation_entry.h" | 16 #include "content/public/browser/navigation_entry.h" |
| 17 #include "content/public/browser/navigation_handle.h" | 17 #include "content/public/browser/navigation_handle.h" |
| 18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 RunUntilIdle(); | 188 RunUntilIdle(); |
| 189 EXPECT_EQ(2U, model_changed_count()); | 189 EXPECT_EQ(2U, model_changed_count()); |
| 190 EXPECT_EQ(1U, model_removed_count()); | 190 EXPECT_EQ(1U, model_removed_count()); |
| 191 // the same page should be simply overridden. | 191 // the same page should be simply overridden. |
| 192 GetAllPages(); | 192 GetAllPages(); |
| 193 EXPECT_EQ(1U, all_pages().size()); | 193 EXPECT_EQ(1U, all_pages().size()); |
| 194 EXPECT_EQ(url, all_pages()[0].url); | 194 EXPECT_EQ(url, all_pages()[0].url); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace offline_pages | 197 } // namespace offline_pages |
| OLD | NEW |