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

Unified Diff: content/test/data/browser_plugin_embedder.html

Issue 11027065: Browser plugin: Implement titleChanged event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
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 45b374e3ac9f9d91494114f5cfb0b6418c9a0168..1b85e378b1eb405caf3f23b7f9f59145daaf2540 100644
--- a/content/test/data/browser_plugin_embedder.html
+++ b/content/test/data/browser_plugin_embedder.html
@@ -14,6 +14,11 @@ function loadRedirect(event) {
redirectNewUrl = event.newUrl;
}
}
+var shouldEchoTitle = false;
+function titleChanged(evt) {
+ if (shouldEchoTitle)
+ document.title = evt.title;
+}
function SetSrc(src) {
var plugin = document.getElementById('plugin');
plugin.src = src;
@@ -53,4 +58,5 @@ document.title = 'embedder';
plugin.addEventListener('loadStart', loadStart);
plugin.addEventListener('loadAbort', loadAbort);
plugin.addEventListener('loadRedirect', loadRedirect);
+ plugin.addEventListener('titleChanged', titleChanged);
</script>

Powered by Google App Engine
This is Rietveld 408576698