Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: chrome/test/data/prerender/prerender_loader_with_unload.html

Issue 7046053: Add PrerenderUnload browser test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add browser test Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title>Preloader</title>
4
5 <script>
6 function ClickOpenLinkInNewWindow() {
7 var eventObject = document.createEvent("MouseEvents");
8 eventObject.initMouseEvent('click');
9 document.getElementById("toClick").dispatchEvent(eventObject);
10 return true;
11 }
12
13 function JsOpenLinkInNewWindow() {
14 window.open("REPLACE_WITH_PRERENDER_URL");
15 return true;
16 }
17
18 function UnloadHandler() {
19 document.title = "Unloaded";
mmenke 2011/06/08 22:29:05 nit: I believe the convention is to use single qu
cbentzel 2011/06/09 00:49:49 Fixed. Also removed the vestigial functions from m
20 }
21
22 addEventListener("unload", UnloadHandler, false);
23 </script>
24
25 </head>
26 <body>
27 <script>
28 document.write('<link rel="prerender" href="REPLACE_WITH_PRERENDER_URL"/>');
29 </script>
30 <a target="_blank" id="toClick"
31 href="REPLACE_WITH_PRERENDER_URL">Link To Click</a>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698