New issue
Advanced search Search tips

Issue 688902 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

AppBannerManager::page_requested_prompt_ not cleared after page navigation

Project Member Reported by pkotw...@chromium.org, Feb 6 2017

Issue description

AppBannerManager::page_requested_prompt_ not cleared after page navigation

Repro steps:
1) Set --bypass-app-banner-engagement-checks and --enable-add-to-shelf command line flags via chrome://flags
2) Navigate to a page which requests banner to be shown in beforeinstallprompt JS handler like chrome/test/data/banners/prompt_in_handler_test_page.html
3) Navigate to a page which cancels banner in beforeinstallprompt JS handler like chrome/test/data/banners/cancel_test_page.html

Expect:
The banner should not be shown for the second page
Actual:
The banner is shown for the second page
 
Description: Show this description
Description: Show this description
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e082e1d1591776aff10d468bc7057dfa3e49abea

commit e082e1d1591776aff10d468bc7057dfa3e49abea
Author: pkotwicz <pkotwicz@chromium.org>
Date: Tue Feb 21 02:28:39 2017

[Webapps]: Clear AppBannerManager::page_requested_prompt_ at start of banner flow

This CL fixes a bug where a web page is not capable of cancelling the app banner
if the tab was previously navigated to a page which requested the banner in the
beforeinstallprompt() JS handler.

BUG= 688902 
TEST=AppBannerManagerBrowserTest.CancelBannerAfterPromptInHandler

Review-Url: https://codereview.chromium.org/2677853002
Cr-Commit-Position: refs/heads/master@{#451689}

[modify] https://crrev.com/e082e1d1591776aff10d468bc7057dfa3e49abea/chrome/browser/banners/app_banner_manager.cc
[modify] https://crrev.com/e082e1d1591776aff10d468bc7057dfa3e49abea/chrome/browser/banners/app_banner_manager_browsertest.cc
[modify] https://crrev.com/e082e1d1591776aff10d468bc7057dfa3e49abea/chrome/test/data/banners/cancel_test_page.html
[add] https://crrev.com/e082e1d1591776aff10d468bc7057dfa3e49abea/chrome/test/data/banners/manifest_different_start_url.json

Status: Fixed (was: Assigned)

Sign in to add a comment