Implement NPN_RemoveProperty
https://bugs.webkit.org/show_bug.cgi?id=43315

Reviewed by Sam Weinig.

WebKit2:

* WebProcess/Plugins/NPJSObject.cpp:
(WebKit::NPJSObject::removeProperty):
Try to remove the property.

(WebKit::NPJSObject::npClass):
Add NP_RemoveProperty.

(WebKit::NPJSObject::NP_RemoveProperty):
Call NPJSObject::removeProperty.

* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_RemoveProperty):
Call the NPClass::removeProperty function.

WebKitTools:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Add NPRuntimeRemoveProperty.cpp

* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::NPN_GetStringIdentifier):
(PluginTest::NPN_GetIntIdentifier):
(PluginTest::NPN_RemoveProperty):
Add NPN_ helpers.

* DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
Support more NPClass functions.

* DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp: Added.
(NPRuntimeRemoveProperty::NPRuntimeRemoveProperty):
Test for NPN_RemoveProperty.

(NPRuntimeRemoveProperty::TestObject::hasMethod):
(NPRuntimeRemoveProperty::TestObject::invoke):
Add a testRemoveProperty method.

(NPRuntimeRemoveProperty::NPP_GetValue):
Return the test object.

* DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
* DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
* GNUmakefile.am:
Add NPRuntimeRemoveProperty.cpp

LayoutTests:

Add a test for NPN_RemoveProperty.

* plugins/npruntime/remove-property-expected.txt: Added.
* plugins/npruntime/remove-property.html: Added.

git-svn-id: svn://svn.chromium.org/blink/trunk@64444 bbb929c8-8fbe-4397-9dbb-9b2b20218538
NPClass* NPJSObject::npClass()
{
    static NPClass npClass = {
        NP_CLASS_STRUCT_VERSION,
        NP_Allocate,
        NP_Deallocate,
        0,
        NP_HasMethod,
        NP_Invoke,
        NP_InvokeDefault,
         NP_HasProperty,
         NP_GetProperty,
         NP_SetProperty,
        NP_RemoveProperty,
         NP_Enumerate,
         NP_Construct
     };

    return &npClass;
}

NPClass* NPJSObject::npClass()
{
    static NPClass npClass = {
        NP_CLASS_STRUCT_VERSION,
        NP_Allocate,
        NP_Deallocate,
        0,
        NP_HasMethod,
        NP_Invoke,
        NP_InvokeDefault,
         NP_HasProperty,
         NP_GetProperty,
         NP_SetProperty,
        0,
         NP_Enumerate,
         NP_Construct
     };

    return &npClass;
}
