• Jiewei Qian's avatar
    system-web-apps: avoid calling SynchronizeInstallApps twice in SWA upgrade test · f8374c81
    Jiewei Qian authored
    By default, we use an empty SWA list in test. When the test chrome
    process starts, SystemWebAppManager first calls SynchronizeInstalledApps
    with an empty list. In the upgrade test, this cause previously installed
    apps to be uninstalled.
    
    In the test body, we then use InstallSystemAppsForTesting to install the
    real system apps. This effectively installs apps on a clean state, and
    defeats the purpose of this test.
    
    This CL adds a check so SystemWebAppManager uses the real SWA list, if
    EnableAllSystemWebApps feature is enabled.
    
    Fixed: 1143108
    Change-Id: I7f60429bcae45c011eb0681a6d8c322e898a32c1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2503374Reviewed-by: default avatarcalamity <calamity@chromium.org>
    Commit-Queue: Jiewei Qian  <qjw@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#822047}
    f8374c81
system_web_app_manager.cc 33.3 KB