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

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

Issue 10918189: Add PrerenderStatusEvent on Prerenders (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase to trunk, remove some unrelated fixes... Created 8 years, 1 month 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Preloader</title> 3 <title>Preloader</title>
4 4
5 <script> 5 <script>
6 var receivedPrerenderStartEvent = false;
7 var receivedPrerenderStopEvent = false;
8
9 function PrerenderStartHandler() {
10 receivedPrerenderStartEvent = true;
11 }
12
13 function PrerenderStopHandler() {
14 receivedPrerenderStopEvent = true;
15 }
16
17 function ReceivedPrerenderStartEvent() {
18 return receivedPrerenderStartEvent;
19 }
20
21 function ReceivedPrerenderStopEvent() {
22 return receivedPrerenderStopEvent;
23 }
24
6 function Click() { 25 function Click() {
7 var eventObject = document.createEvent('MouseEvents'); 26 var eventObject = document.createEvent('MouseEvents');
8 eventObject.initMouseEvent('click'); 27 eventObject.initMouseEvent('click');
9 document.getElementById('toClick').dispatchEvent(eventObject); 28 document.getElementById('toClick').dispatchEvent(eventObject);
10 } 29 }
11 30
12 function ClickTarget() { 31 function ClickTarget() {
13 var eventObject = document.createEvent('MouseEvents'); 32 var eventObject = document.createEvent('MouseEvents');
14 eventObject.initMouseEvent('click'); 33 eventObject.initMouseEvent('click');
15 document.getElementById('toClickTarget').dispatchEvent(eventObject); 34 document.getElementById('toClickTarget').dispatchEvent(eventObject);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 75 }
57 76
58 function WindowOpen() { 77 function WindowOpen() {
59 window.open('REPLACE_WITH_DESTINATION_URL'); 78 window.open('REPLACE_WITH_DESTINATION_URL');
60 } 79 }
61 </script> 80 </script>
62 81
63 </head> 82 </head>
64 <body> 83 <body>
65 <script> 84 <script>
66 document.write('<link rel="prerender" href="REPLACE_WITH_PRERENDER_URL"/>'); 85 document.write('<link id="theprerender" rel="prerender" href="REPLACE_WITH_PRE RENDER_URL"/>');
86 prerender = document.getElementById('theprerender');
87 prerender.addEventListener('webkitprerenderstart', PrerenderStartHandler, fals e);
88 prerender.addEventListener('webkitprerenderstop', PrerenderStopHandler, false) ;
67 </script> 89 </script>
68 <a target="_blank" id="toClickTarget" 90 <a target="_blank" id="toClickTarget"
69 href="REPLACE_WITH_DESTINATION_URL">Link To click in new window</a> 91 href="REPLACE_WITH_DESTINATION_URL">Link To click in new window</a>
70 <a id="toClick" href="REPLACE_WITH_DESTINATION_URL">Link to click</a> 92 <a id="toClick" href="REPLACE_WITH_DESTINATION_URL">Link to click</a>
71 </body> 93 </body>
72 </html> 94 </html>
OLDNEW
« no previous file with comments | « chrome/renderer/prerender/prerender_dispatcher_unittest.cc ('k') | chrome/test/data/prerender/prerender_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698