chromium/third_party/blink/web_tests/app_banner/app-banner-event-gc.html

<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>

async_test(function(t) {
  window.addEventListener('beforeinstallprompt', event => {
    setTimeout(_ => { gc(); }, 0);
    event.userChoice.then(_ => { t.done(); });
  });

  testRunner.dispatchBeforeInstallPromptEvent(['foo'],  _ => {
    setTimeout(_ => {
      testRunner.resolveBeforeInstallPromptPromise('foo');
    }, 100);
  });
}, 'accept');

</script>