Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Addressed CR feedback from Charlie. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4749 matching lines...) Expand 10 before | Expand all | Expand 10 after
4760 { 4760 {
4761 FrameMsg_NewFrame_Params params; 4761 FrameMsg_NewFrame_Params params;
4762 params.routing_id = frame_routing_id; 4762 params.routing_id = frame_routing_id;
4763 params.proxy_routing_id = proxy_routing_id; 4763 params.proxy_routing_id = proxy_routing_id;
4764 params.opener_routing_id = MSG_ROUTING_NONE; 4764 params.opener_routing_id = MSG_ROUTING_NONE;
4765 params.parent_routing_id = 4765 params.parent_routing_id =
4766 shell()->web_contents()->GetMainFrame()->GetRoutingID(); 4766 shell()->web_contents()->GetMainFrame()->GetRoutingID();
4767 params.previous_sibling_routing_id = MSG_ROUTING_NONE; 4767 params.previous_sibling_routing_id = MSG_ROUTING_NONE;
4768 params.widget_params.routing_id = MSG_ROUTING_NONE; 4768 params.widget_params.routing_id = MSG_ROUTING_NONE;
4769 params.widget_params.hidden = true; 4769 params.widget_params.hidden = true;
4770 params.replication_state.name = "name";
4771 params.replication_state.unique_name = "name";
4770 4772
4771 process->Send(new FrameMsg_NewFrame(params)); 4773 process->Send(new FrameMsg_NewFrame(params));
4772 } 4774 }
4773 4775
4774 // The test must wait for the process to exit, but if there is no leak, the 4776 // The test must wait for the process to exit, but if there is no leak, the
4775 // RenderFrame will be properly created and there will be no crash. 4777 // RenderFrame will be properly created and there will be no crash.
4776 // Therefore, navigate the main frame to completely different site, which 4778 // Therefore, navigate the main frame to completely different site, which
4777 // will cause the original process to exit cleanly. 4779 // will cause the original process to exit cleanly.
4778 EXPECT_TRUE(NavigateToURL( 4780 EXPECT_TRUE(NavigateToURL(
4779 shell(), embedded_test_server()->GetURL("d.com", "/title3.html"))); 4781 shell(), embedded_test_server()->GetURL("d.com", "/title3.html")));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
4824 4826
4825 { 4827 {
4826 FrameMsg_NewFrame_Params params; 4828 FrameMsg_NewFrame_Params params;
4827 params.routing_id = frame_routing_id; 4829 params.routing_id = frame_routing_id;
4828 params.proxy_routing_id = MSG_ROUTING_NONE; 4830 params.proxy_routing_id = MSG_ROUTING_NONE;
4829 params.opener_routing_id = MSG_ROUTING_NONE; 4831 params.opener_routing_id = MSG_ROUTING_NONE;
4830 params.parent_routing_id = parent_routing_id; 4832 params.parent_routing_id = parent_routing_id;
4831 params.previous_sibling_routing_id = MSG_ROUTING_NONE; 4833 params.previous_sibling_routing_id = MSG_ROUTING_NONE;
4832 params.widget_params.routing_id = widget_routing_id; 4834 params.widget_params.routing_id = widget_routing_id;
4833 params.widget_params.hidden = true; 4835 params.widget_params.hidden = true;
4836 params.replication_state.name = "name";
4837 params.replication_state.unique_name = "name";
4834 4838
4835 process->Send(new FrameMsg_NewFrame(params)); 4839 process->Send(new FrameMsg_NewFrame(params));
4836 } 4840 }
4837 4841
4838 // The test must wait for the process to exit, but if there is no leak, the 4842 // The test must wait for the process to exit, but if there is no leak, the
4839 // RenderFrame will be properly created and there will be no crash. 4843 // RenderFrame will be properly created and there will be no crash.
4840 // Therefore, navigate the remaining subframe to completely different site, 4844 // Therefore, navigate the remaining subframe to completely different site,
4841 // which will cause the original process to exit cleanly. 4845 // which will cause the original process to exit cleanly.
4842 NavigateFrameToURL( 4846 NavigateFrameToURL(
4843 web_contents->GetFrameTree()->root()->child_at(0), 4847 web_contents->GetFrameTree()->root()->child_at(0),
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
5250 5254
5251 // Force the renderer to generate a new frame. 5255 // Force the renderer to generate a new frame.
5252 EXPECT_TRUE(ExecuteScript(shell()->web_contents(), 5256 EXPECT_TRUE(ExecuteScript(shell()->web_contents(),
5253 "document.body.style.background = 'black'")); 5257 "document.body.style.background = 'black'"));
5254 5258
5255 // Waits for the next frame. 5259 // Waits for the next frame.
5256 observer->Wait(); 5260 observer->Wait();
5257 } 5261 }
5258 5262
5259 } // namespace content 5263 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698