| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 538 |
| 539 // Create commit params with different origins in params.url and | 539 // Create commit params with different origins in params.url and |
| 540 // params.origin. | 540 // params.origin. |
| 541 FrameHostMsg_DidCommitProvisionalLoad_Params params; | 541 FrameHostMsg_DidCommitProvisionalLoad_Params params; |
| 542 params.nav_entry_id = 0; | 542 params.nav_entry_id = 0; |
| 543 params.did_create_new_entry = false; | 543 params.did_create_new_entry = false; |
| 544 params.url = url; | 544 params.url = url; |
| 545 params.transition = ui::PAGE_TRANSITION_LINK; | 545 params.transition = ui::PAGE_TRANSITION_LINK; |
| 546 params.should_update_history = false; | 546 params.should_update_history = false; |
| 547 params.gesture = NavigationGestureAuto; | 547 params.gesture = NavigationGestureAuto; |
| 548 params.was_within_same_page = false; | 548 params.was_within_same_document = false; |
| 549 params.method = "GET"; | 549 params.method = "GET"; |
| 550 params.page_state = PageState::CreateFromURL(url); | 550 params.page_state = PageState::CreateFromURL(url); |
| 551 params.origin = url::Origin(GURL("http://bar.com/")); | 551 params.origin = url::Origin(GURL("http://bar.com/")); |
| 552 | 552 |
| 553 FrameHostMsg_DidCommitProvisionalLoad msg( | 553 FrameHostMsg_DidCommitProvisionalLoad msg( |
| 554 root->current_frame_host()->routing_id(), params); | 554 root->current_frame_host()->routing_id(), params); |
| 555 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 555 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
| 556 root->current_frame_host()->GetProcess()->GetChannel(), msg); | 556 root->current_frame_host()->GetProcess()->GetChannel(), msg); |
| 557 | 557 |
| 558 // When the IPC message is received and validation fails, the process is | 558 // When the IPC message is received and validation fails, the process is |
| 559 // terminated. However, the notification for that should be processed in a | 559 // terminated. However, the notification for that should be processed in a |
| 560 // separate task of the message loop, so ensure that the process is still | 560 // separate task of the message loop, so ensure that the process is still |
| 561 // considered alive. | 561 // considered alive. |
| 562 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection()); | 562 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection()); |
| 563 | 563 |
| 564 exit_observer.Wait(); | 564 exit_observer.Wait(); |
| 565 EXPECT_FALSE(exit_observer.did_exit_normally()); | 565 EXPECT_FALSE(exit_observer.did_exit_normally()); |
| 566 ResourceDispatcherHost::Get()->SetDelegate(nullptr); | 566 ResourceDispatcherHost::Get()->SetDelegate(nullptr); |
| 567 } | 567 } |
| 568 | 568 |
| 569 } // namespace content | 569 } // namespace content |
| OLD | NEW |