[WK2][macOS] Block access to Apple Events before launch.
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Apr 2017 19:53:49 +0000 (19:53 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Apr 2017 19:53:49 +0000 (19:53 +0000)
commitfbca53670e319050e3415677b0affbb84ed76659
treeef5c5fea167cadd226878d05b08b1e3a30600dc5
parenta2f9a56d5f3edb7639439625c9f2bbfc2ac99f7a
[WK2][macOS] Block access to Apple Events before launch.
https://bugs.webkit.org/show_bug.cgi?id=170626
<rdar://problem/16079334>

Reviewed by Alexey Proskuryakov.

Source/WebKit2:

Clear the environment of the AppleEvent server name before initializing
AppKit so we never bother connecting.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(main):

Tools:

Add a new TestWebKitAPI test that fails if Apple Events are sent.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
* TestWebKitAPI/Tests/WebKit2/mac/InjectedBundleAppleEvent.cpp: Added.
(TestWebKitAPI::didReceiveMessageFromInjectedBundle):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/mac/InjectedBundleAppleEvent_Bundle.cpp: Added.
(TestWebKitAPI::InjectedBundleAppleEventTest::InjectedBundleAppleEventTest):
(TestWebKitAPI::InjectedBundleAppleEventTest::didCreatePage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2/mac/InjectedBundleAppleEvent.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKit2/mac/InjectedBundleAppleEvent_Bundle.cpp [new file with mode: 0644]