| 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 47a74868713fbd44a6ac010e7faeb76758d65dba..8c2f7d70a102f455f36a1d099a781bd5b036390d 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
|
| @@ -273,15 +273,15 @@ TEST_F(BrowserPluginTest, GuestCrash) {
|
| BrowserPluginHostMsg_HandleInputEvent::ID));
|
| browser_plugin_manager()->sink().ClearMessages();
|
|
|
| - const char* kAddEventListener =
|
| + const char* kAddCustomEventListener =
|
| "var msg;"
|
| "function crashListener() {"
|
| " msg = 'crashed';"
|
| "}"
|
| "document.getElementById('browserplugin')."
|
| - " addEventListener('crash', crashListener);";
|
| + " addCustomEventListener('crash', crashListener);";
|
|
|
| - ExecuteJavaScript(kAddEventListener);
|
| + ExecuteJavaScript(kAddCustomEventListener);
|
|
|
| // Pretend that the guest has crashed
|
| browser_plugin->GuestCrashed();
|
| @@ -312,23 +312,23 @@ TEST_F(BrowserPluginTest, RemovePlugin) {
|
| }
|
|
|
| TEST_F(BrowserPluginTest, CustomEvents) {
|
| - const char* kAddEventListener =
|
| + const char* kAddCustomEventListener =
|
| "var url;"
|
| "function nav(u) {"
|
| " url = u;"
|
| "}"
|
| "document.getElementById('browserplugin')."
|
| - " addEventListener('navigation', nav);";
|
| - const char* kRemoveEventListener =
|
| + " addCustomEventListener('navigation', nav);";
|
| + const char* kRemoveCustomEventListener =
|
| "document.getElementById('browserplugin')."
|
| - " removeEventListener('navigation', nav);";
|
| + " removeCustomEventListener('navigation', nav);";
|
| const char* kGetProcessID =
|
| "document.getElementById('browserplugin').getProcessId()";
|
| const char* kGoogleURL = "http://www.google.com/";
|
| const char* kGoogleNewsURL = "http://news.google.com/";
|
|
|
| LoadHTML(GetHTMLForBrowserPluginObject().c_str());
|
| - ExecuteJavaScript(kAddEventListener);
|
| + ExecuteJavaScript(kAddCustomEventListener);
|
| // Grab the BrowserPlugin's instance ID from its resize message.
|
| const IPC::Message* msg =
|
| browser_plugin_manager()->sink().GetFirstMessageMatching(
|
| @@ -348,7 +348,7 @@ TEST_F(BrowserPluginTest, CustomEvents) {
|
| EXPECT_EQ(kGoogleURL, ExecuteScriptAndReturnString("url"));
|
| EXPECT_EQ(1337, ExecuteScriptAndReturnInt(kGetProcessID));
|
|
|
| - ExecuteJavaScript(kRemoveEventListener);
|
| + ExecuteJavaScript(kRemoveCustomEventListener);
|
| browser_plugin->DidNavigate(GURL(kGoogleNewsURL), 42);
|
| // The URL variable should not change because we've removed the event
|
| // listener.
|
|
|