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

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

Issue 2522733002: Do not prompt for reload when security panel is opened on an interstitial (Closed)
Patch Set: remove isInterstitialShowing setter Created 4 years, 1 month 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/protocol/page_handler.cc » ('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 025f6bde7541cd133d795fd085a2020b6460472d..437a36c205e0248fc1b5c9df4d01be3933ad0d7e 100644
--- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
+++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
@@ -1326,6 +1326,23 @@ IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, TargetDiscovery) {
EXPECT_TRUE(notifications_.empty());
}
+// Tests that an interstitialShown event is sent when an interstitial is showing
+// on attach.
+IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, InterstitialShownOnAttach) {
+ TestInterstitialDelegate* delegate = new TestInterstitialDelegate;
+ WebContentsImpl* web_contents =
+ static_cast<WebContentsImpl*>(shell()->web_contents());
+ GURL interstitial_url("https://example.test");
+ InterstitialPageImpl* interstitial = new InterstitialPageImpl(
+ web_contents, static_cast<RenderWidgetHostDelegate*>(web_contents), true,
+ interstitial_url, delegate);
+ interstitial->Show();
+ WaitForInterstitialAttach(web_contents);
+ Attach();
+ SendCommand("Page.enable", nullptr, false);
+ WaitForNotification("Page.interstitialShown", true);
+}
+
class SitePerProcessDevToolsProtocolTest : public DevToolsProtocolTest {
public:
void SetUpCommandLine(base::CommandLine* command_line) override {
« no previous file with comments | « no previous file | content/browser/devtools/protocol/page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698