+2012-07-05 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [Wk2][EFL] EFL needs a WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=87659
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Source/CMakeLists.txt:
+ Set compiler flags for WebCoreTestSupport to be linked into TestRunnerInjectedBundle
+ shared library.
+ * Source/cmake/WebKitMacros.cmake: Remove unnecessary dependency.
+
2012-07-04 John Mellor <johnme@chromium.org>
Text Autosizing: Add compile flag and runtime setting
# -----------------------------------------------------------------------------
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME})
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCoreTestSupport_LIBRARY_NAME})
IF (ENABLE_WEBCORE)
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME})
+2012-07-05 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [Wk2][EFL] EFL needs a WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=87659
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * PlatformEfl.cmake: Added WKImageCairo.cpp in source list.
+
2012-07-05 Hyerim Bae <hyerim.bae@samsung.com>
[EFL][WK2] Add ewk_view_reload_bypass_cache API.
Platform/CoreIPC/unix/ConnectionUnix.cpp
Platform/CoreIPC/unix/AttachmentUnix.cpp
+ Shared/API/c/cairo/WKImageCairo.cpp
+
Shared/API/c/gtk/WKGraphicsContextGtk.cpp
Shared/cairo/LayerTreeContextCairo.cpp
ADD_CUSTOM_COMMAND(
OUTPUT ${_destination}/${_prefix}${_name}.cpp ${_destination}/${_prefix}${_name}.h
MAIN_DEPENDDENCY ${_file}
- DEPENDS ${BINDING_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/bindings/scripts/CodeGenerator${_generator}.pm ${_supplemental_dependency_file}
+ DEPENDS ${BINDING_GENERATOR} ${SCRIPTS_BINDINGS} ${_supplemental_dependency_file}
COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${BINDING_GENERATOR} --defines "${_features}" --generator ${_generator} ${_idl_includes} --outputDir "${_destination}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${_supplemental_dependency} ${_file}
WORKING_DIRECTORY ${_base_dir}
VERBATIM)
+IF (ENABLE_WEBKIT2)
+ ADD_SUBDIRECTORY(WebKitTestRunner)
+ENDIF ()
+
IF ("${PORT}" STREQUAL "Efl")
IF (ENABLE_WEBKIT)
ADD_SUBDIRECTORY(DumpRenderTree/efl)
+2012-07-05 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [Wk2][EFL] EFL needs a WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=87659
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add an implementation of WebKitTestRunner for Efl port.
+
+ * CMakeLists.txt: Includes WebKitTestRunner build script.
+ * Scripts/build-webkittestrunner: Added knowledge of WebKitTestRunner/Efl.
+ * Scripts/webkitpy/layout_tests/port/efl.py: Ditto.
+ (EflPort.setup_environ_for_server):
+ * WebKitTestRunner/CMakeLists.txt: Added.
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ * WebKitTestRunner/InjectedBundle/efl/ActivateFontsEfl.cpp: Added.
+ * WebKitTestRunner/InjectedBundle/efl/InjectedBundleEfl.cpp: Added.
+ * WebKitTestRunner/InjectedBundle/efl/LayoutTestControllerEfl.cpp: Added.
+ * WebKitTestRunner/PlatformEfl.cmake: Added.
+ * WebKitTestRunner/PlatformWebView.h:
+ * WebKitTestRunner/TestController.cpp:
+ * WebKitTestRunner/config.h: Added knowledge of WebKitTestRunner/Efl.
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp: Added.
+ * WebKitTestRunner/efl/TestControllerEfl.cpp: Added.
+ * WebKitTestRunner/efl/main.cpp: Added.
+ (main):
+
2012-07-05 Christophe Dumez <christophe.dumez@intel.com>
[WK2][EFL] Ewk_View needs API to load HTML data
$result = buildXCodeProject("WebKitTestRunner", $clean, XcodeOptions(), @ARGV);
} elsif (isAppleWinWebKit()) {
$result = buildVisualStudioProject("WebKitTestRunner.sln", $clean);
-} elsif (isQt() || isGtk()) {
+} elsif (isQt() || isGtk() || isEfl()) {
# Qt and GTK+ build everything in one shot. No need to build anything here.
$result = 0;
} else {
def setup_test_run(self):
self._unload_pulseaudio_module()
+ def setup_environ_for_server(self, server_name=None):
+ env = super(EflPort, self).setup_environ_for_server(server_name)
+ env['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so')
+ env['TEST_RUNNER_PLUGIN_PATH'] = self._build_path('lib')
+ return env
+
def clean_up_test_run(self):
self._restore_pulseaudio_module()
--- /dev/null
+SET(WEBKIT_TESTRUNNER_DIR "${TOOLS_DIR}/WebKitTestRunner")
+SET(WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR "${TOOLS_DIR}/WebKitTestRunner/InjectedBundle")
+
+FILE(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/InjectedBundle)
+
+SET(WebKitTestRunner_SOURCES
+ ${WEBKIT_TESTRUNNER_DIR}/CyclicRedundancyCheck.cpp
+ ${WEBKIT_TESTRUNNER_DIR}/PixelDumpSupport.cpp
+ ${WEBKIT_TESTRUNNER_DIR}/TestController.cpp
+ ${WEBKIT_TESTRUNNER_DIR}/TestInvocation.cpp
+)
+
+SET(WebKitTestRunner_LIBRARIES
+ ${JavaScriptCore_LIBRARY_NAME}
+ ${WebCore_LIBRARY_NAME}
+ ${WebCoreTestSupport_LIBRARY_NAME}
+ ${WebKit2_LIBRARY_NAME}
+)
+
+SET(WebKitTestRunner_INCLUDE_DIRECTORIES
+ ${WEBKIT_TESTRUNNER_DIR}
+ ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle
+ ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/Bindings
+ ${JAVASCRIPTCORE_DIR}
+ ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
+ ${WEBCORE_DIR}/editing
+ ${WEBCORE_DIR}/platform
+ ${WEBCORE_DIR}/platform/graphics
+ ${WEBCORE_DIR}/platform/network
+ ${WEBCORE_DIR}/platform/text
+ ${WEBCORE_DIR}/testing/js
+ ${WEBKIT2_DIR}/Shared
+ ${WEBKIT2_DIR}/Shared/API/c
+ ${WEBKIT2_DIR}/UIProcess
+ ${WEBKIT2_DIR}/UIProcess/API/C/efl
+ ${WEBKIT2_DIR}/UIProcess/API/C/soup
+ ${WTF_DIR}
+ ${DERIVED_SOURCES_WEBCORE_DIR}/include
+ ${DERIVED_SOURCES_WEBKIT2_DIR}/include
+ ${DERIVED_SOURCES_DIR}/InjectedBundle
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/Source
+ ${LIBSOUP24_INCLUDE_DIRS}
+)
+
+SET(WebKitTestRunnerInjectedBundle_SOURCES
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityController.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarker.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarkerRange.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityUIElement.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/EventSendingController.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/GCController.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundle.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundleMain.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundlePage.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/LayoutTestController.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/TextInputController.cpp
+
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/JSWrapper.cpp
+)
+
+FILE(GLOB WebKitTestRunnerInjectedBundle_IDL_FILES "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/*.idl")
+
+GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
+ "${WebKitTestRunnerInjectedBundle_IDL_FILES}"
+ "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
+ "--include=${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
+ ""
+ ${DERIVED_SOURCES_DIR}/InjectedBundle JS TestRunner
+ )
+
+INCLUDE_IF_EXISTS(${WEBKIT_TESTRUNNER_DIR}/Platform${PORT}.cmake)
+
+INCLUDE_DIRECTORIES(${WebKitTestRunner_INCLUDE_DIRECTORIES})
+
+ADD_LIBRARY(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
+TARGET_LINK_LIBRARIES(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
+
+ADD_EXECUTABLE(WebKitTestRunner ${WebKitTestRunner_SOURCES})
+TARGET_LINK_LIBRARIES(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
+
+IF (WebKitTestRunner_LINK_FLAGS)
+ ADD_TARGET_PROPERTIES(WebKitTestRunner LINK_FLAGS ${WebKitTestRunner_LINK_FLAGS})
+ENDIF ()
+
+ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForWebKitTestRunner_NAME})
+ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})
typedef QTimer PlatformTimerRef;
#elif PLATFORM(GTK)
typedef unsigned int PlatformTimerRef;
+#elif PLATFORM(EFL)
+typedef struct _Ecore_Timer Ecore_Timer;
+typedef Ecore_Timer* PlatformTimerRef;
#endif
namespace WTR {
--- /dev/null
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "ActivateFonts.h"
+
+#include "FontManagement.h"
+
+namespace WTR {
+
+void activateFonts()
+{
+ addFontsToEnvironment();
+}
+
+} // namespace WTR
--- /dev/null
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "InjectedBundle.h"
+
+#include <WebCore/NotImplemented.h>
+
+namespace WTR {
+
+void InjectedBundle::platformInitialize(WKTypeRef)
+{
+ notImplemented();
+}
+
+} // namespace WTR
--- /dev/null
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "LayoutTestController.h"
+
+#include "InjectedBundle.h"
+#include <Ecore.h>
+
+namespace WTR {
+
+static Eina_Bool waitToDumpWatchdogTimerCallback(void*)
+{
+ InjectedBundle::shared().layoutTestController()->waitToDumpWatchdogTimerFired();
+ return false;
+}
+
+void LayoutTestController::platformInitialize()
+{
+ m_waitToDumpWatchdogTimer = 0;
+}
+
+void LayoutTestController::invalidateWaitToDumpWatchdogTimer()
+{
+ if (!m_waitToDumpWatchdogTimer)
+ return;
+
+ ecore_timer_del(m_waitToDumpWatchdogTimer);
+ m_waitToDumpWatchdogTimer = 0;
+}
+
+void LayoutTestController::initializeWaitToDumpWatchdogTimerIfNeeded()
+{
+ if (m_waitToDumpWatchdogTimer)
+ return;
+
+ m_waitToDumpWatchdogTimer = ecore_timer_loop_add(waitToDumpWatchdogTimerInterval,
+ waitToDumpWatchdogTimerCallback, 0);
+}
+
+JSRetainPtr<JSStringRef> LayoutTestController::pathToLocalResource(JSStringRef url)
+{
+ return url;
+}
+
+JSRetainPtr<JSStringRef> LayoutTestController::platformName()
+{
+ JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("efl"));
+ return platformName;
+}
+
+} // namespace WTR
--- /dev/null
+LIST(APPEND WebKitTestRunner_LINK_FLAGS
+ ${ECORE_X_LDFLAGS}
+ ${EDJE_LDFLAGS}
+ ${EFLDEPS_LDFLAGS}
+ ${EVAS_LDFLAGS}
+ ${LIBSOUP24_LDFLAGS}
+)
+
+ADD_CUSTOM_TARGET(forwarding-headersEflForWebKitTestRunner
+ COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
+)
+SET(ForwardingHeadersForWebKitTestRunner_NAME forwarding-headersEflForWebKitTestRunner)
+
+ADD_CUSTOM_TARGET(forwarding-headersSoupForWebKitTestRunner
+ COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
+)
+SET(ForwardingNetworkHeadersForWebKitTestRunner_NAME forwarding-headersSoupForWebKitTestRunner)
+
+LIST(APPEND WebKitTestRunner_SOURCES
+ ${WEBKIT_TESTRUNNER_DIR}/cairo/TestInvocationCairo.cpp
+
+ ${WEBKIT_TESTRUNNER_DIR}/efl/PlatformWebViewEfl.cpp
+ ${WEBKIT_TESTRUNNER_DIR}/efl/TestControllerEfl.cpp
+ ${WEBKIT_TESTRUNNER_DIR}/efl/main.cpp
+)
+
+LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+ ${TOOLS_DIR}/DumpRenderTree/efl/
+ "${WTF_DIR}/wtf/gobject"
+
+ ${CAIRO_INCLUDE_DIRS}
+ ${ECORE_X_INCLUDE_DIRS}
+ ${EFLDEPS_INCLUDE_DIRS}
+ ${EVAS_INCLUDE_DIRS}
+ ${Glib_INCLUDE_DIRS}
+)
+
+LIST(APPEND WebKitTestRunner_LIBRARIES
+ ${CAIRO_LIBRARIES}
+ ${ECORE_X_LIBRARIES}
+ ${EDJE_LIBRARIES}
+ ${EFLDEPS_LIBRARIES}
+ ${Glib_LIBRARIES}
+)
+
+LIST(APPEND WebKitTestRunnerInjectedBundle_SOURCES
+ ${TOOLS_DIR}/DumpRenderTree/efl/FontManagement.cpp
+
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/efl/ActivateFontsEfl.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/efl/InjectedBundleEfl.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/efl/LayoutTestControllerEfl.cpp
+)
+
+# FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
+# structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
+ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
+ -DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3"
+ -DDATA_DIR="${THEME_BINARY_DIR}")
typedef struct _GtkWidget GtkWidget;
typedef WKViewRef PlatformWKView;
typedef GtkWidget* PlatformWindow;
+#elif PLATFORM(EFL)
+typedef struct _Evas_Object Evas_Object;
+typedef struct _Ecore_Evas Ecore_Evas;
+typedef Evas_Object* PlatformWKView;
+typedef Ecore_Evas* PlatformWindow;
#endif
namespace WTR {
#include <WebKit2/WKPagePrivateMac.h>
#endif
-#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
#include "EventSenderProxy.h"
#endif
#ifndef WebKitTestRunner_config_h
#define WebKitTestRunner_config_h
+#if defined (BUILDING_WITH_CMAKE)
+#include "cmakeconfig.h"
+#endif
+
#include <wtf/Platform.h>
#include <wtf/ExportMacros.h>
#if USE(JSC)
#include <runtime/JSExportMacros.h>
#endif
+#include <WebKit2/WebKit2.h>
+
#if PLATFORM(WIN)
#define WTF_USE_CF 1
#if defined(WIN_CAIRO)
--- /dev/null
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "PlatformWebView.h"
+
+#include "WebKit2/WKAPICast.h"
+#include <Ecore_Evas.h>
+
+using namespace WebKit;
+
+namespace WTR {
+
+static bool useX11Window = false;
+
+static Ecore_Evas* initEcoreEvas()
+{
+ Ecore_Evas* ecoreEvas = useX11Window ? ecore_evas_new(0, 0, 0, 800, 600, 0) : ecore_evas_buffer_new(800, 600);
+ if (!ecoreEvas)
+ return 0;
+
+ ecore_evas_title_set(ecoreEvas, "EFL WebKitTestRunner");
+ ecore_evas_show(ecoreEvas);
+
+ return ecoreEvas;
+}
+
+PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup)
+{
+ m_window = initEcoreEvas();
+ Evas* evas = ecore_evas_get(m_window);
+ m_view = toImpl(WKViewCreate(evas, context, pageGroup));
+ m_windowIsKey = false;
+}
+
+PlatformWebView::~PlatformWebView()
+{
+ evas_object_del(m_view);
+ ecore_evas_free(m_window);
+}
+
+void PlatformWebView::resizeTo(unsigned width, unsigned height)
+{
+ evas_object_resize(m_view, width, height);
+}
+
+WKPageRef PlatformWebView::page()
+{
+ return WKViewGetPage(toAPI(m_view));
+}
+
+void PlatformWebView::focus()
+{
+}
+
+WKRect PlatformWebView::windowFrame()
+{
+ return WKRectMake(0, 0, 0, 0);
+}
+
+void PlatformWebView::setWindowFrame(WKRect frame)
+{
+ evas_object_move(m_view, frame.origin.x, frame.origin.y);
+ resizeTo(frame.size.width, frame.size.height);
+}
+
+void PlatformWebView::addChromeInputField()
+{
+}
+
+void PlatformWebView::removeChromeInputField()
+{
+}
+
+void PlatformWebView::makeWebViewFirstResponder()
+{
+}
+
+WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
+{
+ // FIXME: implement to capture pixels in the UI process,
+ // which may be necessary to capture things like 3D transforms.
+ return 0;
+}
+
+} // namespace WTR
+
--- /dev/null
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "TestController.h"
+
+#include <Ecore.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wtf/Platform.h>
+#include <wtf/text/WTFString.h>
+
+namespace WTR {
+
+static Ecore_Timer* timer = 0;
+
+static Eina_Bool timerFired(void*)
+{
+ timer = 0;
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+void TestController::notifyDone()
+{
+ if (!timer)
+ return;
+
+ ecore_timer_del(timer);
+ timer = 0;
+ ecore_main_loop_quit();
+}
+
+void TestController::platformInitialize()
+{
+}
+
+void TestController::platformRunUntil(bool&, double timeout)
+{
+ timer = ecore_timer_loop_add(timeout, timerFired, 0);
+ ecore_main_loop_begin();
+}
+
+static const char* getEnvironmentVariableOrExit(const char* variableName)
+{
+ const char* value = getenv(variableName);
+ if (!value) {
+ fprintf(stderr, "%s environment variable not found\n", variableName);
+ exit(0);
+ }
+
+ return value;
+}
+
+void TestController::initializeInjectedBundlePath()
+{
+ const char* bundlePath = getEnvironmentVariableOrExit("TEST_RUNNER_INJECTED_BUNDLE_FILENAME");
+ m_injectedBundlePath = WKStringCreateWithUTF8CString(bundlePath);
+}
+
+void TestController::initializeTestPluginDirectory()
+{
+ const char* pluginPath = getEnvironmentVariableOrExit("TEST_RUNNER_PLUGIN_PATH");
+ m_testPluginDirectory = WKStringCreateWithUTF8CString(pluginPath);
+}
+
+void TestController::platformInitializeContext()
+{
+}
+
+void TestController::runModal(PlatformWebView*)
+{
+ // FIXME: Need to implement this to test showModalDialog.
+}
+
+const char* TestController::platformLibraryPathForTesting()
+{
+ return 0;
+}
+
+} // namespace WTR
--- /dev/null
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "TestController.h"
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Edje.h>
+#include <glib-object.h>
+#include <glib.h>
+
+#ifdef HAVE_ECORE_X
+#include <Ecore_X.h>
+#endif
+
+int main(int argc, char** argv)
+{
+ g_type_init();
+
+ if (!ecore_evas_init())
+ return 1;
+
+ if (!edje_init()) {
+ ecore_evas_shutdown();
+ return 1;
+ }
+
+#ifdef HAVE_ECORE_X
+ if (!ecore_x_init(0)) {
+ ecore_evas_shutdown();
+ edje_shutdown();
+ return 1;
+ }
+#endif
+
+ // Prefer the not installed web and plugin processes.
+ WTR::TestController controller(argc, const_cast<const char**>(argv));
+
+#ifdef HAVE_ECORE_X
+ ecore_x_shutdown();
+#endif
+
+ edje_shutdown();
+ ecore_evas_shutdown();
+
+ return 0;
+}
+