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

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

Issue 2884243003: Add a mojo channel for frame messages. (Closed)
Patch Set: Use WeakPtr inside FrameInputHandlerImpl, add comments Created 3 years, 7 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 7833 matching lines...) Expand 10 before | Expand all | Expand 10 after
7844 GURL main_url(embedded_test_server()->GetURL( 7844 GURL main_url(embedded_test_server()->GetURL(
7845 "a.com", "/cross_site_iframe_factory.html?a(b)")); 7845 "a.com", "/cross_site_iframe_factory.html?a(b)"));
7846 EXPECT_TRUE(NavigateToURL(shell(), main_url)); 7846 EXPECT_TRUE(NavigateToURL(shell(), main_url));
7847 7847
7848 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) 7848 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents())
7849 ->GetFrameTree() 7849 ->GetFrameTree()
7850 ->root(); 7850 ->root();
7851 7851
7852 // "Select all" in the subframe. The bug only happens if there's a selection 7852 // "Select all" in the subframe. The bug only happens if there's a selection
7853 // change, which triggers the path through didChangeSelection. 7853 // change, which triggers the path through didChangeSelection.
7854 root->child_at(0)->current_frame_host()->Send(new InputMsg_SelectAll( 7854 root->child_at(0)->current_frame_host()->GetFrameInputHandler()->SelectAll();
7855 root->child_at(0)->current_frame_host()->GetRoutingID()));
7856 7855
7857 // Prevent b.com process from terminating right away once the subframe 7856 // Prevent b.com process from terminating right away once the subframe
7858 // navigates away from b.com below. This is necessary so that the renderer 7857 // navigates away from b.com below. This is necessary so that the renderer
7859 // process has time to process the closings of RenderWidget and RenderView, 7858 // process has time to process the closings of RenderWidget and RenderView,
7860 // which is where the original bug was triggered. Incrementing worker 7859 // which is where the original bug was triggered. Incrementing worker
7861 // RefCount will cause RenderProcessHostImpl::Cleanup to forego process 7860 // RefCount will cause RenderProcessHostImpl::Cleanup to forego process
7862 // termination. 7861 // termination.
7863 RenderProcessHost* subframe_process = 7862 RenderProcessHost* subframe_process =
7864 root->child_at(0)->current_frame_host()->GetProcess(); 7863 root->child_at(0)->current_frame_host()->GetProcess();
7865 subframe_process->IncrementSharedWorkerRefCount(); 7864 subframe_process->IncrementSharedWorkerRefCount();
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
10146 // the body of the page. 10145 // the body of the page.
10147 std::string body; 10146 std::string body;
10148 EXPECT_TRUE(ExecuteScriptAndExtractString(root->child_at(0), R"( 10147 EXPECT_TRUE(ExecuteScriptAndExtractString(root->child_at(0), R"(
10149 var body = document.getElementsByTagName('pre')[0].innerText; 10148 var body = document.getElementsByTagName('pre')[0].innerText;
10150 window.domAutomationController.send(body);)", 10149 window.domAutomationController.send(body);)",
10151 &body)); 10150 &body));
10152 EXPECT_EQ("my_token=my_value\n", body); 10151 EXPECT_EQ("my_token=my_value\n", body);
10153 } 10152 }
10154 10153
10155 } // namespace content 10154 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698