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

Side by Side Diff: content/test/data/browser_plugin_embedder.html

Issue 11035067: Add loadCommit and loadStop Event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Comments and Nits Created 8 years, 2 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
1 <script type="text/javascript"> 1 <script type="text/javascript">
2 function loadAbort(evt) { 2 function loadAbort(evt) {
3 document.title = evt.type; 3 document.title = evt.type;
4 } 4 }
5 function loadStart(evt) { 5 function loadStart(evt) {
6 document.title = evt.url; 6 document.title = evt.url;
7 } 7 }
8 function loadStop(evt) {
9 document.title = "loadStop";
10 }
11
12 var isTopLevel;
Charlie Reis 2012/10/11 18:55:28 nit: commitIsTopLevel. (There are isTopLevel prope
irobert 2012/10/11 20:45:49 Done.
13 function loadCommit(evt) {
14 document.title = evt.url;
Charlie Reis 2012/10/11 18:55:28 We can't distinguish between this and loadStart.
irobert 2012/10/11 20:45:49 I use "loadCommit:" as the prefix and plus the url
15 isTopLevel = evt.isTopLevel;
16 }
17
8 var redirectOldUrl; 18 var redirectOldUrl;
9 var redirectNewUrl; 19 var redirectNewUrl;
10 function loadRedirect(event) { 20 function loadRedirect(event) {
11 document.title = "redirected"; 21 document.title = "redirected";
12 if (event.isTopLevel) { 22 if (event.isTopLevel) {
13 redirectOldUrl = event.oldUrl; 23 redirectOldUrl = event.oldUrl;
14 redirectNewUrl = event.newUrl; 24 redirectNewUrl = event.newUrl;
15 } 25 }
16 } 26 }
17 function SetSrc(src) { 27 function SetSrc(src) {
(...skipping 28 matching lines...) Expand all
46 type="application/browser-plugin" 56 type="application/browser-plugin"
47 width="640" 57 width="640"
48 height="480" 58 height="480"
49 border="0px"></object> 59 border="0px"></object>
50 60
51 <script> 61 <script>
52 var plugin = document.getElementById('plugin'); 62 var plugin = document.getElementById('plugin');
53 plugin.addEventListener('loadStart', loadStart); 63 plugin.addEventListener('loadStart', loadStart);
54 plugin.addEventListener('loadAbort', loadAbort); 64 plugin.addEventListener('loadAbort', loadAbort);
55 plugin.addEventListener('loadRedirect', loadRedirect); 65 plugin.addEventListener('loadRedirect', loadRedirect);
66 plugin.addEventListener('loadStop', loadStop);
67 plugin.addEventListener('loadCommit', loadCommit);
56 </script> 68 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698