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

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

Issue 10941042: Browser plugin: Implement loadStart and loadAbort events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed creis@'s comments 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) {
3 document.title = 'abort';
Charlie Reis 2012/10/04 02:57:48 Maybe we should set it to evt.type, so we can test
Fady Samuel 2012/10/04 15:04:51 Done.
4 }
5 function loadStart(evt) {
6 document.title = evt.url;
7 }
2 function SetSrc(src) { 8 function SetSrc(src) {
3 var plugin = document.getElementById('plugin'); 9 var plugin = document.getElementById('plugin');
10 plugin.addEventListener('loadStart', loadStart);
11 plugin.addEventListener('loadAbort', loadAbort);
Charlie Reis 2012/10/04 02:57:48 This will cause these listeners to be added multip
Fady Samuel 2012/10/04 15:04:51 Done.
4 plugin.src = src; 12 plugin.src = src;
5 } 13 }
6 function SetSize(w, h) { 14 function SetSize(w, h) {
7 var plugin = document.getElementById('plugin'); 15 var plugin = document.getElementById('plugin');
8 plugin.width = w; 16 plugin.width = w;
9 plugin.height = h; 17 plugin.height = h;
10 } 18 }
11 function Back() { 19 function Back() {
12 var plugin = document.getElementById('plugin'); 20 var plugin = document.getElementById('plugin');
13 plugin.back(); 21 plugin.back();
14 } 22 }
15 function Forward() { 23 function Forward() {
16 var plugin = document.getElementById('plugin'); 24 var plugin = document.getElementById('plugin');
17 plugin.forward(); 25 plugin.forward();
18 } 26 }
19 function Go(relativeIndex) { 27 function Go(relativeIndex) {
20 var plugin = document.getElementById('plugin'); 28 var plugin = document.getElementById('plugin');
21 plugin.go(relativeIndex); 29 plugin.go(relativeIndex);
22 } 30 }
23 function SetTitle(str) { 31 function SetTitle(str) {
24 document.title = str; 32 document.title = str;
25 } 33 }
26 34 document.title = 'embedder';
27 window.document.title = 'embedder';
28 </script> 35 </script>
29 36
30 <object id="plugin" 37 <object id="plugin"
31 tabindex="0" 38 tabindex="0"
32 type="application/new-browser-plugin" 39 type="application/new-browser-plugin"
33 width="640" 40 width="640"
34 height="480" 41 height="480"
35 border="0px"></object> 42 border="0px"></object>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698