Chromium Code Reviews| Index: content/test/data/browser_plugin_embedder.html |
| diff --git a/content/test/data/browser_plugin_embedder.html b/content/test/data/browser_plugin_embedder.html |
| index 67dd80e27a1ba9d809843930ba5104db3e43727f..9501d19df3e7586f5d13c6558bc771110a87739e 100644 |
| --- a/content/test/data/browser_plugin_embedder.html |
| +++ b/content/test/data/browser_plugin_embedder.html |
| @@ -1,13 +1,14 @@ |
| <script type="text/javascript"> |
| function sizeChanged(evt) { |
| - document.title = "AutoSize(" + evt.newWidth + ", " + evt.newHeight + ")"; |
| + var data = JSON.parse(evt.detail); |
| + document.title = "AutoSize(" + data.newWidth + ", " + data.newHeight + ")"; |
| } |
| function loadAbort(evt) { |
| - document.title = evt.type; |
| + document.title = JSON.parse(evt.detail).reason; |
|
Charlie Reis
2012/11/12 18:23:12
I'm trying to understand what we're exposing to re
sadrul
2012/11/12 19:00:16
That is correct.
|
| } |
| function loadStart(evt) { |
| - document.title = evt.url; |
| + document.title = JSON.parse(evt.detail).url; |
| } |
| function loadStop(evt) { |
| document.title = "loadStop"; |
| @@ -15,17 +16,19 @@ function loadStop(evt) { |
| var commitIsTopLevel; |
| function loadCommit(evt) { |
| - document.title = "loadCommit:" + evt.url; |
| - commitIsTopLevel = evt.isTopLevel; |
| + var detail = JSON.parse(evt.detail); |
| + document.title = "loadCommit:" + detail.url; |
| + commitIsTopLevel = detail.isTopLevel; |
| } |
| var redirectOldUrl; |
| var redirectNewUrl; |
| function loadRedirect(event) { |
| document.title = "redirected"; |
| - if (event.isTopLevel) { |
| - redirectOldUrl = event.oldUrl; |
| - redirectNewUrl = event.newUrl; |
| + var detail = JSON.parse(event.detail); |
| + if (detail.isTopLevel) { |
| + redirectOldUrl = detail.oldUrl; |
| + redirectNewUrl = detail.newUrl; |
| } |
| } |
| function SetSrc(src) { |
| @@ -99,11 +102,11 @@ function receiveMessage(event) { |
| } |
| } |
| var plugin = document.getElementById('plugin'); |
| - plugin.addEventListener('loadstart', loadStart); |
| - plugin.addEventListener('loadabort', loadAbort); |
| - plugin.addEventListener('loadredirect', loadRedirect); |
| + plugin.addEventListener('-internal-loadstart', loadStart); |
| + plugin.addEventListener('-internal-loadabort', loadAbort); |
| + plugin.addEventListener('-internal-loadredirect', loadRedirect); |
| window.addEventListener('message', receiveMessage, false); |
| - plugin.addEventListener('loadstop', loadStop); |
| - plugin.addEventListener('loadcommit', loadCommit); |
| - plugin.addEventListener('sizechanged', sizeChanged); |
| + plugin.addEventListener('-internal-loadstop', loadStop); |
| + plugin.addEventListener('-internal-loadcommit', loadCommit); |
| + plugin.addEventListener('-internal-sizechanged', sizeChanged); |
| </script> |