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 "ios/chrome/browser/reading_list/reading_list_web_state_observer.h" | 5 #include "ios/chrome/browser/reading_list/reading_list_web_state_observer.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/time/default_clock.h" | 8 #include "base/time/default_clock.h" |
9 #include "components/reading_list/ios/reading_list_model_impl.h" | 9 #include "components/reading_list/core/reading_list_model_impl.h" |
10 #include "ios/chrome/browser/reading_list/offline_url_utils.h" | 10 #include "ios/chrome/browser/reading_list/offline_url_utils.h" |
11 #import "ios/web/public/navigation_item.h" | 11 #import "ios/web/public/navigation_item.h" |
12 #include "ios/web/public/reload_type.h" | 12 #include "ios/web/public/reload_type.h" |
13 #import "ios/web/public/test/fakes/test_navigation_manager.h" | 13 #import "ios/web/public/test/fakes/test_navigation_manager.h" |
14 #import "ios/web/public/test/fakes/test_web_state.h" | 14 #import "ios/web/public/test/fakes/test_web_state.h" |
15 #include "ios/web/public/test/web_test.h" | 15 #include "ios/web/public/test/web_test.h" |
16 #import "ios/web/public/web_state/web_state.h" | 16 #import "ios/web/public/web_state/web_state.h" |
17 #include "net/base/network_change_notifier.h" | 17 #include "net/base/network_change_notifier.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 test_web_state_.SetLoading(false); | 161 test_web_state_.SetLoading(false); |
162 | 162 |
163 EXPECT_TRUE(test_navigation_manager_->ReloadCalled()); | 163 EXPECT_TRUE(test_navigation_manager_->ReloadCalled()); |
164 EXPECT_EQ(test_navigation_manager_->GetLastCommittedItem()->GetVirtualURL(), | 164 EXPECT_EQ(test_navigation_manager_->GetLastCommittedItem()->GetVirtualURL(), |
165 url); | 165 url); |
166 EXPECT_EQ(test_navigation_manager_->GetLastCommittedItem()->GetURL(), | 166 EXPECT_EQ(test_navigation_manager_->GetLastCommittedItem()->GetURL(), |
167 distilled_url); | 167 distilled_url); |
168 | 168 |
169 EXPECT_TRUE(entry->IsRead()); | 169 EXPECT_TRUE(entry->IsRead()); |
170 } | 170 } |
OLD | NEW |