| 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 {
|
|
|