blob: 0532deca4ba7184e3ce8752891368a27f3a4d549 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<!DOCTYPE html>
<script src="utils.js"></script>
<title>getBattery should fail in a fenced frame</title>
<script>
async function init() { // Needed in order to use top-level await.
const [uuid] = parseKeylist();
try {
await navigator.getBattery();
writeValueToServer(uuid, 'Expected an exception but the call succeeded');
} catch (err) {
writeValueToServer(uuid, err.name);
}
}
init();
</script>
</html>
|