add-to-homescreen button should not try craeting a WebAPK if the web manifest does not specify any icons
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/73f12a7222661ba2f81106c971bb25449ce78e9b commit 73f12a7222661ba2f81106c971bb25449ce78e9b Author: pkotwicz <pkotwicz@chromium.org> Date: Wed Sep 21 02:17:41 2016 Do not create WebAPK via add-to-homescreen menu item if manifest is not WebAPK-compatible This CL prevents creating WebAPKs via the add-to-homescreen menu item: - If the Web Manifest does not contain any icons - If any URL in the Web Manifest contains a username and password This makes the logic in add_to_homescreen_data_fetcher.cc match the logic in app_banner_manager_android.cc BUG= 648491 TEST=None Review-Url: https://codereview.chromium.org/2349263003 Cr-Commit-Position: refs/heads/master@{#419949} [modify] https://crrev.com/73f12a7222661ba2f81106c971bb25449ce78e9b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
Please provide test url to test this change
To check that the test setup is correct: 1) Enable WebAPKs in about://flags 2) Navigate to https://web-manifest.appspot.com/static/generated.html?service_worker=true&name=Long%20Train%20%F0%9F%9A%82&short_name=Short%20Train%20%F0%9F%9A%8B&scope=static/&display=standalone&orientation=&start_url=static/generated.html&theme_color=purple&background_color=teal&icons=static/icons/pentagon_128.png,static/icons/hexagon_256.png&icon_sizes=128,256&update=false&update_service_worker=false&update_after_num_page_loads=5&update_name=Long%20Train%20%F0%9F%9A%82&update_short_name=Short%20Train%20%F0%9F%9A%8B&update_scope=&update_display=standalone&update_orientation=&update_start_url=generated.html&update_theme_color=purple&update_background_color=teal&update_icons=&update_icon_sizes=&seed=890 3) Tap "Add to Home screen" from the app menu. Verify that an infobar shows up Please let me know if you are having any trouble with the "test setup". Test instructions: 1) Enable WebAPKs in about://flags 2) Navigate to https://web-manifest.appspot.com/static/generated.html?service_worker=true&name=Long%20Train%20%F0%9F%9A%82&short_name=Short%20Train%20%F0%9F%9A%8B&scope=static/&display=standalone&orientation=&start_url=static/generated.html&theme_color=purple&background_color=teal&icons=&icon_sizes=&update=false&update_service_worker=false&update_after_num_page_loads=5&update_name=Long%20Train%20%F0%9F%9A%82&update_short_name=Short%20Train%20%F0%9F%9A%8B&update_scope=&update_display=standalone&update_orientation=&update_start_url=generated.html&update_theme_color=purple&update_background_color=teal&update_icons=&update_icon_sizes=&seed=616 3) Tap "Add to Home screen" from the app menu. Verify that a dialog, not an infobar shows up
Comment 1 by pkotw...@chromium.org
, Sep 20 2016