Changeset 101953 in webkit
- Timestamp:
- Dec 4, 2011 3:56:22 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r101951 r101953 1 2011-12-04 Alexandre Mazari <scaroo@gmail.com> 2 3 Add missing methods used by fast/notifications tests to LayoutTestController 4 https://bugs.webkit.org/show_bug.cgi?id=63616 5 6 Reviewed by Martin Robinson. 7 8 Add missing simulateDesktopNotificationClick method used by 9 fast/notifications. Provide a default implementation for 10 areDesktopNotificationPermissionRequestsIgnored and 11 ignoreDesktopNotificationPermissionRequests. 12 13 * DumpRenderTree/LayoutTestController.cpp: 14 (LayoutTestController::LayoutTestController): call into the port implementation. 15 (simulateDesktopNotificationClickCallback): ditto. 16 (ignoreDesktopNotificationPermissionRequestsCallback): default implementation. 17 (LayoutTestController::staticFunctions): declare new methods. 18 (LayoutTestController::ignoreDesktopNotificationPermissionRequests): default implementation. 19 * DumpRenderTree/LayoutTestController.h: 20 (LayoutTestController::areDesktopNotificationPermissionRequestsIgnored): 21 * DumpRenderTree/efl/LayoutTestControllerEfl.cpp: 22 (LayoutTestController::simulateDesktopNotificationClick): dummy implementation. 23 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 24 (LayoutTestController::simulateDesktopNotificationClick): ditto. 25 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 26 (LayoutTestController::simulateDesktopNotificationClick): ditto. 27 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 28 (LayoutTestController::simulateDesktopNotificationClick): ditto. 29 * DumpRenderTree/wx/LayoutTestControllerWx.cpp: 30 (LayoutTestController::simulateDesktopNotificationClick): ditto. 31 1 32 2011-12-03 Mario Sanchez Prada <msanchez@igalia.com> 2 33 -
trunk/Tools/DumpRenderTree/LayoutTestController.cpp
r97407 r101953 93 93 , m_testPathOrURL(testPathOrURL) 94 94 , m_expectedPixelHash(expectedPixelHash) 95 , m_areDesktopNotificationPermissionRequestsIgnored(false) 95 96 { 96 97 } … … 2243 2244 controller->setGlobalFlag(JSValueToBoolean(context, value)); 2244 2245 return true; 2246 } 2247 2248 static JSValueRef ignoreDesktopNotificationPermissionRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 2249 { 2250 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 2251 controller->ignoreDesktopNotificationPermissionRequests(); 2252 return JSValueMakeUndefined(context); 2253 } 2254 2255 static JSValueRef simulateDesktopNotificationClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 2256 { 2257 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 2258 JSRetainPtr<JSStringRef> title(Adopt, JSValueToStringCopy(context, arguments[0], exception)); 2259 controller->simulateDesktopNotificationClick(title.get()); 2260 return JSValueMakeUndefined(context); 2245 2261 } 2246 2262 … … 2374 2390 { "hasSpellingMarker", hasSpellingMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2375 2391 { "hasGrammarMarker", hasGrammarMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2392 { "ignoreDesktopNotificationPermissionRequests", ignoreDesktopNotificationPermissionRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2376 2393 { "isCommandEnabled", isCommandEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2377 2394 { "isPageBoxVisible", isPageBoxVisibleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 2465 2482 { "setAsynchronousSpellCheckingEnabled", setAsynchronousSpellCheckingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2466 2483 { "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2484 { "simulateDesktopNotificationClick", simulateDesktopNotificationClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2467 2485 { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2468 2486 { "testRepaint", testRepaintCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 2545 2563 } 2546 2564 2565 void LayoutTestController::ignoreDesktopNotificationPermissionRequests() 2566 { 2567 m_areDesktopNotificationPermissionRequestsIgnored = false; 2568 } 2569 2547 2570 void LayoutTestController::waitToDumpWatchdogTimerFired() 2548 2571 { -
trunk/Tools/DumpRenderTree/LayoutTestController.h
r97407 r101953 142 142 void grantDesktopNotificationPermission(JSStringRef origin); 143 143 bool checkDesktopNotificationPermission(JSStringRef origin); 144 void ignoreDesktopNotificationPermissionRequests(); 145 bool areDesktopNotificationPermissionRequestsIgnored() const { return m_areDesktopNotificationPermissionRequestsIgnored; } 146 void simulateDesktopNotificationClick(JSStringRef title); 144 147 145 148 bool elementDoesAutoCompleteForElementWithId(JSStringRef id); … … 414 417 bool m_shouldPaintBrokenImage; 415 418 bool m_shouldStayOnPageAfterHandlingBeforeUnload; 419 bool m_areDesktopNotificationPermissionRequestsIgnored; 416 420 417 421 std::string m_authenticationUsername; -
trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
r100915 r101953 780 780 notImplemented(); 781 781 } 782 783 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title) 784 { 785 } -
trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r101931 r101953 1033 1033 { 1034 1034 } 1035 1036 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title) 1037 { 1038 } -
trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r99366 r101953 1237 1237 [[mainFrame webView] _setCustomBackingScaleFactor:backingScaleFactor]; 1238 1238 } 1239 1240 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title) 1241 { 1242 // FIXME: Implement. 1243 } -
trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r97407 r101953 1557 1557 { 1558 1558 } 1559 1560 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title) 1561 { 1562 // FIXME: Implement. 1563 } -
trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r99811 r101953 662 662 { 663 663 } 664 665 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title) 666 { 667 // FIXME: Implement. 668 }
Note: See TracChangeset
for help on using the changeset viewer.