From de28fed2ede12520680e1cd657953e6d34226f6a Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Sat, 1 Feb 2014 14:36:32 +0000 Subject: content: Add a new target 'test_netscape_plugin' to build the module in shell/tools/plugin BUG=331302 TEST=ninja -C out_cros/Debug test_netscape_plugin builds R=jochen@chromium.org Review URL: https://codereview.chromium.org/145723004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248358 0039d316-1c4b-4281-b951-d872f2087c98 --- content/shell/tools/plugin/PluginObject.cpp | 9 +++++---- content/shell/tools/plugin/TestObject.cpp | 6 ++++++ .../tools/plugin/Tests/DocumentOpenInDestroyStream.cpp | 2 +- .../Tests/EvaluateJSAfterRemovingPluginElement.cpp | 2 +- content/shell/tools/plugin/Tests/FormValue.cpp | 2 +- .../plugin/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp | 11 +++++++---- .../tools/plugin/Tests/GetURLWithJavaScriptURL.cpp | 16 ++++++++++------ .../Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp | 9 ++++++--- .../plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp | 8 ++++++-- .../tools/plugin/Tests/LeakWindowScriptableObject.cpp | 8 ++++++-- content/shell/tools/plugin/Tests/LogNPPSetWindow.cpp | 2 +- .../plugin/Tests/NPDeallocateCalledBeforeNPShutdown.cpp | 12 ++++++++---- content/shell/tools/plugin/Tests/NPPNewFails.cpp | 9 ++++++--- .../tools/plugin/Tests/NPRuntimeCallsWithNullNPP.cpp | 8 ++++++-- .../plugin/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp | 2 +- .../tools/plugin/Tests/NPRuntimeRemoveProperty.cpp | 5 ++--- .../shell/tools/plugin/Tests/NullNPPGetValuePointer.cpp | 4 ++-- .../shell/tools/plugin/Tests/PassDifferentNPPStruct.cpp | 2 +- .../Tests/PluginScriptableNPObjectInvokeDefault.cpp | 2 +- .../PluginScriptableObjectOverridesAllProperties.cpp | 4 ++-- content/shell/tools/plugin/main.cpp | 17 +++++++++-------- content/shell/tools/plugin/win/TestNetscapePlugin.def | 2 +- content/shell/tools/plugin/win/TestNetscapePlugin.rc | 2 +- .../shell/tools/plugin/win/TestNetscapePlugin_debug.def | 2 +- 24 files changed, 91 insertions(+), 55 deletions(-) (limited to 'content/shell/tools') diff --git a/content/shell/tools/plugin/PluginObject.cpp b/content/shell/tools/plugin/PluginObject.cpp index f7c15a8..4e4d33f 100644 --- a/content/shell/tools/plugin/PluginObject.cpp +++ b/content/shell/tools/plugin/PluginObject.cpp @@ -33,6 +33,7 @@ #include "PluginTest.h" #include "TestObject.h" +#include "base/strings/string_util.h" #include #include #include @@ -1447,14 +1448,14 @@ void handleCallback(PluginObject* object, void notifyStream(PluginObject* object, const char* url, const char* headers) { if (!object->firstUrl) { if (url) - object->firstUrl = strdup(url); + object->firstUrl = base::strdup(url); if (headers) - object->firstHeaders = strdup(headers); + object->firstHeaders = base::strdup(headers); } else { free(object->lastUrl); free(object->lastHeaders); - object->lastUrl = (url ? strdup(url) : 0); - object->lastHeaders = (headers ? strdup(headers) : 0); + object->lastUrl = (url ? base::strdup(url) : 0); + object->lastHeaders = (headers ? base::strdup(headers) : 0); } } diff --git a/content/shell/tools/plugin/TestObject.cpp b/content/shell/tools/plugin/TestObject.cpp index 8987478..656c286 100644 --- a/content/shell/tools/plugin/TestObject.cpp +++ b/content/shell/tools/plugin/TestObject.cpp @@ -160,6 +160,12 @@ static bool testGetProperty(NPObject* npobj, STRINGZ_TO_NPVARIANT(mem, *result); return true; } + if (name == testIdentifiers[ID_PROPERTY_BAR]) { + char* mem = static_cast(browser->memalloc(4)); + strcpy(mem, "bar"); + STRINGZ_TO_NPVARIANT(mem, *result); + return true; + } if (name == testIdentifiers[ID_PROPERTY_OBJECT_POINTER]) { int32_t objectPointer = static_cast(reinterpret_cast(npobj)); diff --git a/content/shell/tools/plugin/Tests/DocumentOpenInDestroyStream.cpp b/content/shell/tools/plugin/Tests/DocumentOpenInDestroyStream.cpp index aa04e0b..57681be 100644 --- a/content/shell/tools/plugin/Tests/DocumentOpenInDestroyStream.cpp +++ b/content/shell/tools/plugin/Tests/DocumentOpenInDestroyStream.cpp @@ -44,7 +44,7 @@ public: } private: - virtual NPError NPP_DestroyStream(NPStream*, NPReason) + virtual NPError NPP_DestroyStream(NPStream*, NPReason) OVERRIDE { if (m_shouldOpen) { testDocumentOpen(m_npp); diff --git a/content/shell/tools/plugin/Tests/EvaluateJSAfterRemovingPluginElement.cpp b/content/shell/tools/plugin/Tests/EvaluateJSAfterRemovingPluginElement.cpp index b5c1901..5fd2e23 100644 --- a/content/shell/tools/plugin/Tests/EvaluateJSAfterRemovingPluginElement.cpp +++ b/content/shell/tools/plugin/Tests/EvaluateJSAfterRemovingPluginElement.cpp @@ -40,7 +40,7 @@ public: EvaluateJSAfterRemovingPluginElement(NPP, const string& identifier); private: - virtual NPError NPP_DestroyStream(NPStream*, NPReason); + virtual NPError NPP_DestroyStream(NPStream*, NPReason) OVERRIDE; bool m_didExecuteScript; }; diff --git a/content/shell/tools/plugin/Tests/FormValue.cpp b/content/shell/tools/plugin/Tests/FormValue.cpp index 614d75a..bc93d70 100644 --- a/content/shell/tools/plugin/Tests/FormValue.cpp +++ b/content/shell/tools/plugin/Tests/FormValue.cpp @@ -13,7 +13,7 @@ public: : PluginTest(npp, identifier) { } - virtual NPError NPP_GetValue(NPPVariable, void*); + virtual NPError NPP_GetValue(NPPVariable, void*) OVERRIDE; }; NPError FormValue::NPP_GetValue(NPPVariable variable, void *value) diff --git a/content/shell/tools/plugin/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp b/content/shell/tools/plugin/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp index 43b1d69..d11f3f9 100644 --- a/content/shell/tools/plugin/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp +++ b/content/shell/tools/plugin/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp @@ -45,14 +45,17 @@ public: } private: - - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { NPN_GetURLNotify(urlThatFailsToLoad, 0, reinterpret_cast(0x12345678)); return NPERR_NO_ERROR; } - bool NPP_URLNotify(const char* url, NPReason reason, void* notifyData) + virtual bool NPP_URLNotify(const char* url, NPReason reason, void* notifyData) OVERRIDE { bool didFail = false; diff --git a/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURL.cpp b/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURL.cpp index b030408..73d97d4 100644 --- a/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURL.cpp +++ b/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURL.cpp @@ -48,13 +48,17 @@ public: } private: - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { NPN_GetURL(javaScriptURL, 0); return NPERR_NO_ERROR; } - NPError NPP_NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype) + virtual NPError NPP_NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype) OVERRIDE { stream->pdata = this; @@ -68,7 +72,7 @@ private: return NPERR_NO_ERROR; } - NPError NPP_DestroyStream(NPStream* stream, NPReason reason) + virtual NPError NPP_DestroyStream(NPStream* stream, NPReason reason) OVERRIDE { if (stream->pdata != this) m_didFail = true; @@ -92,7 +96,7 @@ private: return NPERR_NO_ERROR; } - int32_t NPP_WriteReady(NPStream* stream) + virtual int32_t NPP_WriteReady(NPStream* stream) OVERRIDE { if (stream->pdata != this) m_didFail = true; @@ -100,7 +104,7 @@ private: return 2; } - int32_t NPP_Write(NPStream* stream, int32_t offset, int32_t len, void* buffer) + virtual int32_t NPP_Write(NPStream* stream, int32_t offset, int32_t len, void* buffer) OVERRIDE { if (stream->pdata != this) m_didFail = true; diff --git a/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp b/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp index 669c30d..fbc760a 100644 --- a/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp +++ b/content/shell/tools/plugin/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp @@ -41,9 +41,12 @@ public: } private: - - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { NPN_GetURL("javascript:removePlugin()", 0); return NPERR_NO_ERROR; } diff --git a/content/shell/tools/plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp b/content/shell/tools/plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp index 1b97ec0..380d7d0 100644 --- a/content/shell/tools/plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp +++ b/content/shell/tools/plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp @@ -43,8 +43,12 @@ public: } private: - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { if (!browser->uagent(0)) pluginLog(m_npp, "FAILURE: Null user agent returned."); else diff --git a/content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp b/content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp index 2a56f50..0ab4326 100644 --- a/content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp +++ b/content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp @@ -14,8 +14,12 @@ public: } private: - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { // Get a new reference to the window script object. NPObject* window; if (NPN_GetValue(NPNVWindowNPObject, &window) != NPERR_NO_ERROR) { diff --git a/content/shell/tools/plugin/Tests/LogNPPSetWindow.cpp b/content/shell/tools/plugin/Tests/LogNPPSetWindow.cpp index 0d03a30..30f6c4c 100644 --- a/content/shell/tools/plugin/Tests/LogNPPSetWindow.cpp +++ b/content/shell/tools/plugin/Tests/LogNPPSetWindow.cpp @@ -38,7 +38,7 @@ public: LogNPPSetWindow(NPP, const string& identifier); private: - virtual NPError NPP_SetWindow(NPWindow*); + virtual NPError NPP_SetWindow(NPWindow*) OVERRIDE; }; LogNPPSetWindow::LogNPPSetWindow(NPP npp, const string& identifier) diff --git a/content/shell/tools/plugin/Tests/NPDeallocateCalledBeforeNPShutdown.cpp b/content/shell/tools/plugin/Tests/NPDeallocateCalledBeforeNPShutdown.cpp index e952ee8..fcc70b0 100644 --- a/content/shell/tools/plugin/Tests/NPDeallocateCalledBeforeNPShutdown.cpp +++ b/content/shell/tools/plugin/Tests/NPDeallocateCalledBeforeNPShutdown.cpp @@ -44,7 +44,7 @@ private: // This is the test object. class TestObject : public Object { public: - ~TestObject() + virtual ~TestObject() { if (wasShutdownCalled) indicateTestFailure(); @@ -70,14 +70,18 @@ private: } }; - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { registerNPShutdownFunction(shutdown); return NPERR_NO_ERROR; } - virtual NPError NPP_GetValue(NPPVariable variable, void *value) + virtual NPError NPP_GetValue(NPPVariable variable, void *value) OVERRIDE { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; diff --git a/content/shell/tools/plugin/Tests/NPPNewFails.cpp b/content/shell/tools/plugin/Tests/NPPNewFails.cpp index 1938c06..ee385c4 100644 --- a/content/shell/tools/plugin/Tests/NPPNewFails.cpp +++ b/content/shell/tools/plugin/Tests/NPPNewFails.cpp @@ -41,9 +41,12 @@ public: } private: - - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { return NPERR_GENERIC_ERROR; } }; diff --git a/content/shell/tools/plugin/Tests/NPRuntimeCallsWithNullNPP.cpp b/content/shell/tools/plugin/Tests/NPRuntimeCallsWithNullNPP.cpp index 4d3b3f6..3e53b81 100644 --- a/content/shell/tools/plugin/Tests/NPRuntimeCallsWithNullNPP.cpp +++ b/content/shell/tools/plugin/Tests/NPRuntimeCallsWithNullNPP.cpp @@ -37,8 +37,12 @@ public: } private: - virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData *saved) - { + virtual NPError NPP_New(NPMIMEType pluginType, + uint16_t mode, + int16_t argc, + char* argn[], + char* argv[], + NPSavedData* saved) OVERRIDE { NPObject* windowObject = 0; if (NPN_GetValue(NPNVWindowNPObject, &windowObject) != NPERR_NO_ERROR || !windowObject) return NPERR_GENERIC_ERROR; diff --git a/content/shell/tools/plugin/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp b/content/shell/tools/plugin/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp index e081993..407f405 100644 --- a/content/shell/tools/plugin/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp +++ b/content/shell/tools/plugin/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp @@ -77,7 +77,7 @@ private: } }; - virtual NPError NPP_GetValue(NPPVariable variable, void *value) + virtual NPError NPP_GetValue(NPPVariable variable, void *value) OVERRIDE { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; diff --git a/content/shell/tools/plugin/Tests/NPRuntimeRemoveProperty.cpp b/content/shell/tools/plugin/Tests/NPRuntimeRemoveProperty.cpp index f923d5b..7eaa94b 100644 --- a/content/shell/tools/plugin/Tests/NPRuntimeRemoveProperty.cpp +++ b/content/shell/tools/plugin/Tests/NPRuntimeRemoveProperty.cpp @@ -92,7 +92,7 @@ private: { } - ~PluginObject() + virtual ~PluginObject() { if (m_testObject) pluginTest()->NPN_ReleaseObject(m_testObject); @@ -159,8 +159,7 @@ private: NPObject* m_testObject; }; - virtual NPError NPP_GetValue(NPPVariable variable, void *value) - { + virtual NPError NPP_GetValue(NPPVariable variable, void* value) OVERRIDE { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; diff --git a/content/shell/tools/plugin/Tests/NullNPPGetValuePointer.cpp b/content/shell/tools/plugin/Tests/NullNPPGetValuePointer.cpp index 5063896..654f062 100644 --- a/content/shell/tools/plugin/Tests/NullNPPGetValuePointer.cpp +++ b/content/shell/tools/plugin/Tests/NullNPPGetValuePointer.cpp @@ -40,8 +40,8 @@ public: NullNPPGetValuePointer(NPP, const string& identifier); private: - virtual NPError NPP_Destroy(NPSavedData**); - virtual NPError NPP_GetValue(NPPVariable, void* value); + virtual NPError NPP_Destroy(NPSavedData**) OVERRIDE; + virtual NPError NPP_GetValue(NPPVariable, void* value) OVERRIDE; NPP_GetValueProcPtr m_originalNPPGetValuePointer; }; diff --git a/content/shell/tools/plugin/Tests/PassDifferentNPPStruct.cpp b/content/shell/tools/plugin/Tests/PassDifferentNPPStruct.cpp index cdfc5a7..8e7df0a 100644 --- a/content/shell/tools/plugin/Tests/PassDifferentNPPStruct.cpp +++ b/content/shell/tools/plugin/Tests/PassDifferentNPPStruct.cpp @@ -45,7 +45,7 @@ public: } private: - virtual NPError NPP_SetWindow(NPWindow* window) + virtual NPError NPP_SetWindow(NPWindow* window) OVERRIDE { if (m_didReceiveInitialSetWindowCall) return NPERR_NO_ERROR; diff --git a/content/shell/tools/plugin/Tests/PluginScriptableNPObjectInvokeDefault.cpp b/content/shell/tools/plugin/Tests/PluginScriptableNPObjectInvokeDefault.cpp index b56fc0b..32e3459 100644 --- a/content/shell/tools/plugin/Tests/PluginScriptableNPObjectInvokeDefault.cpp +++ b/content/shell/tools/plugin/Tests/PluginScriptableNPObjectInvokeDefault.cpp @@ -51,7 +51,7 @@ private: } }; - virtual NPError NPP_GetValue(NPPVariable variable, void *value) + virtual NPError NPP_GetValue(NPPVariable variable, void *value) OVERRIDE { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; diff --git a/content/shell/tools/plugin/Tests/PluginScriptableObjectOverridesAllProperties.cpp b/content/shell/tools/plugin/Tests/PluginScriptableObjectOverridesAllProperties.cpp index e633b49..17c288b 100644 --- a/content/shell/tools/plugin/Tests/PluginScriptableObjectOverridesAllProperties.cpp +++ b/content/shell/tools/plugin/Tests/PluginScriptableObjectOverridesAllProperties.cpp @@ -48,7 +48,7 @@ private: { } - ~PluginObject() + virtual ~PluginObject() { } @@ -72,7 +72,7 @@ private: } }; - virtual NPError NPP_GetValue(NPPVariable variable, void *value) + virtual NPError NPP_GetValue(NPPVariable variable, void *value) OVERRIDE { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; diff --git a/content/shell/tools/plugin/main.cpp b/content/shell/tools/plugin/main.cpp index 3b74bf9..3236df6 100644 --- a/content/shell/tools/plugin/main.cpp +++ b/content/shell/tools/plugin/main.cpp @@ -30,6 +30,7 @@ #include "PluginObject.h" #include "PluginTest.h" +#include "base/strings/string_util.h" #include #include #include @@ -206,11 +207,11 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc if (strcasecmp(argn[i], "test") == 0) testIdentifier = argv[i]; if (strcasecmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad) - obj->onStreamLoad = strdup(argv[i]); + obj->onStreamLoad = base::strdup(argv[i]); else if (strcasecmp(argn[i], "onStreamDestroy") == 0 && !obj->onStreamDestroy) - obj->onStreamDestroy = strdup(argv[i]); + obj->onStreamDestroy = base::strdup(argv[i]); else if (strcasecmp(argn[i], "onURLNotify") == 0 && !obj->onURLNotify) - obj->onURLNotify = strdup(argv[i]); + obj->onURLNotify = base::strdup(argv[i]); else if (strcasecmp(argn[i], "src") == 0 && strcasecmp(argv[i], "data:application/x-webkit-test-netscape,returnerrorfromnewstream") == 0) obj->returnErrorFromNewStream = true; @@ -229,11 +230,11 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc } } } else if (strcasecmp(argn[i], "onSetWindow") == 0 && !obj->onSetWindow) - obj->onSetWindow = strdup(argv[i]); + obj->onSetWindow = base::strdup(argv[i]); else if (strcasecmp(argn[i], "onNew") == 0 && !onNewScript) onNewScript = argv[i]; else if (strcasecmp(argn[i], "onPaintEvent") == 0 && !obj->onPaintEvent) - obj->onPaintEvent = strdup(argv[i]); + obj->onPaintEvent = base::strdup(argv[i]); else if (strcasecmp(argn[i], "logfirstsetwindow") == 0) obj->logSetWindow = true; else if (strcasecmp(argn[i], "testnpruntime") == 0) @@ -245,7 +246,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc } else if (strcasecmp(argn[i], "cleardocumentduringnew") == 0) executeScript(obj, "document.body.innerHTML = ''"); else if (!strcasecmp(argn[i], "ondestroy")) - obj->onDestroy = strdup(argv[i]); + obj->onDestroy = base::strdup(argv[i]); else if (strcasecmp(argn[i], "testwindowopen") == 0) obj->testWindowOpen = true; else if (strcasecmp(argn[i], "drawingmodel") == 0) { @@ -275,9 +276,9 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc char* script = argv[i]; if (script == strstr(script, "mouse::")) { obj->mouseDownForEvaluateScript = true; - obj->evaluateScriptOnMouseDownOrKeyDown = strdup(script + sizeof("mouse::") - 1); + obj->evaluateScriptOnMouseDownOrKeyDown = base::strdup(script + sizeof("mouse::") - 1); } else if (script == strstr(script, "key::")) { - obj->evaluateScriptOnMouseDownOrKeyDown = strdup(script + sizeof("key::") - 1); + obj->evaluateScriptOnMouseDownOrKeyDown = base::strdup(script + sizeof("key::") - 1); } // When testing evaluate script on mouse-down or key-down, allow event logging to handle events. if (obj->evaluateScriptOnMouseDownOrKeyDown) diff --git a/content/shell/tools/plugin/win/TestNetscapePlugin.def b/content/shell/tools/plugin/win/TestNetscapePlugin.def index 313aea9..3eb5fd8 100644 --- a/content/shell/tools/plugin/win/TestNetscapePlugin.def +++ b/content/shell/tools/plugin/win/TestNetscapePlugin.def @@ -1,4 +1,4 @@ -LIBRARY "npTestNetscapePlugin" +LIBRARY "np_test_netscape_plugin" EXPORTS NP_GetEntryPoints @1 diff --git a/content/shell/tools/plugin/win/TestNetscapePlugin.rc b/content/shell/tools/plugin/win/TestNetscapePlugin.rc index a9446c9..a485eeb 100644 --- a/content/shell/tools/plugin/win/TestNetscapePlugin.rc +++ b/content/shell/tools/plugin/win/TestNetscapePlugin.rc @@ -75,7 +75,7 @@ BEGIN VALUE "FileOpenName", "test netscape content|PNG image" VALUE "LegalCopyright", "Copyright Apple Inc. 2007-2009" VALUE "MIMEType", "application/x-webkit-test-netscape|image/png" - VALUE "OriginalFilename", "npTestNetscapePlugin.dll" + VALUE "OriginalFilename", "np_test_netscape_plugin.dll" VALUE "ProductName", "WebKit Test PlugIn" END END diff --git a/content/shell/tools/plugin/win/TestNetscapePlugin_debug.def b/content/shell/tools/plugin/win/TestNetscapePlugin_debug.def index 158fb7c..21919f1 100644 --- a/content/shell/tools/plugin/win/TestNetscapePlugin_debug.def +++ b/content/shell/tools/plugin/win/TestNetscapePlugin_debug.def @@ -1,4 +1,4 @@ -LIBRARY "npTestNetscapePlugin_debug" +LIBRARY "np_test_netscape_plugin_debug" EXPORTS NP_GetEntryPoints @1 -- cgit v1.1