Title: [127198] trunk
Revision
127198
Author
[email protected]
Date
2012-08-30 15:13:25 -0700 (Thu, 30 Aug 2012)

Log Message

Unreviewed, rolling out r127171.
http://trac.webkit.org/changeset/127171
https://bugs.webkit.org/show_bug.cgi?id=95505

testRunner does not need dumpWebNotificationCallbacks().
(Requested by jonlee on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-08-30

Source/WebKit/mac:

* WebKit.exp:

Tools:

* DumpRenderTree/TestRunner.cpp:
(TestRunner::TestRunner):
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner):
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider webView:didShowNotification:]):
(-[MockWebNotificationProvider webView:didClickNotification:]):
(-[MockWebNotificationProvider webView:didCloseNotifications:]):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:decidePolicyForNotificationRequestFromOrigin:listener:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (127197 => 127198)


--- trunk/Source/WebKit/mac/ChangeLog	2012-08-30 22:13:07 UTC (rev 127197)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-08-30 22:13:25 UTC (rev 127198)
@@ -1,3 +1,14 @@
+2012-08-30  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r127171.
+        http://trac.webkit.org/changeset/127171
+        https://bugs.webkit.org/show_bug.cgi?id=95505
+
+        testRunner does not need dumpWebNotificationCallbacks().
+        (Requested by jonlee on #webkit).
+
+        * WebKit.exp:
+
 2012-08-30  Pratik Solanki  <[email protected]>
 
         objc_msgSend and IMP should be cast appropriately before using

Modified: trunk/Source/WebKit/mac/WebKit.exp (127197 => 127198)


--- trunk/Source/WebKit/mac/WebKit.exp	2012-08-30 22:13:07 UTC (rev 127197)
+++ trunk/Source/WebKit/mac/WebKit.exp	2012-08-30 22:13:25 UTC (rev 127198)
@@ -25,7 +25,6 @@
 .objc_class_name_WebJavaScriptTextInputPanel
 .objc_class_name_WebKeyGenerator
 .objc_class_name_WebKitStatistics
-.objc_class_name_WebNotification
 .objc_class_name_WebPanelAuthenticationHandler
 .objc_class_name_WebPluginDatabase
 .objc_class_name_WebPreferences

Modified: trunk/Tools/ChangeLog (127197 => 127198)


--- trunk/Tools/ChangeLog	2012-08-30 22:13:07 UTC (rev 127197)
+++ trunk/Tools/ChangeLog	2012-08-30 22:13:25 UTC (rev 127198)
@@ -1,3 +1,24 @@
+2012-08-30  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r127171.
+        http://trac.webkit.org/changeset/127171
+        https://bugs.webkit.org/show_bug.cgi?id=95505
+
+        testRunner does not need dumpWebNotificationCallbacks().
+        (Requested by jonlee on #webkit).
+
+        * DumpRenderTree/TestRunner.cpp:
+        (TestRunner::TestRunner):
+        (TestRunner::staticFunctions):
+        * DumpRenderTree/TestRunner.h:
+        (TestRunner):
+        * DumpRenderTree/mac/MockWebNotificationProvider.mm:
+        (-[MockWebNotificationProvider webView:didShowNotification:]):
+        (-[MockWebNotificationProvider webView:didClickNotification:]):
+        (-[MockWebNotificationProvider webView:didCloseNotifications:]):
+        * DumpRenderTree/mac/UIDelegate.mm:
+        (-[UIDelegate webView:decidePolicyForNotificationRequestFromOrigin:listener:]):
+
 2012-08-30  Pratik Solanki  <[email protected]>
 
         objc_msgSend and IMP should be cast appropriately before using

Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (127197 => 127198)


--- trunk/Tools/DumpRenderTree/TestRunner.cpp	2012-08-30 22:13:07 UTC (rev 127197)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp	2012-08-30 22:13:25 UTC (rev 127198)
@@ -69,7 +69,6 @@
     , m_dumpIconChanges(false)
     , m_dumpVisitedLinksCallback(false)
     , m_dumpWillCacheResponse(false)
-    , m_dumpWebNotificationCallbacks(false)
     , m_generatePixelResults(true)
     , m_callCloseOnWebViews(true)
     , m_canOpenWindows(false)
@@ -259,13 +258,6 @@
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef dumpWebNotificationCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-    controller->setDumpWebNotificationCallbacks(true);
-    return JSValueMakeUndefined(context);
-}
-
 static JSValueRef pathToLocalResourceCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     if (argumentCount < 1)
@@ -2341,7 +2333,6 @@
         { "dumpTitleChanges", dumpTitleChangesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "dumpIconChanges", dumpIconChangesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "dumpWillCacheResponse", dumpWillCacheResponseCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "dumpWebNotificationCallbacks", dumpWebNotificationCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "elementDoesAutoCompleteForElementWithId", elementDoesAutoCompleteForElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "encodeHostName", encodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "evaluateInWebInspector", evaluateInWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },

Modified: trunk/Tools/DumpRenderTree/TestRunner.h (127197 => 127198)


--- trunk/Tools/DumpRenderTree/TestRunner.h	2012-08-30 22:13:07 UTC (rev 127197)
+++ trunk/Tools/DumpRenderTree/TestRunner.h	2012-08-30 22:13:25 UTC (rev 127198)
@@ -221,10 +221,7 @@
     
     bool dumpWillCacheResponse() const { return m_dumpWillCacheResponse; }
     void setDumpWillCacheResponse(bool dumpWillCacheResponse) { m_dumpWillCacheResponse = dumpWillCacheResponse; }
-
-    bool dumpWebNotificationCallbacks() const { return m_dumpWebNotificationCallbacks;}
-    void setDumpWebNotificationCallbacks(bool dumpWebNotificationCallbacks) { m_dumpWebNotificationCallbacks = dumpWebNotificationCallbacks; }
-
+    
     bool callCloseOnWebViews() const { return m_callCloseOnWebViews; }
     void setCallCloseOnWebViews(bool callCloseOnWebViews) { m_callCloseOnWebViews = callCloseOnWebViews; }
 
@@ -400,7 +397,6 @@
     bool m_dumpIconChanges;
     bool m_dumpVisitedLinksCallback;
     bool m_dumpWillCacheResponse;
-    bool m_dumpWebNotificationCallbacks;
     bool m_generatePixelResults;
     bool m_callCloseOnWebViews;
     bool m_canOpenWindows;

Modified: trunk/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm (127197 => 127198)


--- trunk/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm	2012-08-30 22:13:07 UTC (rev 127197)
+++ trunk/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm	2012-08-30 22:13:25 UTC (rev 127198)
@@ -26,25 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "config.h"
 #import "MockWebNotificationProvider.h"
-
-#import "DumpRenderTree.h"
-#import "TestRunner.h"
-#import <WebKit/WebNotification.h>
 #import <WebKit/WebSecurityOriginPrivate.h>
 
-@interface WebNotification (DRTExtras)
-- (NSString *)_drt_descriptionSuitableForTestResult;
-@end
-
-@implementation WebNotification (DRTExtras)
-- (NSString *)_drt_descriptionSuitableForTestResult
-{
-    return [NSString stringWithFormat:@"{title: \"%@\", body: \"%@\", tag: \"%@\", iconURL: %@}", [self title], [self body], [self tag], [self iconURL]];
-}
-@end
-
 @implementation MockWebNotificationProvider
 
 + (MockWebNotificationProvider *)shared
@@ -109,22 +93,12 @@
 
 - (void)webView:(WebView *)webView didShowNotification:(uint64_t)notificationID
 {
-    WebNotification *notification = _notifications.get(notificationID).get();
-    ASSERT(notification);
-
-    if (!done && gTestRunner->dumpWebNotificationCallbacks())
-        printf("SHOWED WEB NOTIFICATION %s\n", [[notification _drt_descriptionSuitableForTestResult] UTF8String]);
-    [notification dispatchShowEvent];
+    [_notifications.get(notificationID).get() dispatchShowEvent];
 }
 
 - (void)webView:(WebView *)webView didClickNotification:(uint64_t)notificationID
 {
-    WebNotification *notification = _notifications.get(notificationID).get();
-    ASSERT(notification);
-
-    if (!done && gTestRunner->dumpWebNotificationCallbacks())
-        printf("CLICKED WEB NOTIFICATION %s\n", [[notification _drt_descriptionSuitableForTestResult] UTF8String]);
-    [notification dispatchClickEvent];
+    [_notifications.get(notificationID).get() dispatchClickEvent];
 }
 
 - (void)webView:(WebView *)webView didCloseNotifications:(NSArray *)notificationIDs
@@ -133,12 +107,7 @@
         uint64_t id = [notificationID unsignedLongLongValue];
         NotificationIDMap::iterator it = _notifications.find(id);
         ASSERT(it != _notifications.end());
-
-        WebNotification *notification = it->second.get();
-        if (!done && gTestRunner->dumpWebNotificationCallbacks())
-            printf("CLOSED WEB NOTIFICATION %s\n", [[notification _drt_descriptionSuitableForTestResult] UTF8String]);
-
-        [notification dispatchCloseEvent];
+        [it->second.get() dispatchCloseEvent];
         _notifications.remove(it);
         _notificationViewMap.remove(id);
     }

Modified: trunk/Tools/DumpRenderTree/mac/UIDelegate.mm (127197 => 127198)


--- trunk/Tools/DumpRenderTree/mac/UIDelegate.mm	2012-08-30 22:13:07 UTC (rev 127197)
+++ trunk/Tools/DumpRenderTree/mac/UIDelegate.mm	2012-08-30 22:13:25 UTC (rev 127198)
@@ -291,8 +291,6 @@
 
 - (void)webView:(WebView *)webView decidePolicyForNotificationRequestFromOrigin:(WebSecurityOrigin *)origin listener:(id<WebAllowDenyPolicyListener>)listener
 {
-    if (!done && gTestRunner->dumpWebNotificationCallbacks())
-        printf("REQUESTED WEB NOTIFICATION PERMISSION FOR %s\n", [[origin stringValue] UTF8String]);
     [(MockWebNotificationProvider *)[webView _notificationProvider] setWebNotificationOrigin:[origin stringValue] permission:YES];
     [listener allow];
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to