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

Unified Diff: content/renderer/browser_plugin/browser_plugin_browsertest.cc

Issue 11377089: browser-plugin: Send a JSON string for the detail data with the events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/test/data/browser_plugin_embedder.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin_browsertest.cc
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
index 5986aa86c65628fef29863635825169c53735473..27ee35b543c3ec0685404ff214d82b95afb38d1a 100644
--- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc
+++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
@@ -274,7 +274,7 @@ TEST_F(BrowserPluginTest, GuestCrash) {
const char* kAddEventListener =
"var msg;"
"function exitListener(e) {"
- " msg = e.detail.reason;"
+ " msg = JSON.parse(e.detail).reason;"
"}"
"document.getElementById('browserplugin')."
" addEventListener('-internal-exit', exitListener);";
@@ -314,8 +314,8 @@ TEST_F(BrowserPluginTest, RemovePlugin) {
TEST_F(BrowserPluginTest, CustomEvents) {
const char* kAddEventListener =
"var url;"
- "function nav(u) {"
- " url = u.detail.url;"
+ "function nav(e) {"
+ " url = JSON.parse(e.detail).url;"
"}"
"document.getElementById('browserplugin')."
" addEventListener('-internal-loadcommit', nav);";
@@ -501,8 +501,8 @@ TEST_F(BrowserPluginTest, ImmutableAttributesAfterNavigation) {
TEST_F(BrowserPluginTest, RemoveEventListenerInEventListener) {
const char* kAddEventListener =
"var url;"
- "function nav(u) {"
- " url = u.detail.url;"
+ "function nav(e) {"
+ " url = JSON.parse(e.detail).url;"
" document.getElementById('browserplugin')."
" removeEventListener('-internal-loadcommit', nav);"
"}"
@@ -616,7 +616,7 @@ TEST_F(BrowserPluginTest, RemoveBrowserPluginOnExit) {
const char* kAddEventListener =
"function exitListener(e) {"
- " if (e.detail.reason == 'killed') {"
+ " if (JSON.parse(e.detail).reason == 'killed') {"
" var bp = document.getElementById('browserplugin');"
" bp.parentNode.removeChild(bp);"
" }"
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/test/data/browser_plugin_embedder.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698