Title: [136117] trunk/Tools
Revision
136117
Author
[email protected]
Date
2012-11-29 03:03:35 -0800 (Thu, 29 Nov 2012)

Log Message

[EFL][WK2] Add support for PlatformWebView::simulateMouseMove() in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=103252

Patch by Sudarsana Nagineni <[email protected]> on 2012-11-29
Reviewed by Kenneth Rohde Christiansen.

Add support for PlatformWebView::simulateMouseMove() and enable
WebKit2 API test MouseMoveAfterCrash.

* TestWebKitAPI/PlatformEfl.cmake: Enable MouseMoveAfterCrash API
test.
* TestWebKitAPI/efl/PlatformWebView.cpp:
(TestWebKitAPI::onWebProcessCrashed): Handle 'webprocess,crashed' signal
to prevent loading an error page since the test case is reloading actual
page after web process has terminated and recovered.
(TestWebKitAPI):
(TestWebKitAPI::PlatformWebView::PlatformWebView):
(TestWebKitAPI::PlatformWebView::simulateMouseMove): Implemented.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (136116 => 136117)


--- trunk/Tools/ChangeLog	2012-11-29 10:56:42 UTC (rev 136116)
+++ trunk/Tools/ChangeLog	2012-11-29 11:03:35 UTC (rev 136117)
@@ -1,3 +1,23 @@
+2012-11-29  Sudarsana Nagineni  <[email protected]>
+
+        [EFL][WK2] Add support for PlatformWebView::simulateMouseMove() in TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=103252
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add support for PlatformWebView::simulateMouseMove() and enable
+        WebKit2 API test MouseMoveAfterCrash.
+
+        * TestWebKitAPI/PlatformEfl.cmake: Enable MouseMoveAfterCrash API
+        test.
+        * TestWebKitAPI/efl/PlatformWebView.cpp:
+        (TestWebKitAPI::onWebProcessCrashed): Handle 'webprocess,crashed' signal
+        to prevent loading an error page since the test case is reloading actual
+        page after web process has terminated and recovered.
+        (TestWebKitAPI):
+        (TestWebKitAPI::PlatformWebView::PlatformWebView):
+        (TestWebKitAPI::PlatformWebView::simulateMouseMove): Implemented.
+
 2012-11-29  Andras Becsi  <[email protected]>
 
         [Qt] Fix installation of QtWebProcess binary

Modified: trunk/Tools/TestWebKitAPI/PlatformEfl.cmake (136116 => 136117)


--- trunk/Tools/TestWebKitAPI/PlatformEfl.cmake	2012-11-29 10:56:42 UTC (rev 136116)
+++ trunk/Tools/TestWebKitAPI/PlatformEfl.cmake	2012-11-29 11:03:35 UTC (rev 136117)
@@ -59,6 +59,7 @@
     InjectedBundleInitializationUserDataCallbackWins
     LoadAlternateHTMLStringWithNonDirectoryURL
     LoadCanceledNoServerRedirectCallback
+    MouseMoveAfterCrash
     NewFirstVisuallyNonEmptyLayout
     NewFirstVisuallyNonEmptyLayoutFails
     PageLoadBasic
@@ -90,7 +91,6 @@
 # Tests disabled because of missing features on the test harness:
 #
 #   HitTestResultNodeHandle
-#   MouseMoveAfterCrash
 #   ResponsivenessTimerDoesntFireEarly
 #   SpacebarScrolling
 #

Modified: trunk/Tools/TestWebKitAPI/efl/PlatformWebView.cpp (136116 => 136117)


--- trunk/Tools/TestWebKitAPI/efl/PlatformWebView.cpp	2012-11-29 10:56:42 UTC (rev 136116)
+++ trunk/Tools/TestWebKitAPI/efl/PlatformWebView.cpp	2012-11-29 11:03:35 UTC (rev 136117)
@@ -54,12 +54,19 @@
     return ecoreEvas;
 }
 
+static void onWebProcessCrashed(void*, Evas_Object*, void* eventInfo)
+{
+    bool* handled = static_cast<bool*>(eventInfo);
+    *handled = true;
+}
+
 PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
 {
     m_window = initEcoreEvas();
     Evas* evas = ecore_evas_get(m_window);
     m_view = toImpl(WKViewCreate(evas, contextRef, pageGroupRef));
     ewk_view_theme_set(m_view, THEME_DIR"/default.edj");
+    evas_object_smart_callback_add(m_view, "webprocess,crashed", onWebProcessCrashed, 0);
     resizeTo(600, 800);
 }
 
@@ -88,4 +95,11 @@
     evas_event_feed_key_up(evas, "space", "space", " ", 0, 1, 0);
 }
 
+void PlatformWebView::simulateMouseMove(unsigned x, unsigned y)
+{
+    Evas* evas = ecore_evas_get(m_window);
+    evas_object_show(m_view);
+    evas_event_feed_mouse_move(evas, x, y, 0, 0);
+}
+
 } // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to