Add test coverage for sendBeacon() keepalive flag
[WebKit-https.git] / LayoutTests / http / wpt / beacon / support / sendBeacon-onunload-iframe.html
1 <!DOCTYPE html>
2 <html>
3 <body onunload="unload()">
4 <script src="/common/utils.js"></script>
5 <script src="/common/get-host-info.sub.js"></script>
6
7 <script>
8 const RESOURCES_DIR = "/beacon/resources/";
9 var id = self.token();
10
11 function unload() {
12     var testUrl = RESOURCES_DIR + "content-type.py?cmd=put&id=" + id;
13     navigator.sendBeacon(testUrl, "test");
14 }
15 </script>
16 </body>
17 </html>