Title: [99762] trunk
Revision
99762
Author
commit-qu...@webkit.org
Date
2011-11-09 14:43:05 -0800 (Wed, 09 Nov 2011)

Log Message

Implement dumpProgressFinishedCallback() for Mac layoutTestController
https://bugs.webkit.org/show_bug.cgi?id=66772

Patch by Benjamin Poulain <bpoul...@apple.com> on 2011-11-09
Reviewed by Simon Fraser.

Tools:

When dumpProgressFinishedCallback is enabled, DumpRenderTree should output
"postProgressFinishedNotification" on FrameLoaderClient::postProgressFinishedNotification().

On Mac, the FrameLoaderClient post a notification. This patch add handling for this notification
in the FrameLoadDelegate and print the output in response to the notification.

* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate init]):
(-[FrameLoadDelegate dealloc]):
(-[FrameLoadDelegate webViewProgressFinishedNotification:]):

LayoutTests:

Unskip the skipped test.

* platform/mac/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (99761 => 99762)


--- trunk/LayoutTests/ChangeLog	2011-11-09 22:29:29 UTC (rev 99761)
+++ trunk/LayoutTests/ChangeLog	2011-11-09 22:43:05 UTC (rev 99762)
@@ -1,3 +1,14 @@
+2011-11-09  Benjamin Poulain  <bpoul...@apple.com>
+
+        Implement dumpProgressFinishedCallback() for Mac layoutTestController
+        https://bugs.webkit.org/show_bug.cgi?id=66772
+
+        Reviewed by Simon Fraser.
+
+        Unskip the skipped test.
+
+        * platform/mac/Skipped:
+
 2011-11-09  Alexei Svitkine  <asvitk...@chromium.org>
 
         Chromium: Fix bad rubber-band overhang shadows being drawn in the presence of custom scrollbar css.

Modified: trunk/LayoutTests/platform/mac/Skipped (99761 => 99762)


--- trunk/LayoutTests/platform/mac/Skipped	2011-11-09 22:29:29 UTC (rev 99761)
+++ trunk/LayoutTests/platform/mac/Skipped	2011-11-09 22:43:05 UTC (rev 99762)
@@ -453,9 +453,6 @@
 # Makes subsequent test crash
 fast/loader/document-destruction-within-unload.html
 
-# https://bugs.webkit.org/show_bug.cgi?id=66772
-http/tests/loading/progress-finished-callback.html
-
 # https://bugs.webkit.org/show_bug.cgi?id=67716
 media/media-controls-invalid-url.html
 

Modified: trunk/Tools/ChangeLog (99761 => 99762)


--- trunk/Tools/ChangeLog	2011-11-09 22:29:29 UTC (rev 99761)
+++ trunk/Tools/ChangeLog	2011-11-09 22:43:05 UTC (rev 99762)
@@ -1,3 +1,21 @@
+2011-11-09  Benjamin Poulain  <bpoul...@apple.com>
+
+        Implement dumpProgressFinishedCallback() for Mac layoutTestController
+        https://bugs.webkit.org/show_bug.cgi?id=66772
+
+        Reviewed by Simon Fraser.
+
+        When dumpProgressFinishedCallback is enabled, DumpRenderTree should output
+        "postProgressFinishedNotification" on FrameLoaderClient::postProgressFinishedNotification().
+
+        On Mac, the FrameLoaderClient post a notification. This patch add handling for this notification
+        in the FrameLoadDelegate and print the output in response to the notification.
+
+        * DumpRenderTree/mac/FrameLoadDelegate.mm:
+        (-[FrameLoadDelegate init]):
+        (-[FrameLoadDelegate dealloc]):
+        (-[FrameLoadDelegate webViewProgressFinishedNotification:]):
+
 2011-11-09  Philippe Normand  <pnorm...@igalia.com>
 
         [GTK][DRT] window internals object is not reset after each test

Modified: trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm (99761 => 99762)


--- trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm	2011-11-09 22:29:29 UTC (rev 99761)
+++ trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm	2011-11-09 22:43:05 UTC (rev 99762)
@@ -33,6 +33,7 @@
 #import "AccessibilityController.h"
 #import "AppleScriptController.h"
 #import "EventSendingController.h"
+#import "Foundation/NSNotification.h"
 #import "GCController.h"
 #import "LayoutTestController.h"
 #import "NavigationController.h"
@@ -106,12 +107,14 @@
     if ((self = [super init])) {
         gcController = new GCController;
         accessibilityController = new AccessibilityController;
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(webViewProgressFinishedNotification:) name:WebViewProgressFinishedNotification object:nil];
     }
     return self;
 }
 
 - (void)dealloc
 {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
     delete gcController;
     delete accessibilityController;
     [super dealloc];
@@ -411,4 +414,10 @@
         printf ("didDetectXSS\n");
 }
 
+- (void)webViewProgressFinishedNotification:(NSNotification *)notification
+{
+    if (!done && gLayoutTestController->dumpProgressFinishedCallback())
+        printf ("postProgressFinishedNotification\n");
+}
+
 @end
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to