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

Unified Diff: content/test/test_render_frame_host.h

Issue 2038843003: bluetooth: Don't call methods of WebContentsImpl while it's being destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address moar comments Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/test/test_render_frame_host.h
diff --git a/content/test/test_render_frame_host.h b/content/test/test_render_frame_host.h
index f1718467fb7fcff9d4f4834464261bbe99f1c29a..e5130eff94833ba51dcfa1a46f7bbe8c821c63cd 100644
--- a/content/test/test_render_frame_host.h
+++ b/content/test/test_render_frame_host.h
@@ -21,6 +21,8 @@ struct FrameHostMsg_DidCommitProvisionalLoad_Params;
namespace content {
+class FrameConnectedBluetoothDevices;
+
class TestRenderFrameHostCreationObserver : public WebContentsObserver {
public:
explicit TestRenderFrameHostCreationObserver(WebContents* web_contents);
@@ -107,6 +109,9 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
void SendRendererInitiatedNavigationRequest(const GURL& url,
bool has_user_gesture);
+ void SetFrameConnectedBluetoothDevices(
+ std::unique_ptr<FrameConnectedBluetoothDevices> connected_devices);
+
void DidChangeOpener(int opener_routing_id);
void DidEnforceStrictMixedContentChecking();
@@ -153,6 +158,10 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
std::string contents_mime_type_;
+ // This exists to test destruction of an instance of this type while
+ // the owning WebContentsImpl is being destroyed.
+ std::unique_ptr<FrameConnectedBluetoothDevices> connected_devices_;
ncarter (slow) 2016/06/06 22:52:25 I'm not sure why this is needed here, since you ne
ortuno 2016/06/06 23:01:18 The particular case we are trying to hit is when a
ncarter (slow) 2016/06/08 19:15:35 Sorry for the delay in replying to this. Let's spl
ortuno 2016/06/09 17:40:02 Thanks for the patch! I really appreciate it :) I
+
// See set_simulate_history_list_was_cleared() above.
bool simulate_history_list_was_cleared_;

Powered by Google App Engine
This is Rietveld 408576698