| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 3634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3645 EXPECT_TRUE(controller.IsInitialNavigation()); | 3645 EXPECT_TRUE(controller.IsInitialNavigation()); |
| 3646 EXPECT_FALSE(contents()->HasAccessedInitialDocument()); | 3646 EXPECT_FALSE(contents()->HasAccessedInitialDocument()); |
| 3647 | 3647 |
| 3648 // There should be no title yet. | 3648 // There should be no title yet. |
| 3649 EXPECT_TRUE(contents()->GetTitle().empty()); | 3649 EXPECT_TRUE(contents()->GetTitle().empty()); |
| 3650 | 3650 |
| 3651 // Suppose it aborts before committing, if it's a 204 or download or due to a | 3651 // Suppose it aborts before committing, if it's a 204 or download or due to a |
| 3652 // stop or a new navigation from the user. The URL should remain visible. | 3652 // stop or a new navigation from the user. The URL should remain visible. |
| 3653 if (IsBrowserSideNavigationEnabled()) { | 3653 if (IsBrowserSideNavigationEnabled()) { |
| 3654 static_cast<NavigatorImpl*>(main_test_rfh()->frame_tree_node()->navigator()) | 3654 static_cast<NavigatorImpl*>(main_test_rfh()->frame_tree_node()->navigator()) |
| 3655 ->CancelNavigation(main_test_rfh()->frame_tree_node()); | 3655 ->CancelNavigation(main_test_rfh()->frame_tree_node(), true); |
| 3656 } else { | 3656 } else { |
| 3657 FrameHostMsg_DidFailProvisionalLoadWithError_Params params; | 3657 FrameHostMsg_DidFailProvisionalLoadWithError_Params params; |
| 3658 params.error_code = net::ERR_ABORTED; | 3658 params.error_code = net::ERR_ABORTED; |
| 3659 params.error_description = base::string16(); | 3659 params.error_description = base::string16(); |
| 3660 params.url = url; | 3660 params.url = url; |
| 3661 params.showing_repost_interstitial = false; | 3661 params.showing_repost_interstitial = false; |
| 3662 main_test_rfh()->OnMessageReceived( | 3662 main_test_rfh()->OnMessageReceived( |
| 3663 FrameHostMsg_DidFailProvisionalLoadWithError(0, params)); | 3663 FrameHostMsg_DidFailProvisionalLoadWithError(0, params)); |
| 3664 main_test_rfh()->OnMessageReceived(FrameHostMsg_DidStopLoading(0)); | 3664 main_test_rfh()->OnMessageReceived(FrameHostMsg_DidStopLoading(0)); |
| 3665 } | 3665 } |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5284 main_test_rfh()->SimulateNavigationStart(url_1); | 5284 main_test_rfh()->SimulateNavigationStart(url_1); |
| 5285 EXPECT_EQ(url_1, controller.GetVisibleEntry()->GetURL()); | 5285 EXPECT_EQ(url_1, controller.GetVisibleEntry()->GetURL()); |
| 5286 EXPECT_EQ(ReloadType::NONE, last_reload_type_); | 5286 EXPECT_EQ(ReloadType::NONE, last_reload_type_); |
| 5287 | 5287 |
| 5288 main_test_rfh()->SimulateNavigationCommit(url_2); | 5288 main_test_rfh()->SimulateNavigationCommit(url_2); |
| 5289 main_test_rfh()->SimulateNavigationCommit(url_1); | 5289 main_test_rfh()->SimulateNavigationCommit(url_1); |
| 5290 main_test_rfh()->SimulateNavigationCommit(url_1); | 5290 main_test_rfh()->SimulateNavigationCommit(url_1); |
| 5291 } | 5291 } |
| 5292 | 5292 |
| 5293 } // namespace content | 5293 } // namespace content |
| OLD | NEW |