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" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 14 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
15 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" | 15 #include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h
" |
16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
17 #include "components/offline_pages/client_namespace_constants.h" | |
18 #include "components/offline_pages/offline_page_feature.h" | 17 #include "components/offline_pages/offline_page_feature.h" |
19 #include "components/offline_pages/offline_page_item.h" | 18 #include "components/offline_pages/offline_page_item.h" |
20 #include "components/offline_pages/offline_page_model.h" | 19 #include "components/offline_pages/offline_page_model.h" |
21 #include "components/offline_pages/offline_page_test_archiver.h" | 20 #include "components/offline_pages/offline_page_test_archiver.h" |
22 #include "components/offline_pages/offline_page_types.h" | 21 #include "components/offline_pages/offline_page_types.h" |
23 #include "content/public/browser/navigation_entry.h" | 22 #include "content/public/browser/navigation_entry.h" |
24 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
25 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
26 #include "net/base/network_change_notifier.h" | 25 #include "net/base/network_change_notifier.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 StartLoad(online_url()); | 213 StartLoad(online_url()); |
215 RunUntilIdle(); | 214 RunUntilIdle(); |
216 EXPECT_EQ(online_url(), controller().GetPendingEntry()->GetURL()); | 215 EXPECT_EQ(online_url(), controller().GetPendingEntry()->GetURL()); |
217 | 216 |
218 // Redirection will be done immediately on navigation end with error. | 217 // Redirection will be done immediately on navigation end with error. |
219 FailLoad(online_url()); | 218 FailLoad(online_url()); |
220 EXPECT_EQ(offline_url(), controller().GetPendingEntry()->GetURL()); | 219 EXPECT_EQ(offline_url(), controller().GetPendingEntry()->GetURL()); |
221 } | 220 } |
222 | 221 |
223 } // namespace offline_pages | 222 } // namespace offline_pages |
OLD | NEW |