[EFL][WK2] Add support for PlatformWebView::simulateRightClick() in TestWebKitAPI
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2012 09:45:52 +0000 (09:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2012 09:45:52 +0000 (09:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103634

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2012-11-30
Reviewed by Gyuyoung Kim.

Add support for PlatformWebView::simulateRightClick() and enable
WebKit2 API test HitTestResultNodeHandle.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136217 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/PlatformEfl.cmake
Tools/TestWebKitAPI/efl/PlatformWebView.cpp

index 639c94f..246da42 100644 (file)
@@ -1,3 +1,18 @@
+2012-11-30  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
+
+        [EFL][WK2] Add support for PlatformWebView::simulateRightClick() in TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=103634
+
+        Reviewed by Gyuyoung Kim.
+
+        Add support for PlatformWebView::simulateRightClick() and enable
+        WebKit2 API test HitTestResultNodeHandle.
+
+        * TestWebKitAPI/PlatformEfl.cmake:
+        * TestWebKitAPI/efl/PlatformWebView.cpp:
+        (TestWebKitAPI::PlatformWebView::simulateRightClick):
+        (TestWebKitAPI):
+
 2012-11-30  Mihai Maerean  <mmaerean@adobe.com>
 
         [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
index e301968..b1aa579 100644 (file)
@@ -55,6 +55,7 @@ SET(test_webkit2_api_BINARIES
     FrameMIMETypeHTML
     FrameMIMETypePNG
     GetInjectedBundleInitializationUserDataCallback
+    HitTestResultNodeHandle
     InjectedBundleBasic
     InjectedBundleInitializationUserDataCallbackWins
     LoadAlternateHTMLStringWithNonDirectoryURL
@@ -90,7 +91,6 @@ ADD_DEFINITIONS(-DTHEME_DIR="${THEME_BINARY_DIR}")
 
 # Tests disabled because of missing features on the test harness:
 #
-#   HitTestResultNodeHandle
 #   ResponsivenessTimerDoesntFireEarly
 #   SpacebarScrolling
 #
index cdc97bd..08407c6 100644 (file)
@@ -102,4 +102,13 @@ void PlatformWebView::simulateMouseMove(unsigned x, unsigned y)
     evas_event_feed_mouse_move(evas, x, y, 0, 0);
 }
 
+void PlatformWebView::simulateRightClick(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);
+    evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, 0);
+    evas_event_feed_mouse_up(evas, 3, EVAS_BUTTON_NONE, 0, 0);
+}
+
 } // namespace TestWebKitAPI