[GTK] Build and run TestWebKitAPI WebKit2 unit tests
https://bugs.webkit.org/show_bug.cgi?id=84446
Reviewed by Philippe Normand.
Source/ThirdParty:
* gtest/GNUmakefile.am: Do not build libgtestmain anymmore since
all tests use now a custom main to make sure WTF threads are
initialized.
Source/WebKit2:
* UIProcess/API/C/WKNativeEvent.h: Define WKNativeEventPtr as
GdkEvent for the GTK+ port.
Tools:
* Scripts/run-gtk-tests:
(TestRunner): Add TestWebKitAPI/WebKit2 to the list of directories
containing tests. Unskip FunctionalTest.RefCountedStorage, since
we are now using a custom main that initializes WTF threading.
(TestRunner._setup_testing_environment): Set environment variables
required to run WebKit2 tests.
* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/JavaScriptTest.cpp: Use
JavaScriptCore/JSContextRef.h instead of
JavaScriptCore/JavaScriptCore.h since it includes JSStringRefCF.h
unconditionally.
* TestWebKitAPI/PlatformWebView.h: Define PlatformWKView and
PlatformWindow for GTK.
* TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp: Remove
unneded header that breaks the build of GTK port.
* TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp: Use
JavaScriptCore/JSContextRef.h instead of
JavaScriptCore/JavaScriptCore.h since it includes JSStringRefCF.h
unconditionally.
* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
(TestWebKitAPI::TEST): Add expected values for GTK+ port.
* TestWebKitAPI/gtk/InjectedBundleControllerGtk.cpp:
(TestWebKitAPI):
(TestWebKitAPI::InjectedBundleController::platformInitialize):
* TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp: Added.
(TestWebKitAPI::Util::checkTestFinished):
(TestWebKitAPI::Util::run):
(TestWebKitAPI::Util::sleep):
(TestWebKitAPI::Util::getFilenameFromEnvironmentVariableAsUTF8):
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
(TestWebKitAPI::Util::URLForNonExistentResource):
(TestWebKitAPI::Util::isKeyDown):
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp: Added.
(TestWebKitAPI::PlatformWebView::PlatformWebView):
(TestWebKitAPI::PlatformWebView::~PlatformWebView):
(TestWebKitAPI::PlatformWebView::page):
(TestWebKitAPI::PlatformWebView::resizeTo):
(TestWebKitAPI::doKeyStroke):
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
(TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
(TestWebKitAPI::doMouseButtonEvent):
(TestWebKitAPI::PlatformWebView::simulateRightClick):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
* TestWebKitAPI/gtk/main.cpp:
(main):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115314
268f45cc-cd09-0410-ab3c-
d52691b4dbfc