[WPE] Add env var WPE_USE_HEADLESS_VIEW_BACKEND
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Nov 2017 09:47:56 +0000 (09:47 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Nov 2017 09:47:56 +0000 (09:47 +0000)
commit8365bd869be0190e0c70ad5637cfed471677d943
tree418dc205efa47319428aa45a9723e6cd7f734d52
parentdc8d29ce523a9c7b524b09cb1bd084935b1c71e6
[WPE] Add env var WPE_USE_HEADLESS_VIEW_BACKEND
https://bugs.webkit.org/show_bug.cgi?id=173770

Reviewed by Michael Catanzaro.

Move HeadlessViewBackend implementation to a common place and build it as a private static library to be used by
WTR, GLib API tests and eventually C API tests too. WTR uses the HeadlessViewBackend unconditionally, but GLib
API tests use it only when WPE_USE_HEADLESS_VIEW_BACKEND environment variable is present and not "0".

* CMakeLists.txt: Include wpe/HeadlessViewBackend directory for developer builds.
* TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
(testAutomationSessionRequestSession):
* TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:
(testCookieManagerEphemeral):
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:
(testPrivateBrowsing):
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testWebContextProxySettings):
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewWebContext):
(testWebViewEphemeral):
* TestWebKitAPI/glib/PlatformWPE.cmake:
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::createWebViewBackend):
(Test::createWebView):
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::initializeWebView):
* WebKitTestRunner/PlatformWPE.cmake:
* wpe/HeadlessViewBackend/CMakeLists.txt: Added.
* wpe/HeadlessViewBackend/HeadlessViewBackend.cpp: Renamed from Tools/WebKitTestRunner/wpe/HeadlessViewBackend.cpp.
(HeadlessViewBackend::HeadlessViewBackend):
* wpe/HeadlessViewBackend/HeadlessViewBackend.h: Renamed from Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Tools/CMakeLists.txt
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp
Tools/TestWebKitAPI/glib/PlatformWPE.cmake
Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.h
Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp
Tools/WebKitTestRunner/PlatformWPE.cmake
Tools/wpe/HeadlessViewBackend/CMakeLists.txt [new file with mode: 0644]
Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.cpp [moved from Tools/WebKitTestRunner/wpe/HeadlessViewBackend.cpp with 98% similarity]
Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.h [moved from Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h with 100% similarity]