Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / chrome / test / data / prerender / prerender_loader_with_unload.html
blob5e84680d01d56315044daae109a6aa937c6b4d19
1 <html>
2 <head>
3 <title>Preloader</title>
4 <script src="prerender_events_common.js"></script>
6 <script>
7 function UnloadHandler() {
8 // Signal to the browser the unload happened by hitting a URL. Must
9 // be synchronous so the request isn't cancelled.
10 var xhr = new XMLHttpRequest();
11 xhr.open('GET', 'http://unload-url.test', false);
12 xhr.send();
15 addEventListener('unload', UnloadHandler, false);
16 </script>
18 </head>
19 <body>
20 <script>
21 AddPrerender('REPLACE_WITH_PRERENDER_URL', 0);
22 </script>
23 </body>
24 </html>