A2HS banner shown with empty title on site with manifest name "" |
|||
Issue descriptionIn Clank 58.0.3029.83, I'm seeing an A2HS banner with a blank title on forbes.com Just looked into their manifest, they have name: "", short_name: "Forbes". Pressing 'Add to Home screen' button results in icon getting added with name "Forbes", but I presume we should either: 1) Be using the short_name in the banner since it has some content 2) Refuse to show the banner since name is invalid.
,
May 16 2017
I think you meant (1) as your text doesn't match Owen's description for (2). Can you clarify?
,
May 16 2017
Correct, I meant (1), thanks for noticing!
,
May 22 2017
We already have a fallback to short_name if name is empty. Unfortunately, it looks like it only works if name is null (i.e. not provided) rather than explicitly set to the empty string. This should be a pretty simple fix.
,
May 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0b543dd3a72f7d63717ee4c99e74bf01902a1c7c commit 0b543dd3a72f7d63717ee4c99e74bf01902a1c7c Author: dominickn <dominickn@chromium.org> Date: Tue May 23 04:14:21 2017 Properly fall back to manifest short_name when name is empty. If a PWA includes a "name" field in their manifest, but explicitly sets it to the empty string, it would have an app banner displayed with no text, as well as no title on its splash screen. This CL fixes the bug by properly checking if the "name" string is empty, rather than just null. This check is already performed by the InstallableManager in the process of determining whether or not a site is a valid PWA. An additional test is added to ensure the correct functionality. BUG= 722615 Review-Url: https://codereview.chromium.org/2900623002 Cr-Commit-Position: refs/heads/master@{#473806} [modify] https://crrev.com/0b543dd3a72f7d63717ee4c99e74bf01902a1c7c/chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java [modify] https://crrev.com/0b543dd3a72f7d63717ee4c99e74bf01902a1c7c/chrome/browser/banners/app_banner_manager.cc [add] https://crrev.com/0b543dd3a72f7d63717ee4c99e74bf01902a1c7c/chrome/test/data/banners/manifest_empty_name.json
,
May 23 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by piotrs@chromium.org
, May 16 2017