| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 EXPECT_EQ(load_params.base_url_for_data_url, entry->GetBaseURLForDataURL()); | 494 EXPECT_EQ(load_params.base_url_for_data_url, entry->GetBaseURLForDataURL()); |
| 495 if (!load_params.virtual_url_for_data_url.is_empty()) { | 495 if (!load_params.virtual_url_for_data_url.is_empty()) { |
| 496 EXPECT_EQ(load_params.virtual_url_for_data_url, entry->GetVirtualURL()); | 496 EXPECT_EQ(load_params.virtual_url_for_data_url, entry->GetVirtualURL()); |
| 497 } | 497 } |
| 498 if (NavigationController::UA_OVERRIDE_INHERIT != | 498 if (NavigationController::UA_OVERRIDE_INHERIT != |
| 499 load_params.override_user_agent) { | 499 load_params.override_user_agent) { |
| 500 bool should_override = (NavigationController::UA_OVERRIDE_TRUE == | 500 bool should_override = (NavigationController::UA_OVERRIDE_TRUE == |
| 501 load_params.override_user_agent); | 501 load_params.override_user_agent); |
| 502 EXPECT_EQ(should_override, entry->GetIsOverridingUserAgent()); | 502 EXPECT_EQ(should_override, entry->GetIsOverridingUserAgent()); |
| 503 } | 503 } |
| 504 EXPECT_EQ(load_params.browser_initiated_post_data, | 504 EXPECT_EQ(load_params.browser_initiated_post_data.get(), |
| 505 entry->GetBrowserInitiatedPostData()); | 505 entry->GetBrowserInitiatedPostData()); |
| 506 EXPECT_EQ(load_params.transferred_global_request_id, | 506 EXPECT_EQ(load_params.transferred_global_request_id, |
| 507 entry->transferred_global_request_id()); | 507 entry->transferred_global_request_id()); |
| 508 } | 508 } |
| 509 | 509 |
| 510 TEST_F(NavigationControllerTest, LoadURLWithParams) { | 510 TEST_F(NavigationControllerTest, LoadURLWithParams) { |
| 511 NavigationControllerImpl& controller = controller_impl(); | 511 NavigationControllerImpl& controller = controller_impl(); |
| 512 | 512 |
| 513 NavigationController::LoadURLParams load_params(GURL("http://foo")); | 513 NavigationController::LoadURLParams load_params(GURL("http://foo")); |
| 514 load_params.referrer = | 514 load_params.referrer = |
| 515 Referrer(GURL("http://referrer"), blink::WebReferrerPolicyDefault); | 515 Referrer(GURL("http://referrer"), blink::WebReferrerPolicyDefault); |
| (...skipping 3818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4334 params.post_id = -1; | 4334 params.post_id = -1; |
| 4335 test_rvh()->SendNavigateWithParams(¶ms); | 4335 test_rvh()->SendNavigateWithParams(¶ms); |
| 4336 | 4336 |
| 4337 // Now reload. replaceState overrides the POST, so we should not show a | 4337 // Now reload. replaceState overrides the POST, so we should not show a |
| 4338 // repost warning dialog. | 4338 // repost warning dialog. |
| 4339 controller_impl().Reload(true); | 4339 controller_impl().Reload(true); |
| 4340 EXPECT_EQ(0, delegate->repost_form_warning_count()); | 4340 EXPECT_EQ(0, delegate->repost_form_warning_count()); |
| 4341 } | 4341 } |
| 4342 | 4342 |
| 4343 } // namespace content | 4343 } // namespace content |
| OLD | NEW |