[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aroben at apple.com aroben at apple.com
Wed Dec 22 15:26:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b4e10616c0c5466354243d8d6c394e1e6aee0dc7
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 3 17:32:56 2010 +0000

    Add a plugin test that evaluates JS after removing the plugin element from the document
    
    This test replaces platform/win/plugins/plugin-delayed-destroy.html.
    That test was made to prevent a crash very similar to this one, but
    unfortunately tested only the mechanism that prevented the crash and
    not whether the crash itself was prevented. Since WebKit2 uses a
    different mechanism to prevent the crash, the test was failing even
    though WebKit2 was not vulnerable to the crash. This new test crashes
    if there is no mechanism in place to prevent it and passes in both
    WebKit1 and WebKit2.
    
    Fixes <http://webkit.org/b/46711> <rdar://problem/8485903>
    platform/win/plugins/plugin-delayed-destroy.html fails in WebKit2
    
    Reviewed by Anders Carlsson.
    
    WebKitTools:
    
    * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
    * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
    * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
    * GNUmakefile.am:
    Added new file.
    
    * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
    (pluginDeallocate): Make sure we delete the PluginTest object. This
    prevents a leak and also allows us to test the crash.
    
    * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
    (PluginTest::executeScript): Made this into a non-static member
    function.
    
    (PluginTest::waitUntilDone):
    (PluginTest::notifyDone):
    Updated for changes to executeScript.
    
    * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: Added executeScript.
    
    * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp: Added.
    (EvaluateJSAfterRemovingPluginElement::EvaluateJSAfterRemovingPluginElement):
    Initialize ourselves and tell the test harness to wait.
    (EvaluateJSAfterRemovingPluginElement::NPP_DestroyStream): Remove our
    plugin element from the document, then execute some JavaScript. If
    WebKit does not have appropriate mechanisms in place, we'll be
    destroyed inside the first call to executeScript and crash on the
    second call.
    
    LayoutTests:
    
    * platform/mac/Skipped: Added the new test, which fails in WebKit1 on SnowLeopard.
    
    * platform/win-wk2/Skipped: Removed platform/win/plugins/plugin-delayed-destroy.html.
    
    * platform/win/plugins/plugin-delayed-destroy-expected.txt: Removed.
    * platform/win/plugins/plugin-delayed-destroy.html: Removed.
    
    * plugins/evaluate-js-after-removing-plugin-element-expected.txt: Added.
    * plugins/evaluate-js-after-removing-plugin-element.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71249 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 82acdf2..a6b7532 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,32 @@
+2010-11-03  Adam Roben  <aroben at apple.com>
+
+        Add a plugin test that evaluates JS after removing the plugin element
+        from the document
+
+        This test replaces platform/win/plugins/plugin-delayed-destroy.html.
+        That test was made to prevent a crash very similar to this one, but
+        unfortunately tested only the mechanism that prevented the crash and
+        not whether the crash itself was prevented. Since WebKit2 uses a
+        different mechanism to prevent the crash, the test was failing even
+        though WebKit2 was not vulnerable to the crash. This new test crashes
+        if there is no mechanism in place to prevent it and passes in both
+        WebKit1 and WebKit2.
+
+        Fixes <http://webkit.org/b/46711> <rdar://problem/8485903>
+        platform/win/plugins/plugin-delayed-destroy.html fails in WebKit2
+
+        Reviewed by Anders Carlsson.
+
+        * platform/mac/Skipped: Added the new test, which fails in WebKit1 on SnowLeopard.
+
+        * platform/win-wk2/Skipped: Removed platform/win/plugins/plugin-delayed-destroy.html.
+
+        * platform/win/plugins/plugin-delayed-destroy-expected.txt: Removed.
+        * platform/win/plugins/plugin-delayed-destroy.html: Removed.
+
+        * plugins/evaluate-js-after-removing-plugin-element-expected.txt: Added.
+        * plugins/evaluate-js-after-removing-plugin-element.html: Added.
+
 2010-11-03  Stephen White  <senorblanco at chromium.org>
 
         Unreviewed; test expectations update.
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index de6a6d3..e000ba8 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -272,3 +272,6 @@ fast/images/webp-image-decoding.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=47901
 fast/canvas/canvas-getImageData-negative-source.html
+
+# Times out because plugins aren't allowed to execute JS after NPP_Destroy has been called in WebKit1's OOP plugins implementation http://webkit.org/b/48929
+plugins/evaluate-js-after-removing-plugin-element.html
diff --git a/LayoutTests/platform/win-wk2/Skipped b/LayoutTests/platform/win-wk2/Skipped
index 5a6136c..532526e 100644
--- a/LayoutTests/platform/win-wk2/Skipped
+++ b/LayoutTests/platform/win-wk2/Skipped
@@ -75,9 +75,6 @@ storage
 # http://webkit.org/b/46672
 plugins/embed-attributes-style.html
 
-# http://webkit.org/b/46711
-platform/win/plugins/plugin-delayed-destroy.html
-
 # http://webkit.org/b/46715
 plugins/npruntime/invoke-failure.html
 
diff --git a/LayoutTests/platform/win/plugins/plugin-delayed-destroy-expected.txt b/LayoutTests/platform/win/plugins/plugin-delayed-destroy-expected.txt
deleted file mode 100644
index f5479f9..0000000
--- a/LayoutTests/platform/win/plugins/plugin-delayed-destroy-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-The should be printed before destroy.
-Plug-in destroyed.
-
diff --git a/LayoutTests/platform/win/plugins/plugin-delayed-destroy.html b/LayoutTests/platform/win/plugins/plugin-delayed-destroy.html
deleted file mode 100644
index 74c3d1f..0000000
--- a/LayoutTests/platform/win/plugins/plugin-delayed-destroy.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<html>
-<body>
-    <pre id="console"></pre>
-    <div id="outer">
-        <embed id="plg" type="application/x-webkit-test-netscape" onDestroy="pluginDestroyed()"></embed>
-    </div>
-    <script>
-        function log(message)
-        {
-            document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
-        }
-
-        function pluginDestroyed()
-        {
-            log("Plug-in destroyed.")
-            layoutTestController.notifyDone();
-        }
-
-        if (window.layoutTestController) {
-            layoutTestController.waitUntilDone();
-            layoutTestController.dumpAsText();
-        }
-
-        var plugin = document.getElementById("plg");
-
-        plugin.testEvaluate("window.document.getElementById('outer').innerHTML = '';");
-
-        log("The should be printed before destroy.");
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/plugins/evaluate-js-after-removing-plugin-element-expected.txt b/LayoutTests/plugins/evaluate-js-after-removing-plugin-element-expected.txt
new file mode 100644
index 0000000..da04b0f
--- /dev/null
+++ b/LayoutTests/plugins/evaluate-js-after-removing-plugin-element-expected.txt
@@ -0,0 +1,3 @@
+This tests that we don't crash when a plugin removes itself from the document and then executes JavaScript.
+
+Executing script after removing the plugin element from the document succeeded.
diff --git a/LayoutTests/plugins/evaluate-js-after-removing-plugin-element.html b/LayoutTests/plugins/evaluate-js-after-removing-plugin-element.html
new file mode 100644
index 0000000..440a4f9
--- /dev/null
+++ b/LayoutTests/plugins/evaluate-js-after-removing-plugin-element.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <script>
+        if (window.layoutTestController)
+            layoutTestController.dumpAsText();
+    </script>
+</head>
+<body>
+    <div>
+        <embed id=testPlugin type="application/x-webkit-test-netscape" src="data:text/plain," test="evaluate-js-after-removing-plugin-element"></embed>
+    </div>
+    <p>This tests that we don't crash when a plugin removes itself from the document and then executes JavaScript.</p>
+</body>
+</html>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a1003ab..acedee2 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,51 @@
+2010-11-03  Adam Roben  <aroben at apple.com>
+
+        Add a plugin test that evaluates JS after removing the plugin element
+        from the document
+
+        This test replaces platform/win/plugins/plugin-delayed-destroy.html.
+        That test was made to prevent a crash very similar to this one, but
+        unfortunately tested only the mechanism that prevented the crash and
+        not whether the crash itself was prevented. Since WebKit2 uses a
+        different mechanism to prevent the crash, the test was failing even
+        though WebKit2 was not vulnerable to the crash. This new test crashes
+        if there is no mechanism in place to prevent it and passes in both
+        WebKit1 and WebKit2.
+
+        Fixes <http://webkit.org/b/46711> <rdar://problem/8485903>
+        platform/win/plugins/plugin-delayed-destroy.html fails in WebKit2
+
+        Reviewed by Anders Carlsson.
+
+        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
+        * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+        * GNUmakefile.am:
+        Added new file.
+
+        * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
+        (pluginDeallocate): Make sure we delete the PluginTest object. This
+        prevents a leak and also allows us to test the crash.
+
+        * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
+        (PluginTest::executeScript): Made this into a non-static member
+        function.
+
+        (PluginTest::waitUntilDone):
+        (PluginTest::notifyDone):
+        Updated for changes to executeScript.
+
+        * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: Added executeScript.
+
+        * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp: Added.
+        (EvaluateJSAfterRemovingPluginElement::EvaluateJSAfterRemovingPluginElement):
+        Initialize ourselves and tell the test harness to wait.
+        (EvaluateJSAfterRemovingPluginElement::NPP_DestroyStream): Remove our
+        plugin element from the document, then execute some JavaScript. If
+        WebKit does not have appropriate mechanisms in place, we'll be
+        destroyed inside the first call to executeScript and crash on the
+        second call.
+
 2010-11-02  Stephen White  <senorblanco at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj b/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
index bf0aebf..b2eb8e9 100644
--- a/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
+++ b/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
@@ -132,6 +132,7 @@
 		BCD08B710E1059D200A7D0C1 /* AccessibilityControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */; };
 		BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF6C64F0C98E9C000AC063E /* GCController.cpp */; };
 		C06F9ABC1267A7060058E1F6 /* PassDifferentNPPStruct.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C06F9ABB1267A7060058E1F6 /* PassDifferentNPPStruct.cpp */; };
+		C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */; };
 		C0EC3C9C12787F0500939164 /* NullNPPGetValuePointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */; };
 		E1B7816511AF31B7007E1BC2 /* MockGeolocationProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1B7808711AF1669007E1BC2 /* MockGeolocationProvider.mm */; };
 		E1B7816711AF31C3007E1BC2 /* MockGeolocationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = E1B7808511AF1643007E1BC2 /* MockGeolocationProvider.h */; };
@@ -307,6 +308,7 @@
 		BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityControllerMac.mm; path = mac/AccessibilityControllerMac.mm; sourceTree = "<group>"; };
 		BCF6C64F0C98E9C000AC063E /* GCController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCController.cpp; sourceTree = "<group>"; };
 		C06F9ABB1267A7060058E1F6 /* PassDifferentNPPStruct.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PassDifferentNPPStruct.cpp; sourceTree = "<group>"; };
+		C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJSAfterRemovingPluginElement.cpp; sourceTree = "<group>"; };
 		C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NullNPPGetValuePointer.cpp; sourceTree = "<group>"; };
 		E1B7808511AF1643007E1BC2 /* MockGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockGeolocationProvider.h; path = mac/MockGeolocationProvider.h; sourceTree = "<group>"; };
 		E1B7808711AF1669007E1BC2 /* MockGeolocationProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MockGeolocationProvider.mm; path = mac/MockGeolocationProvider.mm; sourceTree = "<group>"; };
@@ -462,6 +464,7 @@
 			isa = PBXGroup;
 			children = (
 				1A215A7511F26072008AD0F5 /* DocumentOpenInDestroyStream.cpp */,
+				C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */,
 				1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */,
 				1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */,
 				C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */,
@@ -751,6 +754,7 @@
 				1A24BAA9120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp in Sources */,
 				C06F9ABC1267A7060058E1F6 /* PassDifferentNPPStruct.cpp in Sources */,
 				C0EC3C9C12787F0500939164 /* NullNPPGetValuePointer.cpp in Sources */,
+				C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
index db73a9d..d7c6d2c 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
@@ -27,6 +27,7 @@
 
 #include "PluginObject.h"
 
+#include "PluginTest.h"
 #include "TestObject.h"
 #include <assert.h>
 #include <stdarg.h>
@@ -990,6 +991,7 @@ static NPObject *pluginAllocate(NPP npp, NPClass *theClass)
 static void pluginDeallocate(NPObject* header)
 {
     PluginObject* plugin = reinterpret_cast<PluginObject*>(header);
+    delete plugin->pluginTest;
     if (plugin->testObject)
         browser->releaseobject(plugin->testObject);
     if (plugin->rememberedObject)
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
index e41e6e5..06c9953 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
@@ -101,28 +101,28 @@ bool PluginTest::NPN_RemoveProperty(NPObject* npObject, NPIdentifier propertyNam
     return browser->removeproperty(m_npp, npObject, propertyName);
 }
 
-static void executeScript(NPP npp, const char* script)
+void PluginTest::executeScript(const char* script)
 {
     NPObject* windowScriptObject;
-    browser->getvalue(npp, NPNVWindowNPObject, &windowScriptObject);
+    browser->getvalue(m_npp, NPNVWindowNPObject, &windowScriptObject);
 
     NPString npScript;
     npScript.UTF8Characters = script;
     npScript.UTF8Length = strlen(script);
 
     NPVariant browserResult;
-    browser->evaluate(npp, windowScriptObject, &npScript, &browserResult);
+    browser->evaluate(m_npp, windowScriptObject, &npScript, &browserResult);
     browser->releasevariantvalue(&browserResult);
 }
 
 void PluginTest::waitUntilDone()
 {
-    executeScript(m_npp, "layoutTestController.waitUntilDone()");
+    executeScript("layoutTestController.waitUntilDone()");
 }
 
 void PluginTest::notifyDone()
 {
-    executeScript(m_npp, "layoutTestController.notifyDone()");
+    executeScript("layoutTestController.notifyDone()");
 }
 
 void PluginTest::registerCreateTestFunction(const string& identifier, CreateTestFunction createTestFunction)
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
index 0497764..ae9bd82 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
@@ -68,6 +68,8 @@ public:
     NPObject* NPN_CreateObject(NPClass*);
     bool NPN_RemoveProperty(NPObject*, NPIdentifier propertyName);
     
+    void executeScript(const char*);
+
     template<typename TestClassTy> class Register {
     public:
         Register(const std::string& identifier)
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp
new file mode 100644
index 0000000..4b5d3e0
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "PluginTest.h"
+
+#include "PluginObject.h"
+
+using namespace std;
+
+// Executing JS after removing the plugin element from the document should not crash.
+
+class EvaluateJSAfterRemovingPluginElement : public PluginTest {
+public:
+    EvaluateJSAfterRemovingPluginElement(NPP, const string& identifier);
+
+private:
+    virtual NPError NPP_DestroyStream(NPStream*, NPReason);
+
+    bool m_didExecuteScript;
+};
+
+static PluginTest::Register<EvaluateJSAfterRemovingPluginElement> registrar("evaluate-js-after-removing-plugin-element");
+
+EvaluateJSAfterRemovingPluginElement::EvaluateJSAfterRemovingPluginElement(NPP npp, const string& identifier)
+    : PluginTest(npp, identifier)
+    , m_didExecuteScript(false)
+{
+    waitUntilDone();
+}
+
+NPError EvaluateJSAfterRemovingPluginElement::NPP_DestroyStream(NPStream*, NPReason)
+{
+    if (m_didExecuteScript)
+        return NPERR_NO_ERROR;
+    m_didExecuteScript = true;
+
+    executeScript("var plugin = document.getElementsByTagName('embed')[0]; plugin.parentElement.removeChild(plugin);");
+    executeScript("document.body.appendChild(document.createTextNode('Executing script after removing the plugin element from the document succeeded.'));");
+    notifyDone();
+
+    return NPERR_NO_ERROR;
+}
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
index 74042bc..6b943a0 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
@@ -375,6 +375,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\Tests\EvaluateJSAfterRemovingPluginElement.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp"
 				>
 			</File>
diff --git a/WebKitTools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro b/WebKitTools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
index b958025..1d460d7 100644
--- a/WebKitTools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
+++ b/WebKitTools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
@@ -29,6 +29,7 @@ SOURCES = PluginObject.cpp \
           PluginTest.cpp \
           TestObject.cpp \
           Tests/DocumentOpenInDestroyStream.cpp \
+          Tests/EvaluateJSAfterRemovingPluginElement.cpp \
           Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \
           Tests/NPRuntimeRemoveProperty.cpp \
           Tests/NullNPPGetValuePointer.cpp \
diff --git a/WebKitTools/GNUmakefile.am b/WebKitTools/GNUmakefile.am
index 2700869..d20b3b5 100644
--- a/WebKitTools/GNUmakefile.am
+++ b/WebKitTools/GNUmakefile.am
@@ -167,6 +167,7 @@ TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
 	WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h \
 	WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp \
 	WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp \
+	WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \
 	WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \
 	WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \
 	WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp \

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list