OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 4790 matching lines...) Loading... |
4801 { | 4801 { |
4802 FrameMsg_NewFrame_Params params; | 4802 FrameMsg_NewFrame_Params params; |
4803 params.routing_id = frame_routing_id; | 4803 params.routing_id = frame_routing_id; |
4804 params.proxy_routing_id = proxy_routing_id; | 4804 params.proxy_routing_id = proxy_routing_id; |
4805 params.opener_routing_id = MSG_ROUTING_NONE; | 4805 params.opener_routing_id = MSG_ROUTING_NONE; |
4806 params.parent_routing_id = | 4806 params.parent_routing_id = |
4807 shell()->web_contents()->GetMainFrame()->GetRoutingID(); | 4807 shell()->web_contents()->GetMainFrame()->GetRoutingID(); |
4808 params.previous_sibling_routing_id = MSG_ROUTING_NONE; | 4808 params.previous_sibling_routing_id = MSG_ROUTING_NONE; |
4809 params.widget_params.routing_id = MSG_ROUTING_NONE; | 4809 params.widget_params.routing_id = MSG_ROUTING_NONE; |
4810 params.widget_params.hidden = true; | 4810 params.widget_params.hidden = true; |
| 4811 params.replication_state.name = "name"; |
| 4812 params.replication_state.unique_name = "name"; |
4811 | 4813 |
4812 process->Send(new FrameMsg_NewFrame(params)); | 4814 process->Send(new FrameMsg_NewFrame(params)); |
4813 } | 4815 } |
4814 | 4816 |
4815 // The test must wait for the process to exit, but if there is no leak, the | 4817 // The test must wait for the process to exit, but if there is no leak, the |
4816 // RenderFrame will be properly created and there will be no crash. | 4818 // RenderFrame will be properly created and there will be no crash. |
4817 // Therefore, navigate the main frame to completely different site, which | 4819 // Therefore, navigate the main frame to completely different site, which |
4818 // will cause the original process to exit cleanly. | 4820 // will cause the original process to exit cleanly. |
4819 EXPECT_TRUE(NavigateToURL( | 4821 EXPECT_TRUE(NavigateToURL( |
4820 shell(), embedded_test_server()->GetURL("d.com", "/title3.html"))); | 4822 shell(), embedded_test_server()->GetURL("d.com", "/title3.html"))); |
(...skipping 44 matching lines...) Loading... |
4865 | 4867 |
4866 { | 4868 { |
4867 FrameMsg_NewFrame_Params params; | 4869 FrameMsg_NewFrame_Params params; |
4868 params.routing_id = frame_routing_id; | 4870 params.routing_id = frame_routing_id; |
4869 params.proxy_routing_id = MSG_ROUTING_NONE; | 4871 params.proxy_routing_id = MSG_ROUTING_NONE; |
4870 params.opener_routing_id = MSG_ROUTING_NONE; | 4872 params.opener_routing_id = MSG_ROUTING_NONE; |
4871 params.parent_routing_id = parent_routing_id; | 4873 params.parent_routing_id = parent_routing_id; |
4872 params.previous_sibling_routing_id = MSG_ROUTING_NONE; | 4874 params.previous_sibling_routing_id = MSG_ROUTING_NONE; |
4873 params.widget_params.routing_id = widget_routing_id; | 4875 params.widget_params.routing_id = widget_routing_id; |
4874 params.widget_params.hidden = true; | 4876 params.widget_params.hidden = true; |
| 4877 params.replication_state.name = "name"; |
| 4878 params.replication_state.unique_name = "name"; |
4875 | 4879 |
4876 process->Send(new FrameMsg_NewFrame(params)); | 4880 process->Send(new FrameMsg_NewFrame(params)); |
4877 } | 4881 } |
4878 | 4882 |
4879 // The test must wait for the process to exit, but if there is no leak, the | 4883 // The test must wait for the process to exit, but if there is no leak, the |
4880 // RenderFrame will be properly created and there will be no crash. | 4884 // RenderFrame will be properly created and there will be no crash. |
4881 // Therefore, navigate the remaining subframe to completely different site, | 4885 // Therefore, navigate the remaining subframe to completely different site, |
4882 // which will cause the original process to exit cleanly. | 4886 // which will cause the original process to exit cleanly. |
4883 NavigateFrameToURL( | 4887 NavigateFrameToURL( |
4884 web_contents->GetFrameTree()->root()->child_at(0), | 4888 web_contents->GetFrameTree()->root()->child_at(0), |
(...skipping 406 matching lines...) Loading... |
5291 | 5295 |
5292 // Force the renderer to generate a new frame. | 5296 // Force the renderer to generate a new frame. |
5293 EXPECT_TRUE(ExecuteScript(shell()->web_contents(), | 5297 EXPECT_TRUE(ExecuteScript(shell()->web_contents(), |
5294 "document.body.style.background = 'black'")); | 5298 "document.body.style.background = 'black'")); |
5295 | 5299 |
5296 // Waits for the next frame. | 5300 // Waits for the next frame. |
5297 observer->Wait(); | 5301 observer->Wait(); |
5298 } | 5302 } |
5299 | 5303 |
5300 } // namespace content | 5304 } // namespace content |
OLD | NEW |