<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async () => {
let batteryManagerPromise = navigator.getBattery();
gc();
await batteryManagerPromise;
}, "navigator.getBattery() should resolve even in the face of GC");
</script>