Title: [99300] trunk
Revision
99300
Author
[email protected]
Date
2011-11-04 11:12:58 -0700 (Fri, 04 Nov 2011)

Log Message

NPN_ConvertPoint plug-in test should be called from NPP_SetWindow
https://bugs.webkit.org/show_bug.cgi?id=71570

Reviewed by Simon Fraser.

Tools:

* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::NPP_SetWindow):
* DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
Remove the NPP parameter from NPP_SetWindow.

* DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp:
(NPPSetWindowCalledDuringDestruction::NPP_SetWindow):
Remove the NPP parameter from NPP_SetWindow.

* DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
(PassDifferentNPPStruct::NPP_SetWindow):
Remove the NPP parameter from NPP_SetWindow and use PluginTest::log for logging.

* DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp:
(ConvertPoint::NPP_SetWindow):
Run the test from NPP_SetWindow and call notifyDone() when done.

* DumpRenderTree/TestNetscapePlugIn/main.cpp:
(NPP_SetWindow):
Remove unnecessary parameter.

LayoutTests:

Add a call to layoutTestController.waitUntilDone(); the plug-in will call notifyDone() when it's done.
* platform/mac/plugins/convert-point.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (99299 => 99300)


--- trunk/LayoutTests/ChangeLog	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/LayoutTests/ChangeLog	2011-11-04 18:12:58 UTC (rev 99300)
@@ -1,3 +1,13 @@
+2011-11-04  Anders Carlsson  <[email protected]>
+
+        NPN_ConvertPoint plug-in test should be called from NPP_SetWindow
+        https://bugs.webkit.org/show_bug.cgi?id=71570
+
+        Reviewed by Simon Fraser.
+
+        Add a call to layoutTestController.waitUntilDone(); the plug-in will call notifyDone() when it's done.
+        * platform/mac/plugins/convert-point.html:
+
 2011-11-04  Adam Barth  <[email protected]>
 
         Anonymous CORS fetch for WebGL texture fails when there is no appropriate server response even for the same origin requests

Modified: trunk/LayoutTests/platform/mac/plugins/convert-point.html (99299 => 99300)


--- trunk/LayoutTests/platform/mac/plugins/convert-point.html	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/LayoutTests/platform/mac/plugins/convert-point.html	2011-11-04 18:12:58 UTC (rev 99300)
@@ -1,6 +1,8 @@
 <script>
-if (window.layoutTestController)
+if (window.layoutTestController) {
     layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
 </script>
 
 <embed id="testPlugin" 

Modified: trunk/Tools/ChangeLog (99299 => 99300)


--- trunk/Tools/ChangeLog	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/Tools/ChangeLog	2011-11-04 18:12:58 UTC (rev 99300)
@@ -1,3 +1,31 @@
+2011-11-04  Anders Carlsson  <[email protected]>
+
+        NPN_ConvertPoint plug-in test should be called from NPP_SetWindow
+        https://bugs.webkit.org/show_bug.cgi?id=71570
+
+        Reviewed by Simon Fraser.
+
+        * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
+        (PluginTest::NPP_SetWindow):
+        * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
+        Remove the NPP parameter from NPP_SetWindow.
+
+        * DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp:
+        (NPPSetWindowCalledDuringDestruction::NPP_SetWindow):
+        Remove the NPP parameter from NPP_SetWindow.
+
+        * DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
+        (PassDifferentNPPStruct::NPP_SetWindow):
+        Remove the NPP parameter from NPP_SetWindow and use PluginTest::log for logging.
+
+        * DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp:
+        (ConvertPoint::NPP_SetWindow):
+        Run the test from NPP_SetWindow and call notifyDone() when done.
+
+        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+        (NPP_SetWindow):
+        Remove unnecessary parameter.
+
 2011-11-04  Simon Hausmann  <[email protected]>
 
         [Qt] Fix run-qtwebkit-tests execution on the build bot(s).

Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp (99299 => 99300)


--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp	2011-11-04 18:12:58 UTC (rev 99300)
@@ -92,7 +92,7 @@
     return NPERR_NO_ERROR;
 }
 
-NPError PluginTest::NPP_SetWindow(NPP, NPWindow*)
+NPError PluginTest::NPP_SetWindow(NPWindow*)
 {
     return NPERR_NO_ERROR;
 }

Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h (99299 => 99300)


--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h	2011-11-04 18:12:58 UTC (rev 99300)
@@ -60,7 +60,7 @@
     // NPP functions.
     virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved);
     virtual NPError NPP_Destroy(NPSavedData**);
-    virtual NPError NPP_SetWindow(NPP, NPWindow*);
+    virtual NPError NPP_SetWindow(NPWindow*);
     virtual NPError NPP_NewStream(NPMIMEType, NPStream*, NPBool seekable, uint16_t* stype);
     virtual NPError NPP_DestroyStream(NPStream*, NPReason);
     virtual int32_t NPP_WriteReady(NPStream*);

Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp (99299 => 99300)


--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp	2011-11-04 18:12:58 UTC (rev 99300)
@@ -44,7 +44,7 @@
     };
 
     virtual NPError NPP_GetValue(NPPVariable, void*);
-    virtual NPError NPP_SetWindow(NPP, NPWindow*);
+    virtual NPError NPP_SetWindow(NPWindow*);
     virtual NPError NPP_Destroy(NPSavedData**);
 
     bool m_willBeDestroyed;
@@ -72,7 +72,7 @@
     return NPERR_NO_ERROR;
 }
 
-NPError NPPSetWindowCalledDuringDestruction::NPP_SetWindow(NPP, NPWindow* window)
+NPError NPPSetWindowCalledDuringDestruction::NPP_SetWindow(NPWindow* window)
 {
     if (m_willBeDestroyed) {
         m_setWindowCalledDuringDestruction = true;

Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp (99299 => 99300)


--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp	2011-11-04 18:12:58 UTC (rev 99300)
@@ -41,7 +41,7 @@
     }
 
 private:
-    virtual NPError NPP_SetWindow(NPP instance, NPWindow* window)
+    virtual NPError NPP_SetWindow(NPWindow* window)
     {
         if (m_didReceiveInitialSetWindowCall)
             return NPERR_NO_ERROR;
@@ -57,10 +57,10 @@
         m_npp = oldNPP;
 
         if (error != NPERR_NO_ERROR) {
-            pluginLog(instance, "NPN_GetValue(NPNVprivateModeBool) with a different NPP struct failed with error %d", error);
+            log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct failed with error %d", error);
             return NPERR_GENERIC_ERROR;
         }
-        pluginLog(instance, "NPN_GetValue(NPNVprivateModeBool) with a different NPP struct succeeded");
+        log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct succeeded");
         return NPERR_NO_ERROR;
     }
 

Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp (99299 => 99300)


--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp	2011-11-04 18:12:58 UTC (rev 99300)
@@ -69,13 +69,14 @@
         return true;
     }
 private:
-    virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)
+    virtual NPError NPP_SetWindow(NPWindow*)
     {
         if (testConvert())
             executeScript("document.getElementById('result').innerHTML = 'SUCCESS!'");
 
+        notifyDone();
         return NPERR_NO_ERROR;
-    }        
+    }
 };
 
 static PluginTest::Register<ConvertPoint> convertPoint("convert-point");

Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp (99299 => 99300)


--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp	2011-11-04 18:11:47 UTC (rev 99299)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp	2011-11-04 18:12:58 UTC (rev 99300)
@@ -356,7 +356,7 @@
         }
     }
     
-    return obj->pluginTest->NPP_SetWindow(instance, window);
+    return obj->pluginTest->NPP_SetWindow(window);
 }
 
 static void executeScript(const PluginObject* obj, const char* script)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to