plugins/netscape-plugin-setwindow-size*.html and plugins/pass-different-npp-struct...
authorjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Mar 2013 00:20:08 +0000 (00:20 +0000)
committerjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Mar 2013 00:20:08 +0000 (00:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=112478

Reviewed by Tony Chang.

There is nothing that ensures that the log messages from the plugin
come in before the layout test finished loading.

Tools:

* DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
(PassDifferentNPPStruct::NPP_SetWindow):
* DumpRenderTree/TestNetscapePlugIn/main.cpp:
(NPP_SetWindow):

LayoutTests:

* platform/mac-wk2/plugins/netscape-plugin-setwindow-size-2-expected.txt: Removed.
* plugins/netscape-plugin-setwindow-size-2.html:
* plugins/netscape-plugin-setwindow-size.html:
* plugins/pass-different-npp-struct.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/plugins/netscape-plugin-setwindow-size-2-expected.txt [deleted file]
LayoutTests/plugins/netscape-plugin-setwindow-size-2.html
LayoutTests/plugins/netscape-plugin-setwindow-size.html
LayoutTests/plugins/pass-different-npp-struct.html
Tools/ChangeLog
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp
Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp

index 5706984..381909f 100644 (file)
@@ -1,3 +1,18 @@
+2013-03-15  Jochen Eisinger  <jochen@chromium.org>
+
+        plugins/netscape-plugin-setwindow-size*.html and plugins/pass-different-npp-struct.html should be async
+        https://bugs.webkit.org/show_bug.cgi?id=112478
+
+        Reviewed by Tony Chang.
+
+        There is nothing that ensures that the log messages from the plugin
+        come in before the layout test finished loading.
+
+        * platform/mac-wk2/plugins/netscape-plugin-setwindow-size-2-expected.txt: Removed.
+        * plugins/netscape-plugin-setwindow-size-2.html:
+        * plugins/netscape-plugin-setwindow-size.html:
+        * plugins/pass-different-npp-struct.html:
+
 2013-03-15  Simon Fraser  <simon.fraser@apple.com>
 
         Mark some more sputnik tests as slow in debug.
diff --git a/LayoutTests/platform/mac-wk2/plugins/netscape-plugin-setwindow-size-2-expected.txt b/LayoutTests/platform/mac-wk2/plugins/netscape-plugin-setwindow-size-2-expected.txt
deleted file mode 100644 (file)
index 0f93a7b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This tests that a hidden plug-in gets a correct NPP_SetWindow the first time.
index 140619a..180349b 100644 (file)
@@ -3,6 +3,7 @@
 <script>
     if (window.testRunner) {
         testRunner.dumpAsText();
+        testRunner.waitUntilDone();
         testRunner.setWindowIsKey(false);
     }
     
index 9d40205..62bccbf 100644 (file)
@@ -1,8 +1,10 @@
 <html>
 <head>
 <script>
-    if (window.testRunner)
+    if (window.testRunner) {
         testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
 </script>
 <body style="margin:0px;overflow:hidden">
 <embed id="testPlugin" type="application/x-webkit-test-netscape" logfirstsetwindow="true" width="100%" height="200"></embed>
index 1b8de35..6fafdad 100644 (file)
@@ -1,5 +1,12 @@
 <html>
 <head>
+<script>
+  if (window.testRunner) {
+      testRunner.dumpAsText();
+      testRunner.waitUntilDone();
+  }
+</script>
+</head>
 <body>
 <embed id="testPlugin" 
        type="application/x-webkit-test-netscape"
 <div>
     This tests that no assertions fire when a plugin passes a different NPP struct to one of the NPN* functions (specifically, NPN_GetValue).
 </div>
-<script>
-  if (window.testRunner)
-      testRunner.dumpAsText();
-</script>
 </body>
 </html>
 
index b448064..9a14f03 100644 (file)
@@ -1,3 +1,18 @@
+2013-03-15  Jochen Eisinger  <jochen@chromium.org>
+
+        plugins/netscape-plugin-setwindow-size*.html and plugins/pass-different-npp-struct.html should be async
+        https://bugs.webkit.org/show_bug.cgi?id=112478
+
+        Reviewed by Tony Chang.
+
+        There is nothing that ensures that the log messages from the plugin
+        come in before the layout test finished loading.
+
+        * DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
+        (PassDifferentNPPStruct::NPP_SetWindow):
+        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+        (NPP_SetWindow):
+
 2013-03-15  Simon Fraser  <simon.fraser@apple.com>
 
         Have the mac port support per_test_timeout in webkitpy
index c9af49c..d78a29b 100644 (file)
@@ -58,9 +58,11 @@ private:
 
         if (error != NPERR_NO_ERROR) {
             log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct failed with error %d", error);
+            notifyDone();
             return NPERR_GENERIC_ERROR;
         }
         log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct succeeded");
+        notifyDone();
         return NPERR_NO_ERROR;
     }
 
index 97a4cf3..256acc0 100644 (file)
@@ -351,6 +351,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window)
         if (obj->logSetWindow) {
             pluginLog(instance, "NPP_SetWindow: %d %d", (int)window->width, (int)window->height);
             obj->logSetWindow = FALSE;
+            executeScript(obj, "testRunner.notifyDone();");
         }
 
         if (obj->onSetWindow)