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

Unified Diff: content/browser/devtools/protocol/devtools_protocol_browsertest.cc

Issue 2366773003: [DevTools] Avoid current_ and pending_ being the same host in RenderFrameDevToolsAgentHost. (Closed)
Patch Set: rebased, win failure Created 4 years, 3 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
« no previous file with comments | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698