Merge changes I6abbe506,Ibfd12197
[framework/uifw/elementary.git] / src / bin / test.c
index 1db1208..8d6bd19 100644 (file)
@@ -1,4 +1,5 @@
 #include <Elementary.h>
+#include "test.h"
 #ifdef HAVE_CONFIG_H
 # include "elementary_config.h"
 #endif
@@ -9,11 +10,15 @@ void test_bg_plain(void *data, Evas_Object *obj, void *event_info);
 void test_bg_image(void *data, Evas_Object *obj, void *event_info);
 void test_bg_options(void *data, Evas_Object *obj, void *event_info);
 void test_icon(void *data, Evas_Object *obj, void *event_info);
+void test_icon_transparent(void *data, Evas_Object *obj, void *event_info);
 void test_box_vert(void *data, Evas_Object *obj, void *event_info);
 void test_box_vert2(void *data, Evas_Object *obj, void *event_info);
+void test_box_pack(void *data, Evas_Object *obj, void *event_info);
 void test_box_horiz(void *data, Evas_Object *obj, void *event_info);
+void test_box_homo(void *data, Evas_Object *obj, void *event_info);
 void test_box_transition(void *data, Evas_Object *obj, void *event_info);
 void test_button(void *data, Evas_Object *obj, void *event_info);
+void test_cnp(void *data, Evas_Object *obj, void *event_info);
 void test_transit(void *data, Evas_Object *obj, void *event_info);
 void test_transit2(void *data, Evas_Object *obj, void *event_info);
 void test_transit3(void *data, Evas_Object *obj, void *event_info);
@@ -28,6 +33,7 @@ void test_fileselector_entry(void *data, Evas_Object *obj, void *event_info);
 void test_toggle(void *data, Evas_Object *obj, void *event_info);
 void test_clock(void *data, Evas_Object *obj, void *event_info);
 void test_clock2(void *data, Evas_Object *obj, void *event_info);
+void test_clock3(void *data, Evas_Object *obj, void *event_info);
 void test_check(void *data, Evas_Object *obj, void *event_info);
 void test_radio(void *data, Evas_Object *obj, void *event_info);
 void test_layout(void *data, Evas_Object *obj, void *event_info);
@@ -38,15 +44,21 @@ void test_entry_scrolled(void *data, Evas_Object *obj, void *event_info);
 void test_entry3(void *data, Evas_Object *obj, void *event_info);
 void test_entry4(void *data, Evas_Object *obj, void *event_info);
 void test_entry5(void *data, Evas_Object *obj, void *event_info);
+void test_entry6(void *data, Evas_Object *obj, void *event_info);
+void test_entry7(void *data, Evas_Object *obj, void *event_info);
+void test_entry8(void *data, Evas_Object *obj, void *event_info);
 void test_entry_notepad(void *data, Evas_Object *obj, void *event_info);
-void test_anchorview(void *data, Evas_Object *obj, void *event_info);
-void test_anchorblock(void *data, Evas_Object *obj, void *event_info);
+void test_multibuttonentry(void *data, Evas_Object *obj, void *event_info);
+void test_entry_anchor2(void *data, Evas_Object *obj, void *event_info);
+void test_entry_anchor(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar2(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar3(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar4(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar5(void *data, Evas_Object *obj, void *event_info);
 void test_toolbar6(void *data, Evas_Object *obj, void *event_info);
+void test_toolbar7(void *data, Evas_Object *obj, void *event_info);
+void test_toolbar8(void *data, Evas_Object *obj, void *event_info);
 void test_hoversel(void *data, Evas_Object *obj, void *event_info);
 void test_list(void *data, Evas_Object *obj, void *event_info);
 void test_list_horizontal(void *data, Evas_Object *obj, void *event_info);
@@ -72,19 +84,24 @@ void test_genlist9(void *data, Evas_Object *obj, void *event_info);
 void test_genlist10(void *data, Evas_Object *obj, void *event_info);
 void test_genlist11(void *data, Evas_Object *obj, void *event_info);
 void test_genlist12(void *data, Evas_Object *obj, void *event_info);
+void test_genlist13(void *data, Evas_Object *obj, void *event_info);
+void test_genlist14(void *data, Evas_Object *obj, void *event_info);
+void test_genlist15(void *data, Evas_Object *obj, void *event_info);
+void test_genlist16(void *data, Evas_Object *obj, void *event_info);
+void test_genlist17(void *data, Evas_Object *obj, void *event_info);
 void test_gesture_layer(void *data, Evas_Object *obj, void *event_info);
 void test_gesture_layer2(void *data, Evas_Object *obj, void *event_info);
+void test_gesture_layer3(void *data, Evas_Object *obj, void *event_info);
 void test_table(void *data, Evas_Object *obj, void *event_info);
 void test_table2(void *data, Evas_Object *obj, void *event_info);
 void test_table3(void *data, Evas_Object *obj, void *event_info);
 void test_table4(void *data, Evas_Object *obj, void *event_info);
 void test_table5(void *data, Evas_Object *obj, void *event_info);
 void test_table6(void *data, Evas_Object *obj, void *event_info);
+void test_table7(void *data, Evas_Object *obj, void *event_info);
 void test_gengrid(void *data, Evas_Object *obj, void *event_info);
 void test_gengrid2(void *data, Evas_Object *obj, void *event_info);
 void test_gengrid3(void *data, Evas_Object *obj, void *event_info);
-void test_pager(void *data, Evas_Object *obj, void *event_info);
-void test_pager_slide(void *data, Evas_Object *obj, void *event_info);
 void test_win_state(void *data, Evas_Object *obj, void *event_info);
 void test_win_state2(void *data, Evas_Object *obj, void *event_info);
 void test_progressbar(void *data, Evas_Object *obj, void *event_info);
@@ -115,6 +132,7 @@ void test_flip3(void *data, Evas_Object *obj, void *event_info);
 void test_flip4(void *data, Evas_Object *obj, void *event_info);
 void test_flip_page(void *data, Evas_Object *obj, void *event_info);
 void test_label(void *data, Evas_Object *obj, void *event_info);
+void test_label2(void *data, Evas_Object *obj, void *event_info);
 void test_conformant(void *data, Evas_Object *obj, void *event_info);
 void test_conformant2(void *data, Evas_Object *obj, void *event_info);
 void test_multi(void *data, Evas_Object *obj, void *event_info);
@@ -132,6 +150,7 @@ void test_cursor4(void *data, Evas_Object *obj, void *event_info);
 void test_focus(void *data, Evas_Object *obj, void *event_info);
 void test_focus2(void *data, Evas_Object *obj, void *event_info);
 void test_focus3(void *data, Evas_Object *obj, void *event_info);
+void test_focus4(void *data, Evas_Object *obj, void *event_info);
 void test_flipselector(void *data, Evas_Object *obj, void *event_info);
 void test_diskselector(void *data, Evas_Object *obj, void *event_info);
 void test_colorselector(void *data, Evas_Object *obj, void *event_info);
@@ -140,18 +159,26 @@ void test_bubble(void *data, Evas_Object *obj, void *event_info);
 void test_segment_control(void *data, Evas_Object *obj, void *event_info);
 void test_store(void *data, Evas_Object *obj, void *event_info);
 void test_win_inline(void *data, Evas_Object *obj, void *event_info);
+void test_win_socket(void *data, Evas_Object *obj, void *event_info);
+void test_win_plug(void *data, Evas_Object *obj, void *event_info);
 void test_grid(void *data, Evas_Object *obj, void *event_info);
-//// disabled for efl 1.1
-//void test_glview_simple(void *data, Evas_Object *obj, void *event_info);
-//void test_glview(void *data, Evas_Object *obj, void *event_info);
+void test_glview_simple(void *data, Evas_Object *obj, void *event_info);
+void test_glview(void *data, Evas_Object *obj, void *event_info);
 void test_3d(void *data, Evas_Object *obj, void *event_info);
 void test_naviframe(void *data, Evas_Object *obj, void *event_info);
-void test_factory(void *data, Evas_Object *obj, void *event_info);
+//void test_factory(void *data, Evas_Object *obj, void *event_info);
+void test_datetime(void *data, Evas_Object *obj, void *event_info);
+void test_popup(void *data, Evas_Object *obj, void *event_info);
+void test_dayselector(void *data, Evas_Object *obj, void *event_info);
+#ifdef HAVE_EMOTION
+void test_video(void *data, Evas_Object *obj, void *event_info);
+#endif
 #ifdef HAVE_EIO
 void test_eio(void *data, Evas_Object *obj, void *event_info);
 #endif
 #ifdef HAVE_ELEMENTARY_WEB
-void test_web(void *data, Evas_Object *obj, void *event_info);
+void test_web_normal(void *data, Evas_Object *obj, void *event_info);
+void test_web_mobile(void *data, Evas_Object *obj, void *event_info);
 #endif
 
 struct elm_test
@@ -172,7 +199,7 @@ elm_test_sort(const void *pa, const void *pb)
 }
 
 static void
-elm_test_add(Eina_List **p_list, const char *icon, const char *category, const char *name, void (*cb)(void *, Evas_Object *, void *))
+_elm_test_add(Eina_List **p_list, const char *icon, const char *category, const char *name, void (*cb)(void *, Evas_Object *, void *))
 {
    struct elm_test *t = malloc(sizeof(struct elm_test));
    t->icon = icon;
@@ -182,10 +209,9 @@ elm_test_add(Eina_List **p_list, const char *icon, const char *category, const c
    *p_list = eina_list_sorted_insert(*p_list, elm_test_sort, t);
 }
 
-static void
+void
 my_win_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
-   /* called when my_win_main is requested to be deleted */
    elm_exit(); /* exit the program's main loop that runs in elm_run() */
 }
 
@@ -193,9 +219,14 @@ static void
 _ui_tg_changed(void *data, Evas_Object *obj, void *event_info)
 {
    (void) data; (void) event_info;
-   elm_mirrored_set(elm_check_state_get(obj));
+   elm_config_mirrored_set(elm_check_state_get(obj));
 }
 
+static void
+_frame_clicked(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
+{
+   printf("frame %p is: %s\n", obj, elm_frame_collapse_get(obj) ? "collapsed" : "expanded");
+}
 
 static void
 my_win_main(char *autorun, Eina_Bool test_win_only)
@@ -204,7 +235,8 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
    Evas_Object *fr = NULL, *tg = NULL, *sc = NULL, *ic = NULL;
    Evas_Object *tbx = NULL, *cfr = NULL, *tbx2 = NULL, *bt = NULL;
    Eina_List *tests, *l;
-   struct elm_test *t;
+   struct elm_test *t = NULL;
+   void *tt;
 
    if (test_win_only) goto add_tests;
    /* Create an elm window - It returns an evas object. This is a little
@@ -232,8 +264,8 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
 
    /* Add a background to our window. This just uses the standard theme set
     * background. Without a background, you could make a window seem
-    * transparent with elm_win_alpha_set(win, 1); For example. if you have
-    * a compositor running this will make the window able to be
+    * transparent with elm_win_alpha_set(win, EINA_TRUE); For example. if you
+    * have a compositor running this will make the window able to be
     * semi-transparent and any space not filled by object/widget pixels will
     * be transparent or translucent based on alpha. If you do not have a
     * compositor running this should fall back to using shaped windows
@@ -259,27 +291,29 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
    evas_object_show(bx0);
 
    fr = elm_frame_add(win);
+   evas_object_smart_callback_add(fr, "clicked", _frame_clicked, NULL);
+   elm_frame_autocollapse_set(fr, EINA_TRUE);
    elm_object_text_set(fr, "Information");
    elm_box_pack_end(bx0, fr);
    evas_object_show(fr);
 
    lb = elm_label_add(win);
    elm_object_text_set(lb,
-                       "Please select a test from the list below<br>"
-                       "by clicking the test button to show the<br>"
-                       "test window.");
+                       "Please select a test from the list below by clicking<br/>"
+                       "the test button to show the test window.");
    elm_object_content_set(fr, lb);
    evas_object_show(lb);
 
    tg = elm_check_add(win);
    elm_object_style_set(tg, "toggle");
    elm_object_text_set(tg, "UI-Mirroring:");
-   elm_check_state_set(tg, elm_mirrored_get());
+   elm_check_state_set(tg, elm_config_mirrored_get());
    evas_object_smart_callback_add(tg, "changed", _ui_tg_changed, NULL);
    elm_box_pack_end(bx0, tg);
    evas_object_show(tg);
 
    sc = elm_scroller_add(win);
+   elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_fill_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
    elm_box_pack_end(bx0, sc);
@@ -290,11 +324,11 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
    evas_object_size_hint_align_set(tbx, EVAS_HINT_FILL, 0.0);
    elm_object_content_set(sc, tbx);
    evas_object_show(tbx);
-   
+
 add_tests:
    tests = NULL;
-#define ADD_TEST(icon_, cat_, name_, cb_) elm_test_add(&tests, icon_, cat_, name_, cb_)
-   
+#define ADD_TEST(icon_, cat_, name_, cb_) _elm_test_add(&tests, icon_, cat_, name_, cb_)
+
    //------------------------------//
    ADD_TEST(NULL, "Window / Background", "Bg Plain", test_bg_plain);
    ADD_TEST(NULL, "Window / Background", "Bg Image", test_bg_image);
@@ -304,19 +338,27 @@ add_tests:
    ADD_TEST(NULL, "Window / Background", "Inwin", test_inwin);
    ADD_TEST(NULL, "Window / Background", "Inwin 2", test_inwin2);
    ADD_TEST(NULL, "Window / Background", "Window Inline", test_win_inline);
-   
+   ADD_TEST(NULL, "Window / Background", "Window Socket", test_win_socket);
+   ADD_TEST(NULL, "Window / Background", "Window Plug", test_win_plug);
+
    //------------------------------//
-   ADD_TEST(NULL, "Images", "Icon Transparent", test_icon);
+   ADD_TEST(NULL, "Images", "Icon", test_icon);
+   ADD_TEST(NULL, "Images", "Icon Transparent", test_icon_transparent);
    ADD_TEST(NULL, "Images", "Icon Animation", test_icon_animated);
    ADD_TEST(NULL, "Images", "Photocam", test_photocam);
    ADD_TEST(NULL, "Images", "Photo", test_photo);
    ADD_TEST(NULL, "Images", "Thumb", test_thumb);
    ADD_TEST(NULL, "Images", "Slideshow", test_slideshow);
-   
+#ifdef HAVE_EMOTION
+   ADD_TEST(NULL, "Images", "Video", test_video);
+#endif
+
    //------------------------------//
    ADD_TEST(NULL, "Containers", "Box Vert", test_box_vert);
    ADD_TEST(NULL, "Containers", "Box Vert 2", test_box_vert2);
+   ADD_TEST(NULL, "Containers", "Box Pack", test_box_pack);
    ADD_TEST(NULL, "Containers", "Box Horiz", test_box_horiz);
+   ADD_TEST(NULL, "Containers", "Box Homogeneous", test_box_homo);
    ADD_TEST(NULL, "Containers", "Box Transition", test_box_transition);
    ADD_TEST(NULL, "Containers", "Table", test_table);
    ADD_TEST(NULL, "Containers", "Table Homogeneous", test_table2);
@@ -324,20 +366,27 @@ add_tests:
    ADD_TEST(NULL, "Containers", "Table 4", test_table4);
    ADD_TEST(NULL, "Containers", "Table 5", test_table5);
    ADD_TEST(NULL, "Containers", "Table 6", test_table6);
+   ADD_TEST(NULL, "Containers", "Table 7", test_table7);
    ADD_TEST(NULL, "Containers", "Layout", test_layout);
    ADD_TEST(NULL, "Containers", "Grid", test_grid);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Entries", "Entry", test_entry);
    ADD_TEST(NULL, "Entries", "Entry Scrolled", test_entry_scrolled);
    ADD_TEST(NULL, "Entries", "Entry 3", test_entry3);
    ADD_TEST(NULL, "Entries", "Entry 4", test_entry4);
    ADD_TEST(NULL, "Entries", "Entry 5", test_entry5);
+   ADD_TEST(NULL, "Entries", "Entry 6", test_entry6);
+   ADD_TEST(NULL, "Entries", "Entry 7", test_entry7);
+   ADD_TEST(NULL, "Entries", "Entry 8", test_entry8);
    ADD_TEST(NULL, "Entries", "Entry Notepad", test_entry_notepad);
-   
+   ADD_TEST(NULL, "Entries", "Multibuttonentry", test_multibuttonentry);
+   ADD_TEST(NULL, "Entries", "Entry Anchor", test_entry_anchor);
+   ADD_TEST(NULL, "Entries", "Entry Anchor2", test_entry_anchor2);
+
    //------------------------------//
    ADD_TEST(NULL, "Buttons", "Buttons", test_button);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Effects", "Transit", test_transit);
    ADD_TEST(NULL, "Effects", "Transit 2", test_transit2);
@@ -354,7 +403,7 @@ add_tests:
    ADD_TEST(NULL, "Effects", "Flip Interactive", test_flip4);
    ADD_TEST(NULL, "Effects", "Flip Page", test_flip_page);
    ADD_TEST(NULL, "Effects", "Animation", test_anim);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Toolbars", "Toolbar", test_toolbar);
    ADD_TEST(NULL, "Toolbars", "Toolbar 2", test_toolbar2);
@@ -362,7 +411,9 @@ add_tests:
    ADD_TEST(NULL, "Toolbars", "Toolbar 4", test_toolbar4);
    ADD_TEST(NULL, "Toolbars", "Toolbar 5", test_toolbar5);
    ADD_TEST(NULL, "Toolbars", "Toolbar 6", test_toolbar6);
-   
+   ADD_TEST(NULL, "Toolbars", "Toolbar 7", test_toolbar7);
+   ADD_TEST(NULL, "Toolbars", "Toolbar 8", test_toolbar8);
+
    //------------------------------//
    ADD_TEST(NULL, "Lists", "List", test_list);
    ADD_TEST(NULL, "Lists", "List - Horizontal", test_list_horizontal);
@@ -385,28 +436,34 @@ add_tests:
    ADD_TEST(NULL, "Lists", "Genlist Eio", test_eio);
 #endif
    ADD_TEST(NULL, "Lists", "Genlist Textblock", test_genlist12);
+   ADD_TEST(NULL, "Lists", "Genlist Tree, Insert Sorted", test_genlist13);
+   ADD_TEST(NULL, "Lists", "Genlist Tree, Insert Relative", test_genlist14);
+   ADD_TEST(NULL, "Lists", "Genlist Edit Mode", test_genlist15);
+   ADD_TEST(NULL, "Lists", "Genlist Flip Mode", test_genlist16);
+   ADD_TEST(NULL, "Lists", "Genlist Tree Effect", test_genlist17);
    ADD_TEST(NULL, "Lists", "GenGrid", test_gengrid);
    ADD_TEST(NULL, "Lists", "GenGrid 2", test_gengrid2);
    ADD_TEST(NULL, "Lists", "GenGrid Group", test_gengrid3);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "General", "Scaling", test_scaling);
    ADD_TEST(NULL, "General", "Scaling 2", test_scaling2);
-   
+
    //------------------------------//
-//// disabled for efl 1.1   
-//   ADD_TEST(NULL, "3D", "GLViewSimple", test_glview_simple);
-//   ADD_TEST(NULL, "3D", "GLView", test_glview);
+   ADD_TEST(NULL, "3D", "GLViewSimple", test_glview_simple);
+   ADD_TEST(NULL, "3D", "GLView", test_glview);
    ADD_TEST(NULL, "3D", "Evas Map 3D", test_3d);
-   
+
    //------------------------------//
 #ifdef HAVE_ELEMENTARY_WEB
-   ADD_TEST(NULL, "Web", "Web", test_web);
+   ADD_TEST(NULL, "Web", "Web", test_web_normal);
+   ADD_TEST(NULL, "Web", "Web-mobile", test_web_mobile);
 #endif
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Input", "Gesture Layer", test_gesture_layer);
    ADD_TEST(NULL, "Input", "Gesture Layer 2", test_gesture_layer2);
+   ADD_TEST(NULL, "Input", "Gesture Layer 3", test_gesture_layer3);
    ADD_TEST(NULL, "Input", "Multi Touch", test_multi);
 
    //------------------------------//
@@ -423,13 +480,14 @@ add_tests:
    ADD_TEST(NULL, "Selectors", "Hoversel", test_hoversel);
    ADD_TEST(NULL, "Selectors", "Radios", test_radio);
    ADD_TEST(NULL, "Selectors", "Flip Selector", test_flipselector);
+   ADD_TEST(NULL, "Selectors", "Dayselector", test_dayselector);
 
    //------------------------------//
    ADD_TEST(NULL, "Cursors", "Cursor", test_cursor);
    ADD_TEST(NULL, "Cursors", "Cursor 2", test_cursor2);
    ADD_TEST(NULL, "Cursors", "Cursor 3", test_cursor3);
    ADD_TEST(NULL, "Cursors", "Cursor Layout", test_cursor4);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Scroller", "Scroller", test_scroller);
    ADD_TEST(NULL, "Scroller", "Scroller 2", test_scroller2);
@@ -454,33 +512,34 @@ add_tests:
    ADD_TEST(NULL, "Popups", "Hover 2", test_hover2);
    ADD_TEST(NULL, "Popups", "Notify", test_notify);
    ADD_TEST(NULL, "Popups", "Tooltip", test_tooltip);
-   ADD_TEST(NULL, "Popups", "Tooltip2", test_tooltip2);
+   ADD_TEST(NULL, "Popups", "Tooltip 2", test_tooltip2);
+   ADD_TEST(NULL, "Popups", "Popup", test_popup);
 
    //------------------------------//
    ADD_TEST(NULL, "Times & Dates", "Calendar", test_calendar);
    ADD_TEST(NULL, "Times & Dates", "Calendar 2", test_calendar2);
    ADD_TEST(NULL, "Times & Dates", "Clock", test_clock);
    ADD_TEST(NULL, "Times & Dates", "Clock 2", test_clock2);
-   
+   ADD_TEST(NULL, "Times & Dates", "Clock 3", test_clock3);
+   ADD_TEST(NULL, "Times & Dates", "Datetime", test_datetime);
+
    //------------------------------//
-   ADD_TEST(NULL, "Text", "Anchorview", test_anchorview);
-   ADD_TEST(NULL, "Text", "Anchorblock", test_anchorblock);
    ADD_TEST(NULL, "Text", "Label", test_label);
-   
+   ADD_TEST(NULL, "Text", "Label2", test_label2);
+
    //------------------------------//
    ADD_TEST(NULL, "Stored Surface Buffer", "Launcher", test_launcher);
    ADD_TEST(NULL, "Stored Surface Buffer", "Launcher 2", test_launcher2);
    ADD_TEST(NULL, "Stored Surface Buffer", "Launcher 3", test_launcher3);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Focus", "Focus", test_focus);
    ADD_TEST(NULL, "Focus", "Focus 2", test_focus2);
    ADD_TEST(NULL, "Focus", "Focus 3", test_focus3);
+   ADD_TEST(NULL, "Focus", "Focus 4", test_focus4);
 
    //------------------------------//
    ADD_TEST(NULL, "Storyboard", "Naviframe", test_naviframe);
-   ADD_TEST(NULL, "Storyboard", "Pager", test_pager);
-   ADD_TEST(NULL, "Storyboard", "Pager Slide", test_pager_slide);
 
    //------------------------------//
    ADD_TEST(NULL, "Geographic", "Map", test_map);
@@ -488,16 +547,17 @@ add_tests:
    //------------------------------//
    ADD_TEST(NULL, "Dividers", "Panel", test_panel);
    ADD_TEST(NULL, "Dividers", "Panes", test_panes);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Standardization", "Conformant", test_conformant);
    ADD_TEST(NULL, "Standardization", "Conformant 2", test_conformant2);
-   
+
    //------------------------------//
    ADD_TEST(NULL, "Helpers", "Store", test_store);
-   ADD_TEST(NULL, "Helpers", "Factory", test_factory);
-   
+//   ADD_TEST(NULL, "Helpers", "Factory", test_factory);
+
    //------------------------------//
+   ADD_TEST(NULL, "Micellaneous", "Copy And Paste", test_cnp);
    ADD_TEST(NULL, "Micellaneous", "Weather", test_weather);
    ADD_TEST(NULL, "Micellaneous", "Icon Desktops", test_icon_desktops);
    ADD_TEST(NULL, "Micellaneous", "Floating Objects", test_floating);
@@ -506,30 +566,45 @@ add_tests:
 
    if (autorun)
      {
+        size_t alen = strlen(autorun);
         EINA_LIST_FOREACH(tests, l, t)
-          if ((t->name) && (t->cb) && (!strcasecmp(t->name, autorun)))
-            t->cb(NULL, NULL, NULL);
+          {
+             if ((t->name) && (t->cb) && (!strncasecmp(t->name, autorun, alen)))
+               {
+                  t->cb(NULL, NULL, NULL);
+                  break;
+               }
+          }
 
      }
+   tt = t;
+
+   if (test_win_only)
+     {
+        EINA_LIST_FREE(tests, t)
+           free (t);
 
-   if (test_win_only) return;
+        return;
+     }
 
    if (tests)
      {
         const char *pcat = NULL;
-        
+
         EINA_LIST_FREE(tests, t)
           {
              if ((!pcat) || (strcmp(pcat, t->category)))
                {
                   cfr = elm_frame_add(win);
                   // FIXME: add new style of frame for this
+                  evas_object_smart_callback_add(cfr, "clicked", _frame_clicked, NULL);
+                  elm_frame_autocollapse_set(cfr, EINA_TRUE);
                   elm_object_text_set(cfr, t->category);
                   evas_object_size_hint_weight_set(cfr, EVAS_HINT_EXPAND, 0.0);
                   evas_object_size_hint_fill_set(cfr, EVAS_HINT_FILL, 0.0);
                   elm_box_pack_end(tbx, cfr);
                   evas_object_show(cfr);
-                  
+
                   tbx2 = elm_box_add(win);
                   elm_box_layout_set(tbx2, evas_object_box_layout_flow_horizontal, NULL, NULL);
                   evas_object_size_hint_weight_set(tbx2, EVAS_HINT_EXPAND, 0.0);
@@ -544,7 +619,7 @@ add_tests:
              if (t->icon)
                {
                   char buf[PATH_MAX];
-                  
+
                   ic = elm_icon_add(win);
                   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), t->icon);
                   elm_icon_file_set(ic, buf, NULL);
@@ -555,6 +630,7 @@ add_tests:
              evas_object_show(bt);
              evas_object_smart_callback_add(bt, "clicked", t->cb, NULL);
              pcat = t->category;
+             if (t == tt) tt = cfr;
              free(t);
           }
      }
@@ -563,12 +639,21 @@ add_tests:
    evas_object_resize(win, 480, 480);
    /* show the window */
    if (!test_win_only)
-     evas_object_show(win);
+     {
+        evas_object_show(win);
+        /* bring in autorun frame */
+        if (autorun)
+          {
+             Evas_Coord x, y;
+             evas_object_geometry_get(tt, &x, &y, NULL, NULL);
+             elm_scroller_region_bring_in(sc, x, y, 0, 0);
+          }
+     }
 }
 
 /* this is your elementary main function - it MUST be called IMMEDIATELY
  * after elm_init() and MUST be passed argc and argv, and MUST be called
- * elm_main and not be static - must be a visible symbol with EAPI infront */
+ * elm_main and not be static - must be a visible symbol with EAPI_MAIN infront */
 EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
@@ -601,7 +686,7 @@ elm_main(int argc, char **argv)
 
    /* put here any init specific to this app like parsing args etc. */
    my_win_main(autorun, test_win_only); /* create main window */
-   elm_run(); /* and run the program now  and handle all events etc. */
+   elm_run(); /* and run the program now and handle all events etc. */
    /* if the mainloop that elm_run() runs exist - we exit the app */
    elm_shutdown(); /* clean up and shut down */
    /* exit code */