Title: [152838] trunk/Source/WebKit2
Revision
152838
Author
[email protected]
Date
2013-07-18 01:28:55 -0700 (Thu, 18 Jul 2013)

Log Message

[EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_color_picker.cpp
https://bugs.webkit.org/show_bug.cgi?id=118797

Patch by Dong-Gwan Kim <[email protected]> on 2013-07-18
Reviewed by Christophe Dumez.

Some mouseClick methods are used in test_ewk2_color_picker.cpp.
But it is difficult to understand what they mean.
So i would like to replace those with more meaningful method for readability.

* UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
(EWK2ColorPickerTest::clickButton):
(TEST_F):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (152837 => 152838)


--- trunk/Source/WebKit2/ChangeLog	2013-07-18 08:05:05 UTC (rev 152837)
+++ trunk/Source/WebKit2/ChangeLog	2013-07-18 08:28:55 UTC (rev 152838)
@@ -1,3 +1,18 @@
+2013-07-18  Dong-Gwan Kim  <[email protected]>
+
+        [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_color_picker.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=118797
+
+        Reviewed by Christophe Dumez.
+
+        Some mouseClick methods are used in test_ewk2_color_picker.cpp.
+        But it is difficult to understand what they mean.
+        So i would like to replace those with more meaningful method for readability.
+
+        * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
+        (EWK2ColorPickerTest::clickButton):
+        (TEST_F):
+
 2013-07-18  Eunmi Lee  <[email protected]>
 
         [WK2] Replace getRect() to pixelSnappedBoundingBox().

Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_color_picker.cpp (152837 => 152838)


--- trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_color_picker.cpp	2013-07-18 08:05:05 UTC (rev 152837)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_color_picker.cpp	2013-07-18 08:28:55 UTC (rev 152838)
@@ -107,6 +107,21 @@
         s_isColorPickerShown = false;
         evas_object_smart_callback_call(smartData->self, "input,type,color,request", 0);
     }
+
+protected:
+    enum Button { ShowColorPickerButton, HideColorPickerButton };
+
+    void clickButton(Button button)
+    {
+        switch (button) {
+        case ShowColorPickerButton:
+            mouseClick(30, 20);
+            break;
+        case HideColorPickerButton:
+            mouseClick(80, 20);
+            break;
+        }
+    }
 };
 
 TEST_F(EWK2ColorPickerTest, ewk_color_picker_color_set)
@@ -136,24 +151,21 @@
     ewk_view_html_string_load(webView(), colorPickerHTML, 0, 0);
     waitUntilLoadFinished();
 
-    // 1. Click input element to show color picker.
-    mouseClick(30, 20);
+    clickButton(ShowColorPickerButton);
 
     bool handled = false;
     evas_object_smart_callback_add(webView(), "input,type,color,request", onColorPickerDone, &handled);
     while (!handled)
         ecore_main_loop_iterate();
 
-    // 6. Click input element to show color picker again.
-    mouseClick(30, 20);
+    clickButton(ShowColorPickerButton);
 
     handled = false;
     while (!handled)
         ecore_main_loop_iterate();
 
-    // 8. Click button to remove input element durlng color picker is shown.
     api->input_picker_color_dismiss = hideColorPickerByRemovingElement;
-    mouseClick(80, 20);
+    clickButton(HideColorPickerButton);
 
     handled = false;
     while (!handled)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to