LayoutTests:
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Dec 2006 19:56:27 +0000 (19:56 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Dec 2006 19:56:27 +0000 (19:56 +0000)
        Reviewed by Eric Seidel.

        Fixed regression in plugins/netscape-dom-access.html.

        When I stopped WebKit from meddling in plug-in lifetime, plug-ins started
        to live a little longer. In this case, the plug-in from mouse-events.html
        started to live long enough to get a blur event when DumpRenderTree navigated
        to the next page.

        * plugins/mouse-events.html: Stop logging events when the test is over,
        so our results don't bleed into the next test. A better solution might
        be for the event logger inside DRT to check for whether you're still in
        the document, but that doesn't seem worth the effort right now.

WebKitTools:

        Reviewed by Eric Seidel. Prose edited by Mitz Pettel.

        Some cleanup I did while debugging the regression in plugins/netscape-dom-access.html.

        No behavior change. Layout tests pass.

        * DumpRenderTree/DumpRenderTree.h: Exported the done BOOL in place of the
        doneLoading() accessor function. This matches the rest of DRT's exports and
        makes it easier to search for clients who check (!done).

        * DumpRenderTree/DumpRenderTree.m: Moved fflush() call to runTest() so
        it would cover both code paths for calling runTest().

        (dumpRenderTree): "doneLoading()" => "done"
        (dump): ditto
        * DumpRenderTree/EditingDelegate.m: ditto
        (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]): ditto
        (-[EditingDelegate webView:shouldEndEditingInDOMRange:]): ditto
        (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]): ditto
        (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]): ditto
        (-[EditingDelegate webView:shouldDeleteDOMRange:]): ditto
        (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]): ditto
        (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]): ditto
        (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]): ditto
        (-[EditingDelegate webViewDidBeginEditing:]): ditto
        (-[EditingDelegate webViewDidChange:]): ditto
        (-[EditingDelegate webViewDidEndEditing:]): ditto
        (-[EditingDelegate webViewDidChangeTypingStyle:]): ditto
        (-[EditingDelegate webViewDidChangeSelection:]): ditto
        * DumpRenderTree/UIDelegate.m: ditto
        (-[UIDelegate webView:runJavaScriptAlertPanelWithMessage:]): ditto

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

LayoutTests/ChangeLog
LayoutTests/plugins/mouse-events.html
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.h
WebKitTools/DumpRenderTree/DumpRenderTree.m
WebKitTools/DumpRenderTree/EditingDelegate.m
WebKitTools/DumpRenderTree/UIDelegate.m

index ec7bade..b2b6c00 100644 (file)
@@ -1,3 +1,19 @@
+2006-12-27  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Eric Seidel.
+
+        Fixed regression in plugins/netscape-dom-access.html. 
+        
+        When I stopped WebKit from meddling in plug-in lifetime, plug-ins started 
+        to live a little longer. In this case, the plug-in from mouse-events.html 
+        started to live long enough to get a blur event when DumpRenderTree navigated 
+        to the next page.
+        
+        * plugins/mouse-events.html: Stop logging events when the test is over,
+        so our results don't bleed into the next test. A better solution might
+        be for the event logger inside DRT to check for whether you're still in
+        the document, but that doesn't seem worth the effort right now.
+
 2006-12-27  Eric Seidel  <eric@webkit.org>
 
         Rubber-stamped by ggaren.
index a7c1ee6..d61ce0c 100644 (file)
@@ -24,6 +24,8 @@ Flash clicks/interactivity not working properly.</p>
     eventSender.mouseUp();
     eventSender.mouseMoveTo(0,0);
 
+    plg.eventLoggingEnabled = false; // stop logging so our output doesn't bleed into the next test
+
 </script>
 </body>
 </html>
index a50e6bd..9387d76 100644 (file)
@@ -1,3 +1,37 @@
+2006-12-27  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Eric Seidel. Prose edited by Mitz Pettel.
+
+        Some cleanup I did while debugging the regression in plugins/netscape-dom-access.html.
+        
+        No behavior change. Layout tests pass.
+
+        * DumpRenderTree/DumpRenderTree.h: Exported the done BOOL in place of the
+        doneLoading() accessor function. This matches the rest of DRT's exports and 
+        makes it easier to search for clients who check (!done).
+
+        * DumpRenderTree/DumpRenderTree.m: Moved fflush() call to runTest() so
+        it would cover both code paths for calling runTest().
+
+        (dumpRenderTree): "doneLoading()" => "done"
+        (dump): ditto
+        * DumpRenderTree/EditingDelegate.m: ditto
+        (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]): ditto
+        (-[EditingDelegate webView:shouldEndEditingInDOMRange:]): ditto
+        (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]): ditto
+        (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]): ditto
+        (-[EditingDelegate webView:shouldDeleteDOMRange:]): ditto
+        (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]): ditto
+        (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]): ditto
+        (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]): ditto
+        (-[EditingDelegate webViewDidBeginEditing:]): ditto
+        (-[EditingDelegate webViewDidChange:]): ditto
+        (-[EditingDelegate webViewDidEndEditing:]): ditto
+        (-[EditingDelegate webViewDidChangeTypingStyle:]): ditto
+        (-[EditingDelegate webViewDidChangeSelection:]): ditto
+        * DumpRenderTree/UIDelegate.m: ditto
+        (-[UIDelegate webView:runJavaScriptAlertPanelWithMessage:]): ditto
+
 2006-12-26  Eric Seidel  <eric@webkit.org>
 
         Reviewed by bradee-oh.
index 92551f1..fc9a8dc 100644 (file)
@@ -32,5 +32,4 @@
 extern BOOL windowIsKey;
 extern WebFrame *frame;
 extern DumpRenderTreeDraggingInfo *draggingInfo;
-
-BOOL doneLoading(void);
+extern volatile BOOL done;
index 0419d22..a62a4f3 100644 (file)
@@ -96,7 +96,7 @@ BOOL shouldDumpEditingCallbacks;
 static void runTest(const char *pathOrURL);
 static NSString *md5HashStringForBitmap(CGImageRef bitmap);
 
-static volatile BOOL done;
+volatile BOOL done;
 static NavigationController *navigationController;
 
 // Deciding when it's OK to dump out the state is a bit tricky.  All these must be true:
@@ -185,11 +185,6 @@ static void stopJavaScriptThread(void)
     javaScriptThread = NULL;
 }
 
-BOOL doneLoading(void)
-{
-    return done;
-}
-
 static CMProfileRef currentColorProfile = 0;
 static void restoreColorSpace(int ignored)
 {
@@ -410,7 +405,6 @@ void dumpRenderTree(int argc, const char *argv[])
                 continue;
                 
             runTest(filenameBuffer);
-            fflush(stdout);
         }
     } else {
         printSeparators = (optind < argc-1 || (dumpPixels && dumpTree));
@@ -651,6 +645,7 @@ static void dump(void)
 
         printf("#EOF\n");
     }
+    fflush(stdout);
 
     done = YES;
 }
index c0d670d..c5f4737 100644 (file)
@@ -74,14 +74,14 @@ extern BOOL shouldDumpEditingCallbacks;
 
 - (BOOL)webView:(WebView *)webView shouldBeginEditingInDOMRange:(DOMRange *)range
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", [[range dump] UTF8String]);
     return acceptsEditing;
 }
 
 - (BOOL)webView:(WebView *)webView shouldEndEditingInDOMRange:(DOMRange *)range
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n", [[range dump] UTF8String]);
     return acceptsEditing;
 }
@@ -94,7 +94,7 @@ extern BOOL shouldDumpEditingCallbacks;
         "WebViewInsertActionDropped",
     };
 
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n", [[node dumpPath] UTF8String], [[range dump] UTF8String], insertactionstring[action]);
     return acceptsEditing;
 }
@@ -107,14 +107,14 @@ extern BOOL shouldDumpEditingCallbacks;
         "WebViewInsertActionDropped",
     };
 
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n", [[text description] UTF8String], [[range dump] UTF8String], insertactionstring[action]);
     return acceptsEditing;
 }
 
 - (BOOL)webView:(WebView *)webView shouldDeleteDOMRange:(DOMRange *)range
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldDeleteDOMRange:%s\n", [[range dump] UTF8String]);
     return acceptsEditing;
 }
@@ -130,52 +130,52 @@ extern BOOL shouldDumpEditingCallbacks;
         "TRUE"
     };
 
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n", [[currentRange dump] UTF8String], [[proposedRange dump] UTF8String], affinitystring[selectionAffinity], boolstring[flag]);
     return acceptsEditing;
 }
 
 - (BOOL)webView:(WebView *)webView shouldApplyStyle:(DOMCSSStyleDeclaration *)style toElementsInDOMRange:(DOMRange *)range
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n", [[style description] UTF8String], [[range dump] UTF8String]);
     return acceptsEditing;
 }
 
 - (BOOL)webView:(WebView *)webView shouldChangeTypingStyle:(DOMCSSStyleDeclaration *)currentStyle toStyle:(DOMCSSStyleDeclaration *)proposedStyle
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n", [[currentStyle description] UTF8String], [[proposedStyle description] UTF8String]);
     return acceptsEditing;
 }
 
 - (void)webViewDidBeginEditing:(NSNotification *)notification
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: webViewDidBeginEditing:%s\n", [[notification name] UTF8String]);
 }
 
 - (void)webViewDidChange:(NSNotification *)notification
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: webViewDidChange:%s\n", [[notification name] UTF8String]);
 }
 
 - (void)webViewDidEndEditing:(NSNotification *)notification
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: webViewDidEndEditing:%s\n", [[notification name] UTF8String]);
 }
 
 - (void)webViewDidChangeTypingStyle:(NSNotification *)notification
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n", [[notification name] UTF8String]);
 }
 
 - (void)webViewDidChangeSelection:(NSNotification *)notification
 {
-    if (shouldDumpEditingCallbacks && !doneLoading())
+    if (shouldDumpEditingCallbacks && !done)
         printf("EDITING DELEGATE: webViewDidChangeSelection:%s\n", [[notification name] UTF8String]);
 }
 
index ea5476f..f946da1 100644 (file)
@@ -41,7 +41,7 @@ DumpRenderTreeDraggingInfo *draggingInfo = nil;
 
 - (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message
 {
-    if (!doneLoading())
+    if (!done)
         printf("ALERT: %s\n", [message UTF8String]);
 }