Index: content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
diff --git a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
index 2a6d27ca3a82a21143552e519ab5b80f0f226c47..8be20751e349182a8bd50b99cfde367cbed8f181 100644 |
--- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
+++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
@@ -358,7 +358,7 @@ class DevToolsProtocolTest : public ContentBrowserTest, |
} |
void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override { |
- EXPECT_TRUE(false); |
+ DCHECK(false); |
} |
std::string waiting_for_notification_; |
@@ -838,6 +838,27 @@ IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, InspectDuringFrameSwap) { |
EXPECT_TRUE(success); |
} |
+// CrashTab() works differently on Windows, leading to RFH removal before |
+// RenderProcessGone is called. TODO(dgozman): figure out the problem. |
+#if defined(OS_WIN) |
+#define MAYBE_DoubleCrash DISABLED_DoubleCrash |
+#else |
+#define MAYBE_DoubleCrash DoubleCrash |
+#endif |
+IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, MAYBE_DoubleCrash) { |
+ ASSERT_TRUE(embedded_test_server()->Start()); |
+ GURL test_url = embedded_test_server()->GetURL("/devtools/navigation.html"); |
+ NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); |
+ Attach(); |
+ SendCommand("ServiceWorker.enable", nullptr); |
+ NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 1); |
+ CrashTab(shell()->web_contents()); |
+ NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 1); |
+ CrashTab(shell()->web_contents()); |
+ NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); |
+ // Should not crash at this point. |
+} |
+ |
IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, ReloadBlankPage) { |
Shell* window = Shell::CreateNewWindow( |
shell()->web_contents()->GetBrowserContext(), |