Changeset 219605 in webkit


Ignore:
Timestamp:
Jul 18, 2017 12:20:33 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Add initial implementation of WebDriver process to run the HTTP server
https://bugs.webkit.org/show_bug.cgi?id=166682

Reviewed by Brian Burg.

.:

Enable WebDriver in the GTK port by default.

  • Source/CMakeLists.txt:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/WebKitFS.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WebDriver:

Add WebDriver process that runs the HTTP server and implements an initial set of commands. Most of the code is
cross-platform, only the HTTP server implementation, the code to launch the browser and the communication with
the remote inspector requires platform specific code. This patch includes the GTK port implementation, using
libsoup for the HTTP server, and GLib for launching the browser and communicating with the remote
inspector. This implementation follows the w3c spec (https://www.w3.org/TR/webdriver) as close as possible, but
using the official selenium python tests as reference.

  • CMakeLists.txt: Added.
  • Capabilities.h: Added.
  • CommandResult.cpp: Added.
  • CommandResult.h: Added.
  • HTTPServer.cpp: Added.
  • HTTPServer.h: Added.
  • PlatformGTK.cmake: Added.
  • Session.cpp: Added.
  • Session.h: Added.
  • SessionHost.cpp: Added.
  • SessionHost.h: Added.
  • WebDriverMain.cpp: Added.
  • WebDriverService.cpp: Added.
  • WebDriverService.h: Added.
  • config.h: Added.
  • glib/SessionHostGlib.cpp: Added.
  • gtk/WebDriverServiceGtk.cpp: Added.
  • soup/HTTPServerSoup.cpp: Added.
Location:
trunk
Files:
23 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r219602 r219605  
     12017-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Add initial implementation of WebDriver process to run the HTTP server
     4        https://bugs.webkit.org/show_bug.cgi?id=166682
     5
     6        Reviewed by Brian Burg.
     7
     8        Enable WebDriver in the GTK port by default.
     9
     10        * Source/CMakeLists.txt:
     11        * Source/cmake/OptionsGTK.cmake:
     12        * Source/cmake/WebKitFS.cmake:
     13        * Source/cmake/WebKitFeatures.cmake:
     14
    1152017-07-17  Konstantin Tokarev  <annulen@yandex.ru>
    216
  • trunk/Source/CMakeLists.txt

    r219488 r219605  
    3939endif ()
    4040
     41if (ENABLE_WEBDRIVER)
     42    add_subdirectory(WebDriver)
     43endif ()
     44
    4145WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
    4246
  • trunk/Source/cmake/OptionsGTK.cmake

    r219547 r219605  
    144144WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO PUBLIC ON)
    145145WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO PUBLIC ON)
     146WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PUBLIC ON)
    146147WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC PUBLIC OFF)
    147148
     
    277278endif ()
    278279
     280if (ENABLE_WEBDRIVER)
     281    # WebDriver requires newer versions of GLib and Soup.
     282    if (PC_GLIB_VERSION VERSION_LESS "2.40")
     283        message(FATAL_ERROR "GLib 2.40 is required to enable WebDriver support.")
     284    endif ()
     285    if (PC_LIBSOUP_VERSION VERSION_LESS "2.48")
     286        message(FATAL_ERROR "libsoup 2.48 is required to enable WebDriver support.")
     287    endif ()
     288endif ()
     289
    279290SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER TRUE)
    280291
  • trunk/Source/cmake/WebKitFS.cmake

    r219494 r219605  
    2626    set(TOOLS_DIR "${CMAKE_SOURCE_DIR}/Tools")
    2727endif ()
     28if (NOT WEBDRIVER_DIR)
     29    set(WEBDRIVER_DIR "${CMAKE_SOURCE_DIR}/Source/WebDriver")
     30endif ()
    2831
    2932set(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
    3033set(DERIVED_SOURCES_JAVASCRIPTCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore")
    3134set(DERIVED_SOURCES_WEBCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebCore")
     35set(DERIVED_SOURCES_WEBDRIVER_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebDriver")
    3236set(DERIVED_SOURCES_WEBKITLEGACY_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKitLegacy")
    3337set(DERIVED_SOURCES_WEBKIT_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit")
     
    5761    file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT_DIR})
    5862endif ()
     63
     64if (ENABLE_WEBDRIVER)
     65    file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBDRIVER_DIR})
     66endif ()
  • trunk/Source/cmake/WebKitFeatures.cmake

    r219403 r219605  
    183183    WEBKIT_OPTION_DEFINE(ENABLE_VIEW_MODE_CSS_MEDIA "Toggle Track support for the view-mode media Feature" PRIVATE ON)
    184184    WEBKIT_OPTION_DEFINE(ENABLE_WEBASSEMBLY "Toggle WebAssembly support" PRIVATE ${ENABLE_FTL_DEFAULT})
     185    WEBKIT_OPTION_DEFINE(ENABLE_WEBDRIVER "Whether to enable the WebDriver service process" PRIVATE OFF)
    185186    WEBKIT_OPTION_DEFINE(ENABLE_WEBGL "Toggle WebGL support" PRIVATE OFF)
    186187    WEBKIT_OPTION_DEFINE(ENABLE_WEBGL2 "Toggle WebGL 2.0 support" PRIVATE OFF)
Note: See TracChangeset for help on using the changeset viewer.