Commit 618a6d44 authored by Jarryd's avatar Jarryd Committed by Chromium LUCI CQ

dPWA: Implement launch_internal automated testing action.

This change also adds a basic test to verify the action.

Bug: 1156349
Change-Id: Ic1f0f331e72029cd8bb95368d525bc27c3e247a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2580485
Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836209}
parent b5136fd7
......@@ -107,14 +107,21 @@ class WebAppIntegrationBrowserTest : public InProcessBrowserTest {
run_loop.Run();
chrome::SetAutoAcceptPWAInstallConfirmationForTesting(false);
app_id_ = app_id;
return app_id;
}
Browser* LaunchInternal() {
return LaunchWebAppBrowserAndWait(ProfileManager::GetActiveUserProfile(),
app_id_);
}
protected:
PageActionIconView* pwa_install_view() { return pwa_install_view_; }
private:
AppId app_id_;
net::EmbeddedTestServer https_server_;
PageActionIconView* pwa_install_view_ = nullptr;
};
......@@ -143,4 +150,11 @@ IN_PROC_BROWSER_TEST_F(WebAppIntegrationBrowserTest,
kEnabled);
}
IN_PROC_BROWSER_TEST_F(WebAppIntegrationBrowserTest, LaunchInternal) {
NavigateToSite(browser(), GetInstallableAppURL());
ExecutePwaInstallIcon();
Browser* app_browser = LaunchInternal();
DCHECK(app_browser);
}
} // namespace web_app
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment