Nacre/tests/smoke/pages/site.html

11 lines
628 B
HTML

<!doctype html>
<meta charset="utf-8">
<title>Site permissions probe</title>
<img id="pic" width="32" height="32" src="backdrop.gif" onload="res.img = 'loaded'" onerror="res.img = 'blocked'">
<script>
// Test page for tests/smoke/site-memory*.txt (served by `python3 -m http.server 8768` over tests/smoke/pages).
// Each probe puts its answer in `res`; the script waits for it with `waitfor`.
window.res = {};
function notif() { delete res.notif; Notification.requestPermission().then(r => { res.notif = r; }); }
function pop() { delete res.pop; const w = window.open('hello.html'); res.pop = w ? 'opened' : 'null'; }
</script>