summaryrefslogtreecommitdiffstats
path: root/chrome/browser/banners/app_banner_data_fetcher_browsertest.cc
diff options
context:
space:
mode:
authorhoro <horo@chromium.org>2016-01-25 06:36:45 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-25 14:38:04 +0000
commit9638ad271db786762315556b7c2bc9c0a55c8e76 (patch)
tree3d4d25e42153b553a345935b203188256eea786c /chrome/browser/banners/app_banner_data_fetcher_browsertest.cc
parentf5cdfde9135883c6cd83c81436ebe4888c432b8b (diff)
downloadchromium_src-9638ad271db786762315556b7c2bc9c0a55c8e76.zip
chromium_src-9638ad271db786762315556b7c2bc9c0a55c8e76.tar.gz
chromium_src-9638ad271db786762315556b7c2bc9c0a55c8e76.tar.bz2
Add "Request app banner" context menu in DevTools
BUG=540491 Demo: https://drive.google.com/file/d/0B6skYAFVnosEc1RQRm9KYmxCeXM/view?usp=sharing When the user clicks "Request app banner" context menu, Chrome tries to open "add to homescreen" banner. And if error happens, it will show the detailed information about why the app banner is not opened even if "bypass-app-banner-engagement-checks" flag is not set. RequestAppBanner method from DevTools is handled like this: Android: PageHandler::RequestAppBanner() -> TabWebContentsDelegateAndroid::RequestAppBanner() -> Java TabWebContentsDelegateAndroid.requestAppBanner() -> Java Tab.requestAppBanner() -> Java AppBannerManager.requestAppBanner() -> nativeRequestAppBanner() -> AppBannerManagerAndroid::RequestAppBanner() -> AppBannerManager::TriggerAppBannerFetch() Desktop: PageHandler::RequestAppBanner() -> Browser::RequestAppBanner() -> AppBannerManager::TriggerAppBannerFetch() Review URL: https://codereview.chromium.org/1569893003 Cr-Commit-Position: refs/heads/master@{#371239}
Diffstat (limited to 'chrome/browser/banners/app_banner_data_fetcher_browsertest.cc')
-rw-r--r--chrome/browser/banners/app_banner_data_fetcher_browsertest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/banners/app_banner_data_fetcher_browsertest.cc b/chrome/browser/banners/app_banner_data_fetcher_browsertest.cc
index c868268..57d3883 100644
--- a/chrome/browser/banners/app_banner_data_fetcher_browsertest.cc
+++ b/chrome/browser/banners/app_banner_data_fetcher_browsertest.cc
@@ -73,7 +73,8 @@ class AppBannerDataFetcherBrowserTest : public InProcessBrowserTest,
bool HandleNonWebApp(const std::string& platform,
const GURL& url,
- const std::string& id) override {
+ const std::string& id,
+ bool is_debug_mode) override {
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_);
non_web_platform_ = platform;
return false;
@@ -95,9 +96,8 @@ class AppBannerDataFetcherBrowserTest : public InProcessBrowserTest,
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
scoped_refptr<AppBannerDataFetcherDesktop> fetcher(
- new AppBannerDataFetcherDesktop(web_contents,
- weak_factory_.GetWeakPtr(),
- 128, 128));
+ new AppBannerDataFetcherDesktop(
+ web_contents, weak_factory_.GetWeakPtr(), 128, 128, false));
base::HistogramTester histograms;
base::RunLoop run_loop;