[Cocoa] Use more bridging casts in TestWebKitAPI
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Sep 2018 04:24:33 +0000 (04:24 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Sep 2018 04:24:33 +0000 (04:24 +0000)
commit80afa469a44970b95e817e2d4b9ae958b19854e7
tree8c249e5f4ce4d6fed6067fd841612050f4813779
parentdc2b34833d05ce0c30a318ce94f3a0e53f5a350d
[Cocoa] Use more bridging casts in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=189457

Reviewed by Darin Adler.

Adds some bridging casts to TestWebKitAPI, when converting betweeen several common types of objects, including:
CFStringRef <=> NSString
CFURLRef <=> NSURL
WKPreferences <=> WKPreferencesRef
CFDataRef <=> NSData

* TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
(readHTMLFromPasteboard):
(createWebViewWithCustomPasteboardDataEnabled):
* TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
(createWebViewWithCustomPasteboardDataEnabled):
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
(writeHTMLToPasteboard):
(createWebViewWithCustomPasteboardDataSetting):
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
(TestWebKitAPI::setUpWebView):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:
(writeRTFToPasteboard):
(writeRTFDToPasteboard):
(createWebViewWithCustomPasteboardDataEnabled):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(createWebViewWithCustomPasteboardDataEnabled):
* TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(webViewForTestingAttachments):
* TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:
(writeRTFDToPasteboard):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(checkRichTextTypePrecedesPlainTextType):
(TestWebKitAPI::TEST):
(TestWebKitAPI::setUpTestWebViewForDataTransferItems):
* TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
(TestWebKitAPI::Util::URLForNonExistentResource):
(TestWebKitAPI::Util::MIMETypeForWKURLResponse):
* TestWebKitAPI/mac/WebKitAgnosticTest.mm:
(TestWebKitAPI::WebKitAgnosticTest::loadURL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm
Tools/TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm
Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm
Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm
Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm
Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm
Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm