[Webkit-unassigned] [Bug 68509] [EFL] Implementation of Unit Tests framework for the WebKit-Efl port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 5 06:58:19 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68509





--- Comment #9 from Krzysztof <k.czech at samsung.com>  2011-10-05 06:58:19 PST ---
(From update of attachment 109766)
>diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog
>index 69c60a2..c6336c7 100755
>--- a/Source/WebKit/efl/ChangeLog
>+++ b/Source/WebKit/efl/ChangeLog
>@@ -1,3 +1,47 @@
>+2011-09-21  Krzysztof Czech  <k.czech at samsung.com>
>+
>+        Implementation of Unit Tests framework for the WebKit-Efl port.
>+        https://bugs.webkit.org/show_bug.cgi?id=XXXXX
>+
>+        Unit Tests for the WebKit-Efl port are based on the gtest library.
>+        There's also been added a simple framework for running tests that require instance of a webview
>+        and example of unit tests.
>+
>+        Reviewed by NOBODY (OOPS!).
>+
>+        * tests/default_test_page.html: Added.
>+        * tests/src/EFLTestsRun.cpp: Added.
>+        (main):
>+        * tests/src/EwkEditableTests.cpp: Added.
>+        (editableSetTestCallback):
>+        (TEST):
>+        * tests/src/EwkUriTests.cpp: Added.
>+        (ewkUriSetTestCallback):
>+        (TEST):
>+        * tests/src/UnitTestLauncher/EFLTestConfig.h: Added.
>+        * tests/src/UnitTestLauncher/EFLTestLauncher.cpp: Added.
>+        (EFLUnitTests::EFLTestLauncher::init):
>+        (EFLUnitTests::EFLTestLauncher::startTest):
>+        (EFLUnitTests::EFLTestLauncher::endTest):
>+        (EFLUnitTests::EFLTestLauncher::createTest):
>+        (EFLUnitTests::EFLTestLauncher::runTest):
>+        * tests/src/UnitTestLauncher/EFLTestLauncher.h: Added.
>+        * tests/src/UnitTestLauncher/EFLTestView.cpp: Added.
>+        (EFLUnitTests::EFLTestEcoreEvas::EFLTestEcoreEvas):
>+        (EFLUnitTests::EFLTestEcoreEvas::~EFLTestEcoreEvas):
>+        (EFLUnitTests::EFLTestEcoreEvas::getEvas):
>+        (EFLUnitTests::EFLTestEcoreEvas::show):
>+        (EFLUnitTests::EFLTestView::EFLTestView):
>+        (EFLUnitTests::EFLTestView::~EFLTestView):
>+        (EFLUnitTests::EFLTestView::createTestUrl):
>+        (EFLUnitTests::EFLTestView::init):
>+        (EFLUnitTests::EFLTestView::show):
>+        (EFLUnitTests::EFLTestView::getMainFrame):
>+        (EFLUnitTests::EFLTestView::getEvas):
>+        (EFLUnitTests::EFLTestView::bindEvents):
>+        * tests/src/UnitTestLauncher/EFLTestView.h: Added.
>+        (EFLUnitTests::EFLTestView::getWebView):
>+
> 2011-09-17  Mihai Parparita  <mihaip at chromium.org>
> 
>         FrameLoaderClient BackForwardList-related methods are unsued
>diff --git a/Source/WebKit/efl/tests/default_test_page.html b/Source/WebKit/efl/tests/default_test_page.html
>new file mode 100644
>index 0000000..edd81e7
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/default_test_page.html
>@@ -0,0 +1,6 @@
>+<HTML>
>+<BODY>
>+<H2 align="center">EFL Unit Tests</H2>
>+<H2 align="center">Default Testing Web Page</H2>
>+</BODY>
>+</HTML>
>diff --git a/Source/WebKit/efl/tests/src/EFLTestsRun.cpp b/Source/WebKit/efl/tests/src/EFLTestsRun.cpp
>new file mode 100644
>index 0000000..a22a61c
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/EFLTestsRun.cpp
>@@ -0,0 +1,30 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#include <EFLTestLauncher.h>
>+#include <gtest/gtest.h>
>+#include <stdio.h>
>+
>+using namespace EFLUnitTests;
>+
>+int main(int argc, char** argv)
>+{
>+    atexit(EFLTestLauncher::shutdownAll);
>+    ::testing::InitGoogleTest(&argc, argv);
>+    return RUN_ALL_TESTS();
>+}
>diff --git a/Source/WebKit/efl/tests/src/EwkEditableTests.cpp b/Source/WebKit/efl/tests/src/EwkEditableTests.cpp
>new file mode 100644
>index 0000000..e866026
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/EwkEditableTests.cpp
>@@ -0,0 +1,35 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#include "EFLTestLauncher.h"
>+#include "EWebKit.h"
>+#include <gtest/gtest.h>
>+
>+using namespace EFLUnitTests;
>+
>+void editableSetTestCallback(void* eventInfo, Evas_Object* o, void* data)
>+{
>+    EXPECT_EQ(EINA_TRUE, ewk_view_editable_set(o, EINA_FALSE));
>+    EXPECT_EQ(EINA_FALSE, ewk_view_editable_get(o));
>+    END_TEST();
>+}
>+
>+TEST(EwkEditableTests, EditableSetTest)
>+{
>+    RUN_TEST(editableSetTestCallback, "load,finished", 0);
>+}
>diff --git a/Source/WebKit/efl/tests/src/EwkUriTests.cpp b/Source/WebKit/efl/tests/src/EwkUriTests.cpp
>new file mode 100644
>index 0000000..eccd060
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/EwkUriTests.cpp
>@@ -0,0 +1,34 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#include "EFLTestLauncher.h"
>+#include "EWebKit.h"
>+#include <gtest/gtest.h>
>+
>+using namespace EFLUnitTests;
>+
>+void ewkUriSetTestCallback(void* eventInfo, Evas_Object* o, void* data)
>+{
>+    EXPECT_STREQ("http://www.webkit.org/", ewk_view_uri_get(o));
>+    END_TEST();
>+}
>+
>+TEST(EwkUriTests, EwkUriSetTest)
>+{
>+    RUN_TEST("http://www.webkit.org", ewkUriSetTestCallback, "load,finished", 0);
>+}
>diff --git a/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestConfig.h b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestConfig.h
>new file mode 100644
>index 0000000..ddcfcb6
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestConfig.h
>@@ -0,0 +1,31 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#ifndef EFLTestConfig_h
>+#define EFLTestConfig_h
>+
>+namespace EFLUnitTests {
>+namespace Config {
>+static const int defaultViewWidth = 600;
>+static const int defaultViewHeight = 800;
>+static const char* defaultThemePath = DEFAULT_THEME_PATH"/default.edj";
>+static const char* defaultTestPage = "file://"DEFAULT_TEST_PAGE_DIR"/default_test_page.html";
>+}
>+}
>+
>+#endif
>diff --git a/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestLauncher.cpp b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestLauncher.cpp
>new file mode 100644
>index 0000000..0b46e18
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestLauncher.cpp
>@@ -0,0 +1,102 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#include "config.h"
>+#include "EFLTestLauncher.h"
>+
>+#include "EFLTestConfig.h"
>+#include "EFLTestView.h"
>+#include "EWebKit.h"
>+
>+#include <Ecore.h>
>+#include <Edje.h>
>+#include <Eina.h>
>+
>+namespace EFLUnitTests {
>+
>+bool EFLTestLauncher::init()
>+{
>+    if (!ecore_evas_init())
>+        return false;
>+
>+    if (!edje_init()) {
>+        ecore_evas_shutdown();
>+        return false;
>+    }
>+    ewk_init();
>+    return true;
>+}
>+
>+void EFLTestLauncher::shutdown()
>+{
>+    ecore_evas_shutdown();
>+    edje_shutdown();
>+    ewk_shutdown();
>+}
>+
>+void EFLTestLauncher::shutdownAll()
>+{
>+    int count = 0;
>+
>+    while ((count = ecore_evas_shutdown()) > 0) { }
>+    while ((count = edje_shutdown()) > 0) { }
>+    while ((count = ewk_shutdown()) > 0) { }
>+}
>+
>+void EFLTestLauncher::startTest()
>+{
>+    ecore_main_loop_begin();
>+}
>+
>+void EFLTestLauncher::endTest()
>+{
>+    ecore_main_loop_quit();
>+}
>+
>+bool EFLTestLauncher::createTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data)
>+{
>+    EFL_INIT_RET();
>+
>+    EFLTestEcoreEvas evas;
>+    if (!evas.getEvas())
>+        return false;
>+    evas.show();
>+
>+    EFLTestView view(evas.getEvas(), url);
>+    if (!view.init())
>+        return false;
>+
>+    view.bindEvents(event_callback, event_name, event_data);
>+    view.show();
>+
>+    START_TEST();
>+
>+    return true;
>+}
>+
>+bool EFLTestLauncher::runTest(void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data)
>+{
>+    return createTest(EFLUnitTests::Config::defaultTestPage, event_callback, event_name, event_data);
>+}
>+
>+bool EFLTestLauncher::runTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data)
>+{
>+    return createTest(url, event_callback, event_name, event_data);
>+}
>+
>+}
>diff --git a/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestLauncher.h b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestLauncher.h
>new file mode 100644
>index 0000000..746f95d
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestLauncher.h
>@@ -0,0 +1,88 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#ifndef EFLTestLauncher_h
>+#define EFLTestLauncher_h
>+
>+#include <Evas.h>
>+
>+#ifdef GTEST_TEST_FRAMEWORK
>+#include <gtest/gtest.h>
>+#endif
>+
>+#ifdef GTEST_TEST_FRAMEWORK
>+    #define RUN_TEST(args...)   \
>+        do {    \
>+            ASSERT_EQ(true, EFLTestLauncher::runTest(args));    \
>+        } while (0)
>+#else
>+    #define RUN_TEST(args...)   \
>+    do {    \
>+        EFLTestLauncher::runTest(args); \
>+    } while (0)
>+#endif
>+
>+#define START_TEST()    \
>+    do {    \
>+        EFLTestLauncher::startTest();   \
>+    } while (0)
>+
>+#define END_TEST()    \
>+    do {    \
>+        EFLTestLauncher::endTest(); \
>+    } while (0)
>+
>+#define EFL_INIT_RET()  \
>+    do {    \
>+        if (!EFLTestLauncher::init())   \
>+            return false;    \
>+    } while (0)
>+
>+#define EFL_INIT()  \
>+    do {    \
>+        EFLTestLauncher::init();    \
>+    } while (0)
>+
>+#define EFL_SHUTDOWN()  \
>+    do {    \
>+        EFLTestLauncher::shutdown();    \
>+    } while (0)
>+
>+#define EFL_SHUTDOWN_ALL()  \
>+    do {    \
>+        EFLTestLauncher::shutdownAll(); \
>+    } while (0)
>+
>+namespace EFLUnitTests {
>+
>+class EFLTestLauncher {
>+    static bool createTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data);
>+public:
>+    static bool init();
>+    static void shutdown();
>+    static void shutdownAll();
>+    static void startTest();
>+    static void endTest();
>+
>+    static bool runTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data);
>+    static bool runTest(void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data);
>+};
>+
>+}
>+
>+#endif
>diff --git a/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestView.cpp b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestView.cpp
>new file mode 100644
>index 0000000..8053b3a
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestView.cpp
>@@ -0,0 +1,177 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#include "config.h"
>+#include "EFLTestView.h"
>+
>+#include "EFLTestConfig.h"
>+#include "EWebKit.h"
>+
>+#include <Ecore.h>
>+#include <Ecore_File.h>
>+#include <Edje.h>
>+#include <Eina.h>
>+
>+#include <string.h>
>+
>+namespace EFLUnitTests {
>+
>+EFLTestEcoreEvas::EFLTestEcoreEvas()
>+    : m_ecoreEvas(0)
>+{
>+    m_ecoreEvas = ecore_evas_new(0, 0, 0, EFLUnitTests::Config::defaultViewWidth, EFLUnitTests::Config::defaultViewHeight, 0);
>+}
>+
>+EFLTestEcoreEvas::EFLTestEcoreEvas(const char* engine_name, int viewport_x, int viewport_y, int viewport_w, int viewport_h, const char* extra_options)
>+    : m_ecoreEvas(0)
>+{
>+    m_ecoreEvas = ecore_evas_new(engine_name, viewport_x, viewport_y, viewport_w, viewport_h, extra_options);
>+}
>+
>+EFLTestEcoreEvas::~EFLTestEcoreEvas()
>+{
>+    if (m_ecoreEvas)
>+        ecore_evas_free(m_ecoreEvas);
>+}
>+
>+Evas* EFLTestEcoreEvas::getEvas()
>+{
>+    if (m_ecoreEvas)
>+        return ecore_evas_get(m_ecoreEvas);
>+    return 0;
>+}
>+
>+void EFLTestEcoreEvas::show()
>+{
>+    if (m_ecoreEvas)
>+        ecore_evas_show(m_ecoreEvas);
>+}
>+
>+EFLTestView::EFLTestView(Evas* evas)
>+    : m_webView(0)
>+    , m_evas(evas)
>+    , m_url(0)
>+    , m_defaultViewType(TiledView)
>+    , m_width(EFLUnitTests::Config::defaultViewWidth)
>+    , m_height(EFLUnitTests::Config::defaultViewHeight)
>+{
>+    m_url = createTestUrl(EFLUnitTests::Config::defaultTestPage);
>+}
>+
>+EFLTestView::EFLTestView(Evas* evas, const char* url)
>+    : m_webView(0)
>+    , m_evas(evas)
>+    , m_url(0)
>+    , m_defaultViewType(TiledView)
>+    , m_width(EFLUnitTests::Config::defaultViewWidth)
>+    , m_height(EFLUnitTests::Config::defaultViewHeight)
>+{
>+    m_url = createTestUrl(url);
>+}
>+
>+EFLTestView::EFLTestView(Evas* evas, EwkViewType type, const char* url)
>+    : m_webView(0)
>+    , m_evas(evas)
>+    , m_url(0)
>+    , m_defaultViewType(type)
>+    , m_width(EFLUnitTests::Config::defaultViewWidth)
>+    , m_height(EFLUnitTests::Config::defaultViewHeight)
>+{
>+    m_url = createTestUrl(url);
>+}
>+
>+EFLTestView::EFLTestView(Evas* evas, EwkViewType type, const char* url, int width, int height)
>+    : m_webView(0)
>+    , m_evas(evas)
>+    , m_url(0)
>+    , m_defaultViewType(type)
>+    , m_width(width)
>+    , m_height(height)
>+{
>+    m_url = createTestUrl(url);
>+}
>+
>+EFLTestView::~EFLTestView()
>+{
>+    if (m_webView)
>+        evas_object_del(m_webView);
>+    free(m_url);
>+}
>+
>+char* EFLTestView::createTestUrl(const char* url)
>+{
>+    if (url)
>+        return strdup(url);
>+    return 0;
>+}
>+
>+bool EFLTestView::init()
>+{
>+    if (!m_evas || !m_url)
>+        return false;
>+
>+    switch (m_defaultViewType) {
>+    case SingleView:
>+        m_webView = ewk_view_single_add(m_evas);
>+        break;
>+
>+    case TiledView:
>+        m_webView = ewk_view_tiled_add(m_evas);
>+        break;
>+    }
>+
>+    if (!m_webView)
>+        return false;
>+
>+    ewk_view_theme_set(m_webView, EFLUnitTests::Config::defaultThemePath);
>+    ewk_view_uri_set(m_webView, m_url);
>+}
>+
>+void EFLTestView::show()
>+{
>+    if (!m_webView)
>+        return;
>+    evas_object_resize(m_webView, m_width, m_height);
>+    evas_object_show(m_webView);
>+    evas_object_focus_set(m_webView, EINA_TRUE);
>+}
>+
>+Evas_Object* EFLTestView::getMainFrame()
>+{
>+    if (m_webView)
>+        return ewk_view_frame_main_get(m_webView);
>+    return 0;
>+}
>+
>+Evas* EFLTestView::getEvas()
>+{
>+    if (m_webView)
>+        return evas_object_evas_get(m_webView);
>+    return 0;
>+}
>+
>+void EFLTestView::bindEvents(void (*callback)(void*, Evas_Object*, void*), const char* eventName, void* ptr)
>+{
>+    if (!m_webView)
>+        return;
>+
>+    evas_object_smart_callback_del(m_webView, eventName, callback);
>+    evas_object_smart_callback_add(m_webView, eventName, callback, ptr);
>+}
>+
>+}
>diff --git a/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestView.h b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestView.h
>new file mode 100644
>index 0000000..9cb2469
>--- /dev/null
>+++ b/Source/WebKit/efl/tests/src/UnitTestLauncher/EFLTestView.h
>@@ -0,0 +1,77 @@
>+/*
>+    Copyright (C) 2011 Samsung Electronics
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Lesser General Public
>+    License as published by the Free Software Foundation; either
>+    version 2.1 of the License, or (at your option) any later version.
>+
>+    This library 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
>+    Lesser General Public License for more details.
>+
>+    You should have received a copy of the GNU Lesser General Public License
>+    along with this library; if not, write to the Free Software Foundation,
>+    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>+*/
>+
>+#ifndef EFLTestView_h
>+#define EFLTestView_h
>+
>+#include <Ecore_Evas.h>
>+#include <Evas.h>
>+
>+namespace EFLUnitTests {
>+
>+class EFLTestEcoreEvas {
>+public:
>+    EFLTestEcoreEvas();
>+    EFLTestEcoreEvas(const char* engine_name, int viewport_x, int viewport_y, int viewport_w, int viewport_h, const char* extra_options);
>+    ~EFLTestEcoreEvas();
>+
>+    Evas* getEvas();
>+    void show();
>+
>+private:
>+    Ecore_Evas* m_ecoreEvas;
>+};
>+
>+class EFLTestView {
>+public:
>+    enum EwkViewType {
>+        SingleView = 0,
>+        TiledView,
>+    };
>+
>+    explicit EFLTestView(Evas*);
>+    EFLTestView(Evas*, const char* url);
>+    EFLTestView(Evas*, EwkViewType, const char* url);
>+    EFLTestView(Evas*, EwkViewType, const char* url, int width, int height);
>+
>+    virtual ~EFLTestView();
>+
>+    Evas_Object* getWebView() { return m_webView; }
>+    Evas_Object* getMainFrame();
>+    Evas* getEvas();
>+    void show();
>+
>+    bool init();
>+    void bindEvents(void (*callback)(void*, Evas_Object*, void*), const char* eventName, void* ptr);
>+protected:
>+    char* createTestUrl(const char* url);
>+private:
>+    EFLTestView(const EFLTestView&);
>+    EFLTestView operator=(const EFLTestView&);
>+
>+    Evas* m_evas;
>+    Evas_Object* m_webView;
>+
>+    char* m_url;
>+    int m_width, m_height;
>+    EwkViewType m_defaultViewType;
>+};
>+
>+}
>+
>+#endif

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list