[Cocoa] WKRemoteObjectCoder doesn’t handle NSRange
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Aug 2016 20:19:51 +0000 (20:19 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Aug 2016 20:19:51 +0000 (20:19 +0000)
commitc6435d5624c7389c620106f80c08eb88a5f8f79a
treec95ff51e9c7bf162d3e7e9a9ec20faf48e6d813c
parentd579d9a346b4f9326ded99dfbd1c53f5c79b4afd
[Cocoa] WKRemoteObjectCoder doesn’t handle NSRange
https://bugs.webkit.org/show_bug.cgi?id=160589

Reviewed by Tim Horton.

Source/WebKit2:

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments): Encode NSRange by wrapping in an NSValue.
(decodeInvocationArguments): Decode wrapped NSRange.

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.h:
(remoteObjectInterface): Fixed a mistake in the set of allowed classes in one of the reply
  blocks, which wasn’t caught because the test wasn’t run correctly.
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:
(TEST): Fixed the -selectionAndClickInformationForClickAtPoint:completionHandler: test, and
  added a test that sends over an NSRange.
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm:
(-[RemoteObjectRegistryPlugIn takeRange:completionHandler:]): Added. Calls the completion
  handler with the range‘s location and length.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.h
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm