Title: [123000] trunk/Source/WebKit2
Revision
123000
Author
commit-qu...@webkit.org
Date
2012-07-18 12:31:24 -0700 (Wed, 18 Jul 2012)

Log Message

[EFL] Set a theme for EFL WebKit2 unit test fixture
https://bugs.webkit.org/show_bug.cgi?id=91618

Patch by Thiago Marcos P. Santos <thiago.san...@intel.com> on 2012-07-18
Reviewed by Kenneth Rohde Christiansen.

The test fixture should load the theme generated by the build
instead of trying to load the system theme.

* PlatformEfl.cmake:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::defaultTheme):
(EWK2UnitTest):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
(EWK2UnitTestEnvironment):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (122999 => 123000)


--- trunk/Source/WebKit2/ChangeLog	2012-07-18 19:26:56 UTC (rev 122999)
+++ trunk/Source/WebKit2/ChangeLog	2012-07-18 19:31:24 UTC (rev 123000)
@@ -1,3 +1,22 @@
+2012-07-18  Thiago Marcos P. Santos  <thiago.san...@intel.com>
+
+        [EFL] Set a theme for EFL WebKit2 unit test fixture
+        https://bugs.webkit.org/show_bug.cgi?id=91618
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        The test fixture should load the theme generated by the build
+        instead of trying to load the system theme.
+
+        * PlatformEfl.cmake:
+        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
+        (EWK2UnitTest::EWK2UnitTestBase::SetUp):
+        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
+        (EWK2UnitTest::EWK2UnitTestEnvironment::defaultTheme):
+        (EWK2UnitTest):
+        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
+        (EWK2UnitTestEnvironment):
+
 2012-07-18  Pierre Rossi  <pierre.ro...@gmail.com>
 
         [Qt] QQuickWebView shouldn't recieve mouse events while dialogs are active

Modified: trunk/Source/WebKit2/PlatformEfl.cmake (122999 => 123000)


--- trunk/Source/WebKit2/PlatformEfl.cmake	2012-07-18 19:26:56 UTC (rev 122999)
+++ trunk/Source/WebKit2/PlatformEfl.cmake	2012-07-18 19:31:24 UTC (rev 123000)
@@ -211,6 +211,7 @@
 SET(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
 
 ADD_DEFINITIONS(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
+    -DTEST_THEME_DIR=\"${THEME_BINARY_DIR}\"
     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
 )
 

Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp (122999 => 123000)


--- trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp	2012-07-18 19:26:56 UTC (rev 122999)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp	2012-07-18 19:31:24 UTC (rev 123000)
@@ -62,6 +62,8 @@
     Evas* evas = ecore_evas_get(m_ecoreEvas);
 
     m_webView = ewk_view_add(evas);
+    ewk_view_theme_set(m_webView, environment->defaultTheme());
+
     evas_object_resize(m_webView, width, height);
     evas_object_show(m_webView);
     evas_object_focus_set(m_webView, true);

Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp (122999 => 123000)


--- trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp	2012-07-18 19:26:56 UTC (rev 122999)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp	2012-07-18 19:31:24 UTC (rev 123000)
@@ -34,4 +34,9 @@
     return "file://"TEST_RESOURCES_DIR"/default_test_page.html";
 }
 
+const char* EWK2UnitTestEnvironment::defaultTheme() const
+{
+    return TEST_THEME_DIR"/default.edj";
+}
+
 } // namespace EWK2UnitTest

Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h (122999 => 123000)


--- trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h	2012-07-18 19:26:56 UTC (rev 122999)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h	2012-07-18 19:31:24 UTC (rev 123000)
@@ -29,6 +29,7 @@
 
     bool useX11Window() const { return m_useX11Window; }
     const char* defaultTestPageUrl() const;
+    const char* defaultTheme() const;
 
     virtual unsigned int defaultWidth() const { return m_defaultWidth; }
     virtual unsigned int defaultHeight() const { return m_defaultHeight; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to