| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3470 | 3470 |
| 3471 // Suppose it aborts before committing, if it's a 204 or download or due to a | 3471 // Suppose it aborts before committing, if it's a 204 or download or due to a |
| 3472 // stop or a new navigation from the user. The URL should remain visible. | 3472 // stop or a new navigation from the user. The URL should remain visible. |
| 3473 FrameHostMsg_DidFailProvisionalLoadWithError_Params params; | 3473 FrameHostMsg_DidFailProvisionalLoadWithError_Params params; |
| 3474 params.error_code = net::ERR_ABORTED; | 3474 params.error_code = net::ERR_ABORTED; |
| 3475 params.error_description = base::string16(); | 3475 params.error_description = base::string16(); |
| 3476 params.url = url; | 3476 params.url = url; |
| 3477 params.showing_repost_interstitial = false; | 3477 params.showing_repost_interstitial = false; |
| 3478 main_test_rfh()->OnMessageReceived( | 3478 main_test_rfh()->OnMessageReceived( |
| 3479 FrameHostMsg_DidFailProvisionalLoadWithError(0, params)); | 3479 FrameHostMsg_DidFailProvisionalLoadWithError(0, params)); |
| 3480 contents()->SetIsLoading(false, true, NULL); | 3480 main_test_rfh()->OnMessageReceived(FrameHostMsg_DidStopLoading(0)); |
| 3481 EXPECT_EQ(url, controller.GetVisibleEntry()->GetURL()); | 3481 EXPECT_EQ(url, controller.GetVisibleEntry()->GetURL()); |
| 3482 | 3482 |
| 3483 // If something else later modifies the contents of the about:blank page, then | 3483 // If something else later modifies the contents of the about:blank page, then |
| 3484 // we must revert to showing about:blank to avoid a URL spoof. | 3484 // we must revert to showing about:blank to avoid a URL spoof. |
| 3485 main_test_rfh()->OnMessageReceived(FrameHostMsg_DidAccessInitialDocument(0)); | 3485 main_test_rfh()->OnMessageReceived(FrameHostMsg_DidAccessInitialDocument(0)); |
| 3486 EXPECT_TRUE(contents()->HasAccessedInitialDocument()); | 3486 EXPECT_TRUE(contents()->HasAccessedInitialDocument()); |
| 3487 EXPECT_FALSE(controller.GetVisibleEntry()); | 3487 EXPECT_FALSE(controller.GetVisibleEntry()); |
| 3488 EXPECT_FALSE(controller.GetPendingEntry()); | 3488 EXPECT_FALSE(controller.GetPendingEntry()); |
| 3489 | 3489 |
| 3490 notifications.Reset(); | 3490 notifications.Reset(); |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5121 EXPECT_EQ(default_ssl_status.connection_status, | 5121 EXPECT_EQ(default_ssl_status.connection_status, |
| 5122 details.ssl_status.connection_status); | 5122 details.ssl_status.connection_status); |
| 5123 EXPECT_EQ(default_ssl_status.content_status, | 5123 EXPECT_EQ(default_ssl_status.content_status, |
| 5124 details.ssl_status.content_status); | 5124 details.ssl_status.content_status); |
| 5125 EXPECT_EQ(0u, details.ssl_status.signed_certificate_timestamp_ids.size()); | 5125 EXPECT_EQ(0u, details.ssl_status.signed_certificate_timestamp_ids.size()); |
| 5126 | 5126 |
| 5127 EXPECT_EQ(1, main_test_rfh()->GetProcess()->bad_msg_count()); | 5127 EXPECT_EQ(1, main_test_rfh()->GetProcess()->bad_msg_count()); |
| 5128 } | 5128 } |
| 5129 | 5129 |
| 5130 } // namespace content | 5130 } // namespace content |
| OLD | NEW |