Title: [173621] trunk/Tools
Revision
173621
Author
[email protected]
Date
2014-09-15 07:45:33 -0700 (Mon, 15 Sep 2014)

Log Message

[EFL] Ecore and Eina are initialized twice in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=136822

Reviewed by Gyuyoung Kim.

In TestWebKitAPI/efl/main.cpp, ecore and eina modules are unnecessarily
initialized as we already does it in PlatformWebView::PlatformWebView
calling ewk_init(). The reason for that was to ensure testing for example,
WTF where creating the view is not mandatory.

Call ewk_init() and ewk_shutdown() in TestWebKitAPI/efl/main.cpp
in order to properly initalize and release EWebKit.

* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/efl/PlatformWebView.cpp:
(TestWebKitAPI::PlatformWebView::PlatformWebView):
(TestWebKitAPI::PlatformWebView::~PlatformWebView):
* TestWebKitAPI/efl/main.cpp:
(main):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (173620 => 173621)


--- trunk/Tools/ChangeLog	2014-09-15 14:20:46 UTC (rev 173620)
+++ trunk/Tools/ChangeLog	2014-09-15 14:45:33 UTC (rev 173621)
@@ -1,3 +1,25 @@
+2014-09-15  Grzegorz Czajkowski  <[email protected]>
+
+        [EFL] Ecore and Eina are initialized twice in TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=136822
+
+        Reviewed by Gyuyoung Kim.
+
+        In TestWebKitAPI/efl/main.cpp, ecore and eina modules are unnecessarily
+        initialized as we already does it in PlatformWebView::PlatformWebView
+        calling ewk_init(). The reason for that was to ensure testing for example,
+        WTF where creating the view is not mandatory.
+
+        Call ewk_init() and ewk_shutdown() in TestWebKitAPI/efl/main.cpp
+        in order to properly initalize and release EWebKit.
+
+        * TestWebKitAPI/PlatformEfl.cmake:
+        * TestWebKitAPI/efl/PlatformWebView.cpp:
+        (TestWebKitAPI::PlatformWebView::PlatformWebView):
+        (TestWebKitAPI::PlatformWebView::~PlatformWebView):
+        * TestWebKitAPI/efl/main.cpp:
+        (main):
+
 2014-09-15  [email protected]  <[email protected]>
 
         [WinCairo] Make it easier to enable/disable GStreamer.

Modified: trunk/Tools/TestWebKitAPI/PlatformEfl.cmake (173620 => 173621)


--- trunk/Tools/TestWebKitAPI/PlatformEfl.cmake	2014-09-15 14:20:46 UTC (rev 173620)
+++ trunk/Tools/TestWebKitAPI/PlatformEfl.cmake	2014-09-15 14:45:33 UTC (rev 173621)
@@ -36,9 +36,16 @@
     ${TESTWEBKITAPI_DIR}/efl/PlatformWebView.cpp
 )
 
+list(APPEND test_wtf_LIBRARIES
+    WebKit2
+)
+
+list(APPEND test_webcore_LIBRARIES
+    WebKit2
+)
+
 list(APPEND TestJavaScriptCore_LIBRARIES
-    ${ECORE_LIBRARIES}
-    ${EINA_LIBRARIES}
+    WebKit2
 )
 
 # The list below works like a test expectation. Tests in the

Modified: trunk/Tools/TestWebKitAPI/efl/PlatformWebView.cpp (173620 => 173621)


--- trunk/Tools/TestWebKitAPI/efl/PlatformWebView.cpp	2014-09-15 14:20:46 UTC (rev 173620)
+++ trunk/Tools/TestWebKitAPI/efl/PlatformWebView.cpp	2014-09-15 14:45:33 UTC (rev 173621)
@@ -66,7 +66,6 @@
 
 PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
 {
-    ewk_init();
     m_window = createEcoreEvas();
 
     m_view = EWKViewCreate(contextRef, pageGroupRef, ecore_evas_get(m_window), /* smart */ 0);
@@ -83,7 +82,6 @@
     evas_object_del(m_view);
 
     ecore_evas_free(m_window);
-    ewk_shutdown();
 }
 
 void PlatformWebView::resizeTo(unsigned width, unsigned height)

Modified: trunk/Tools/TestWebKitAPI/efl/main.cpp (173620 => 173621)


--- trunk/Tools/TestWebKitAPI/efl/main.cpp	2014-09-15 14:20:46 UTC (rev 173620)
+++ trunk/Tools/TestWebKitAPI/efl/main.cpp	2014-09-15 14:45:33 UTC (rev 173621)
@@ -26,9 +26,8 @@
 
 #include "config.h"
 #include "TestsController.h"
-#include <Ecore.h>
-#include <Eina.h>
 #include <getopt.h>
+#include <EWebKit2.h>
 #include <wtf/Assertions.h>
 
 bool useX11Window = false;
@@ -52,18 +51,14 @@
     WTFInstallReportBacktraceOnCrashHook();
     setenv("WEBKIT_EXEC_PATH", WEBKIT_EXEC_PATH, false);
 
-    if (!eina_init())
+    if (!ewk_init())
         return EXIT_FAILURE;
 
-    if (!ecore_init())
-        return EXIT_FAILURE;
-
     useX11Window = checkForUseX11WindowArgument(argc, argv);
 
     int returnCode = TestWebKitAPI::TestsController::shared().run(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE;
 
-    ecore_shutdown();
-    eina_shutdown();
+    ewk_shutdown();
 
     return returnCode;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to