[maemo-commits] [maemo-commits] r10708 - in projects/haf/trunk/hail: . ut
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Mar 21 17:59:17 EET 2007
- Previous message: [maemo-commits] r10707 - in projects/haf/trunk/hildon-desktop: . data
- Next message: [maemo-commits] r10709 - in projects/haf/trunk/hildon-desktop: . libhildonwm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: fherrera Date: 2007-03-21 17:59:12 +0200 (Wed, 21 Mar 2007) New Revision: 10708 Removed: projects/haf/trunk/hail/ut/haildialog_tests.c projects/haf/trunk/hail/ut/hailgrid_tests.c Modified: projects/haf/trunk/hail/ChangeLog projects/haf/trunk/hail/ut/Makefile.am projects/haf/trunk/hail/ut/hail_tests.c projects/haf/trunk/hail/ut/hail_tests.h projects/haf/trunk/hail/ut/hailbanner_tests.c projects/haf/trunk/hail/ut/hailcaption_tests.c projects/haf/trunk/hail/ut/hailcodedialog_tests.c projects/haf/trunk/hail/ut/hailcolorbutton_tests.c projects/haf/trunk/hail/ut/hailcolorselector_tests.c projects/haf/trunk/hail/ut/hailcontrolbar_tests.c projects/haf/trunk/hail/ut/haildateeditor_tests.c projects/haf/trunk/hail/ut/haildialogs_tests.c projects/haf/trunk/hail/ut/hailfileselection_tests.c projects/haf/trunk/hail/ut/hailfindtoolbar_tests.c projects/haf/trunk/hail/ut/hailnumbereditor_tests.c projects/haf/trunk/hail/ut/hailrangeeditor_tests.c projects/haf/trunk/hail/ut/hailseekbar_tests.c projects/haf/trunk/hail/ut/hailtimeeditor_tests.c projects/haf/trunk/hail/ut/hailtimepicker_tests.c projects/haf/trunk/hail/ut/hailvolumebar_tests.c projects/haf/trunk/hail/ut/hailweekdaypicker_tests.c projects/haf/trunk/hail/ut/hailwindow_tests.c projects/haf/trunk/hail/ut/hailwizarddialog_tests.c Log: Migrated unit testing Modified: projects/haf/trunk/hail/ChangeLog =================================================================== --- projects/haf/trunk/hail/ChangeLog 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ChangeLog 2007-03-21 15:59:12 UTC (rev 10708) @@ -1,5 +1,33 @@ 2007-03-21 Fernando Herrera <fernando.herrera-de-las-heras at nokia.com> + * ut/Makefile.am: + * ut/hail_tests.c: + * ut/hail_tests.h: + * ut/hailbanner_tests.c: + * ut/hailcaption_tests.c: + * ut/hailcodedialog_tests.c: + * ut/hailcolorbutton_tests.c: (test_color_button_change_colors): + * ut/hailcolorselector_tests.c: + * ut/hailcontrolbar_tests.c: + * ut/haildateeditor_tests.c: + * ut/haildialog_tests.c: + * ut/haildialogs_tests.c: + (test_name_and_password_dialog_get_accessibles): + * ut/hailfileselection_tests.c: + * ut/hailfindtoolbar_tests.c: + * ut/hailgrid_tests.c: + * ut/hailnumbereditor_tests.c: + * ut/hailrangeeditor_tests.c: + * ut/hailseekbar_tests.c: + * ut/hailtimeeditor_tests.c: + * ut/hailtimepicker_tests.c: + * ut/hailvolumebar_tests.c: + * ut/hailweekdaypicker_tests.c: + * ut/hailwindow_tests.c: + * ut/hailwizarddialog_tests.c: Migrated tests + +2007-03-21 Fernando Herrera <fernando.herrera-de-las-heras at nokia.com> + * configure.in: * hail/Makefile.am: * hail/hail.c: (hail_accessibility_module_init): Modified: projects/haf/trunk/hail/ut/Makefile.am =================================================================== --- projects/haf/trunk/hail/ut/Makefile.am 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/Makefile.am 2007-03-21 15:59:12 UTC (rev 10708) @@ -11,12 +11,9 @@ hailcontrolbar_tests.c \ hailweekdaypicker_tests.c \ hailfileselection_tests.c \ - haildialog_tests.c \ hailtimepicker_tests.c \ hailcolorbutton_tests.c \ - hailcolorselector_tests.c \ haildialogs_tests.c \ - hailgrid_tests.c \ haildateeditor_tests.c \ hailnumbereditor_tests.c \ hailtimeeditor_tests.c \ @@ -26,4 +23,8 @@ hailcodedialog_tests.c \ hail_tests_utils.c \ hail_tests.c + +#TODO +#hailcolorselector_tests.c + libhail_unittests_la_LIBADD = @DEP_LIBS@ $(top_builddir)/hail/libhail.la Modified: projects/haf/trunk/hail/ut/hail_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hail_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hail_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -58,18 +58,6 @@ {*test_caption_required_state, "test_caption_required_state: check the behaviour of _required_ state", EXPECT_OK}, {*test_caption_component, "test_caption_component: test caption component embedding behaviour", EXPECT_OK}, {*test_caption_image, "test_caption_image: test caption component embedded image properties", EXPECT_OK}, - {*test_app_view_get_accessible, "test_app_view_get_accessible: get accessible object for hildon app view", EXPECT_OK}, - {*test_app_view_get_children, "test_app_view_get_children: expected number of children for app view", EXPECT_OK}, - {*test_app_view_get_bin, "test_app_view_get_bin: get child control of the app view", EXPECT_OK}, - {*test_app_view_get_toolbars, "test_app_view_get_toolbars: get container of the toolbars of the app view", EXPECT_OK}, - {*test_app_view_get_menu, "test_app_view_get_menu: get menu of the app view", EXPECT_OK}, - {*test_app_view_fullscreen_actions, "test_app_view_fullscreen_actions: test that the full screen actions work as expected", EXPECT_OK}, - {*test_app_view_get_role, "test_app_view_get_role: HildonAppView role should be frame", EXPECT_OK}, - {*test_app_get_accessible, "test_app_get_accessible: get accessible object for hildon app view", EXPECT_OK}, - {*test_app_get_children, "test_app_get_children: expected number of children for app", EXPECT_OK}, - {*test_app_get_name, "test_app_get_set_name: check that title and accessible name are sync", EXPECT_OK}, - {*test_app_children_changed, "test_app_children_changed: check that the children is changed correctly, and that the signal handler was called", EXPECT_OK}, - {*test_app_role, "test_app_role: check that the role is ATK_ROLE_FRAME", EXPECT_OK}, {*test_window_get_accessible, "test_window_get_accessible: get accessible object for hildon app view", EXPECT_OK}, {*test_window_get_children, "test_window_get_children: expected number of children for app view", EXPECT_OK}, {*test_window_get_bin, "test_window_get_bin: get child control of the app view", EXPECT_OK}, @@ -115,10 +103,6 @@ {*test_information_note_get_accessibles, "test_information_note_get_accessibles: check the accessibles of the information note", EXPECT_OK}, {*test_sort_dialog_get_accessibles, "test_sort_dialog_get_accessibles: chcke the accessibles of the sort dialog", EXPECT_OK}, {*test_name_and_password_dialog_get_accessibles, "test_name_and_password_dialog_get_accessibles: check the accessibles and behaviour of name password dialog", EXPECT_OK}, - {*test_grid_get_accessibles, "test_grid_get_accessibles: get the accessibles of the grid and its items", EXPECT_OK}, - {*test_grid_item_activate, "test_grid_item_activate: check that the actions of the grid item work as expected", EXPECT_OK}, - {*test_grid_item_image, "test_grid_item_image: check that you can get the icon info from the grid item", EXPECT_OK}, - {*test_grid_component, "test_grid_component: check that you can get the children from the grid through their positions", EXPECT_OK}, {*test_date_editor_get_accessible, "test_date_editor_get_accessible: get the accessible of the date editor", EXPECT_OK}, {*test_date_editor_launch_dialog, "test_date_editor_launch_dialog: launch the calendar dialog", EXPECT_OK}, {*test_date_editor_text_edit, "test_date_editor_text_edit: reads and writes dates in the editor through atk", EXPECT_OK}, Modified: projects/haf/trunk/hail/ut/hail_tests.h =================================================================== --- projects/haf/trunk/hail/ut/hail_tests.h 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hail_tests.h 2007-03-21 15:59:12 UTC (rev 10708) @@ -20,8 +20,6 @@ * */ -#include <hailappview_tests.h> -#include <hailapp_tests.h> #include <hailbanner_tests.h> #include <hailcaption_tests.h> #include <hailcodedialog_tests.h> @@ -33,7 +31,6 @@ #include <haildialogs_tests.h> #include <hailfileselection_tests.h> #include <hailfindtoolbar_tests.h> -#include <hailgrid_tests.h> #include <hailnumbereditor_tests.h> #include <hailrangeeditor_tests.h> #include <hailseekbar_tests.h> Modified: projects/haf/trunk/hail/ut/hailbanner_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailbanner_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailbanner_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -31,7 +31,7 @@ #include <atk/atktext.h> #include <atk/atkvalue.h> #include <gtk/gtklabel.h> -#include <hildon-widgets/hildon-banner.h> +#include <hildon/hildon-banner.h> #include <hail_tests_utils.h> #include <assert.h> Modified: projects/haf/trunk/hail/ut/hailcaption_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailcaption_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailcaption_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -30,7 +30,7 @@ */ #include <gtk/gtkentry.h> -#include <hildon-widgets/hildon-caption.h> +#include <hildon/hildon-caption.h> #include <hail/hailcaption.h> #include <gtk/gtkwidget.h> #include <gtk/gtkwindow.h> Modified: projects/haf/trunk/hail/ut/hailcodedialog_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailcodedialog_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailcodedialog_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -30,7 +30,7 @@ */ #include <gtk/gtkwidget.h> -#include <hildon-widgets/hildon-code-dialog.h> +#include <hildon/hildon-code-dialog.h> #include <hail/hailcodedialog.h> #include <hail_tests_utils.h> Modified: projects/haf/trunk/hail/ut/hailcolorbutton_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailcolorbutton_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailcolorbutton_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -34,7 +34,7 @@ #include <atk/atkobject.h> #include <atk/atkvalue.h> #include <atk/atkimage.h> -#include <hildon-widgets/hildon-color-button.h> +#include <hildon/hildon-color-button.h> #include <hail/hailcolorbutton.h> #include <string.h> @@ -78,7 +78,7 @@ AtkObject * button_a = NULL; GtkWidget * window = NULL; GValue *value; - GdkColor * color = NULL; + GdkColor color; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); button = hildon_color_button_new(); @@ -92,11 +92,11 @@ assert(ATK_IS_VALUE(button_a)); assert(ATK_IS_IMAGE(button_a)); - color = gdk_color_copy(hildon_color_button_get_color(HILDON_COLOR_BUTTON(button))); - color->blue=0xcccc; - color->red = 0xffff; - color->green = 0x0000; - hildon_color_button_set_color(HILDON_COLOR_BUTTON(button), color); + hildon_color_button_get_color(HILDON_COLOR_BUTTON(button), &color); + color.blue=0xcccc; + color.red = 0xffff; + color.green = 0x0000; + hildon_color_button_set_color(HILDON_COLOR_BUTTON(button), &color); value = g_new0(GValue, 1); g_value_init(value, G_TYPE_DOUBLE); Modified: projects/haf/trunk/hail/ut/hailcolorselector_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailcolorselector_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailcolorselector_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -31,7 +31,7 @@ #include <gtk/gtkwidget.h> #include <atk/atkvalue.h> #include <atk/atkimage.h> -#include <hildon-widgets/hildon-color-selector.h> +#include <hildon/hildon-color-selector.h> #include <hail/hailcolorselector.h> #include <assert.h> Modified: projects/haf/trunk/hail/ut/hailcontrolbar_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailcontrolbar_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailcontrolbar_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -30,7 +30,7 @@ */ #include <gtk/gtkwidget.h> -#include <hildon-widgets/hildon-controlbar.h> +#include <hildon/hildon-controlbar.h> #include <atk/atkvalue.h> #include <atk/atktext.h> Modified: projects/haf/trunk/hail/ut/haildateeditor_tests.c =================================================================== --- projects/haf/trunk/hail/ut/haildateeditor_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/haildateeditor_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -33,7 +33,7 @@ #include <gtk/gtkwindow.h> #include <atk/atkaction.h> #include <atk/atktext.h> -#include <hildon-widgets/hildon-date-editor.h> +#include <hildon/hildon-date-editor.h> #include <hail/haildateeditor.h> #include <hail_tests_utils.h> Deleted: projects/haf/trunk/hail/ut/haildialog_tests.c =================================================================== --- projects/haf/trunk/hail/ut/haildialog_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/haildialog_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -1,92 +0,0 @@ -/* - * This file is part of hail - * - * Copyright (C) 2006 Nokia Corporation. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - * - */ - -/** - * SECTION:haildialog_tests - * @short_description: unit tests for Atk support of dialog help hint - * - * Checks accessibility support for dialog help hint in #GtkDialog - */ - -#include <glib.h> -#include <gtk/gtkdialog.h> -#include <atk/atkaction.h> -#include <hildon-widgets/hildon-dialoghelp.h> - -#include <assert.h> -#include <string.h> - -#include <haildialog_tests.h> - - -static void -test_dialog_help_signal_handler (GtkDialog * dialog, - gpointer data); - -static void -test_dialog_help_signal_handler (GtkDialog * dialog, - gpointer data) -{ - gboolean *return_value = NULL; - - return_value = (gboolean *) data; - - *return_value = TRUE; - -} - -/** - * test_dialog_help: - * - * check that the help hint is offered through Atk - * when enabled. - * - * Return value: 1 if the test is passed - */ -int -test_dialog_help (void) -{ - GtkWidget * dialog = NULL; - AtkObject * accessible = NULL; - gboolean signal_return = FALSE; - - dialog = gtk_dialog_new (); - assert (GTK_IS_DIALOG(dialog)); - - accessible = gtk_widget_get_accessible(dialog); - assert (ATK_IS_ACTION(accessible)); - - assert (atk_action_get_n_actions(ATK_ACTION(accessible)) == 1); - assert (strcmp(atk_action_get_name(ATK_ACTION(accessible), 0), "Help")==0); - - assert (atk_action_do_action(ATK_ACTION(accessible), 0) == FALSE); - - gtk_dialog_help_enable (GTK_DIALOG(dialog)); - - g_signal_connect(dialog, "help", (GCallback) test_dialog_help_signal_handler, &signal_return); - assert (atk_action_do_action(ATK_ACTION(accessible), 0) == TRUE); - assert (signal_return == TRUE); - - return 1; - -} - Modified: projects/haf/trunk/hail/ut/haildialogs_tests.c =================================================================== --- projects/haf/trunk/hail/ut/haildialogs_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/haildialogs_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -31,13 +31,13 @@ #include <gtk/gtkwidget.h> #include <gtk/gtkprogressbar.h> -#include <hildon-widgets/hildon-get-password-dialog.h> -#include <hildon-widgets/hildon-set-password-dialog.h> -#include <hildon-widgets/hildon-name-password-dialog.h> -#include <hildon-widgets/hildon-font-selection-dialog.h> -#include <hildon-widgets/hildon-note.h> -#include <hildon-widgets/hildon-sort-dialog.h> -#include <hildon-widgets/hildon-file-chooser-dialog.h> +#include <hildon/hildon-get-password-dialog.h> +#include <hildon/hildon-set-password-dialog.h> +#include <hildon/hildon-login-dialog.h> +#include <hildon/hildon-font-selection-dialog.h> +#include <hildon/hildon-note.h> +#include <hildon/hildon-sort-dialog.h> +#include <hildon/hildon-file-chooser-dialog.h> #include <hail/hailcaption.h> #include <hail/hailfileselection.h> @@ -653,7 +653,7 @@ /** * test_name_and_password_dialog_get_accessibles: * - * get the expected accessibles from #HildonNamePassordDialog. It + * get the expected accessibles from #HildonLoginPassordDialog. It * also sets the values of the fields through atk and check the * dialog is updated * @@ -670,8 +670,8 @@ AtkObject * password_a = NULL; AtkObject * editable_a = NULL; - dialog = hildon_name_password_dialog_new (NULL); - assert (HILDON_IS_NAME_PASSWORD_DIALOG(dialog)); + dialog = hildon_login_dialog_new (NULL); + assert (HILDON_IS_LOGIN_DIALOG(dialog)); /* get the main accessible */ dialog_a = gtk_widget_get_accessible (dialog); @@ -692,7 +692,7 @@ assert (atk_object_get_role(domain_a) == ATK_ROLE_LABEL); assert (ATK_IS_TEXT(domain_a)); assert (atk_text_get_character_count(ATK_TEXT(domain_a)) == 0); - hildon_name_password_dialog_set_domain(HILDON_NAME_PASSWORD_DIALOG(dialog), "test_domain"); + hildon_login_dialog_set_domain(HILDON_LOGIN_DIALOG(dialog), "test_domain"); assert (atk_text_get_character_count(ATK_TEXT(domain_a)) == strlen("test_domain")); g_object_unref(domain_a); @@ -703,7 +703,7 @@ editable_a = atk_object_ref_accessible_child(username_a, 0); assert (ATK_IS_EDITABLE_TEXT(editable_a)); atk_editable_text_set_text_contents(ATK_EDITABLE_TEXT(editable_a), "Test user"); - assert (strcmp(hildon_name_password_dialog_get_name(HILDON_NAME_PASSWORD_DIALOG(dialog)), "Test user")==0); + assert (strcmp(hildon_login_dialog_get_name(HILDON_LOGIN_DIALOG(dialog)), "Test user")==0); g_object_unref(editable_a); g_object_unref(username_a); @@ -714,7 +714,7 @@ editable_a = atk_object_ref_accessible_child(password_a, 0); assert (ATK_IS_EDITABLE_TEXT(editable_a)); atk_editable_text_set_text_contents(ATK_EDITABLE_TEXT(editable_a), "Test password"); - assert (strcmp(hildon_name_password_dialog_get_password(HILDON_NAME_PASSWORD_DIALOG(dialog)), "Test password")==0); + assert (strcmp(hildon_login_dialog_get_password(HILDON_LOGIN_DIALOG(dialog)), "Test password")==0); g_object_unref(editable_a); g_object_unref(password_a); Modified: projects/haf/trunk/hail/ut/hailfileselection_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailfileselection_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailfileselection_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -35,8 +35,8 @@ #include <atk/atkobject.h> #include <atk/atkaction.h> #include <atk/atkselection.h> -#include <hildon-widgets/hildon-file-system-model.h> -#include <hildon-widgets/hildon-file-selection.h> +#include <hildon/hildon-file-system-model.h> +#include <hildon/hildon-file-selection.h> #include <hail/hailfileselection.h> #include <hail_tests_utils.h> Modified: projects/haf/trunk/hail/ut/hailfindtoolbar_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailfindtoolbar_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailfindtoolbar_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -30,7 +30,7 @@ */ #include <gtk/gtkwidget.h> -#include <hildon-widgets/hildon-find-toolbar.h> +#include <hildon/hildon-find-toolbar.h> #include <hail/hailfindtoolbar.h> #include <assert.h> Deleted: projects/haf/trunk/hail/ut/hailgrid_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailgrid_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailgrid_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -1,284 +0,0 @@ -/* - * This file is part of hail - * - * Copyright (C) 2006 Nokia Corporation. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - * - */ - -/** - * SECTION:hailgrid_tests - * @short_description: unit tests for Atk support of #HildonGrid and #HildonGridItem - * @see_also: #HailGrid, #HailGridItem, #HildonGrid, #HildonGridItem - * - * Unit tests to check accessibility support of #HildonGrid and #HildonGridItem, - * provided in hail by #HailGrid and #HailGridItem - */ - -#include <glib.h> -#include <gtk/gtkwidget.h> -#include <gtk/gtkwindow.h> -#include <atk/atkaction.h> -#include <atk/atkimage.h> -#include <hildon-widgets/hildon-grid.h> -#include <hildon-widgets/hildon-grid-item.h> -#include <hail/hailgrid.h> -#include <hail/hailgriditem.h> - -#include <assert.h> -#include <string.h> -#include <hail_tests_utils.h> - -#include <hailgrid_tests.h> - -static void -test_grid_item_actions_grid_get_activate_handler (HildonGrid * grid, - HildonGridItem * item, - gpointer user_data); -static void -test_grid_item_actions_grid_get_popup_handler (HildonGrid * grid, - GtkWidget *item, - gpointer user_data); - - -/** - * test_grid_get_accessibles: - * - * get the accessibles of the grid and the grid item widgets - * - * Return value: 1 if the test is passed - */ -int -test_grid_get_accessibles (void) -{ - GtkWidget * window = NULL; - GtkWidget * grid = NULL; - GtkWidget * item1 = NULL; - GtkWidget * item2 = NULL; - AtkObject * grid_a = NULL; - AtkObject * item1_a = NULL; - AtkObject * item2_a = NULL; - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - grid = hildon_grid_new (); - assert (HILDON_IS_GRID(grid)); - gtk_container_add(GTK_CONTAINER(window), grid); - grid_a = gtk_widget_get_accessible(grid); - assert (HAIL_IS_GRID(grid_a)); - - item1 = hildon_grid_item_new("qgn_list_gene_unknown_file"); - assert(HILDON_IS_GRID_ITEM(item1)); - item1_a = gtk_widget_get_accessible(item1); - assert(HAIL_IS_GRID_ITEM(item1_a)); - - assert (atk_object_get_n_accessible_children(grid_a)==0); - - gtk_container_add(GTK_CONTAINER(grid), item1); - - item2 = hildon_grid_item_new("qgn_list_gene_unknown_file"); - assert(HILDON_IS_GRID_ITEM(item2)); - item2_a = gtk_widget_get_accessible(item2); - assert(HAIL_IS_GRID_ITEM(item2_a)); - - gtk_container_add(GTK_CONTAINER(grid), item2); - - assert (atk_object_get_n_accessible_children(grid_a)==2); - - return 1; -} - -/* signal handler for activate in test_grid_item_activate test */ -static void -test_grid_item_actions_grid_get_activate_handler (HildonGrid * grid, - HildonGridItem * item, - gpointer user_data) -{ - gboolean * received = NULL; - - received = (gboolean *) user_data; - - *received = TRUE; -} - -/* signal handler for popup in test_grid_item_activate test */ -void -test_grid_item_actions_grid_get_popup_handler (HildonGrid * grid, - GtkWidget *item, - gpointer user_data) -{ - gboolean * received = NULL; - - received = (gboolean *) user_data; - - *received = TRUE; -} - -/** - * test_grid_item_activate: - * - * activate a grid item and try to check if it works as expected - * (calling the activate event). It also tests the popup event - * - * Return value: 1 if the test is passed - */ -int -test_grid_item_activate (void) -{ - GtkWidget * window = NULL; - GtkWidget * grid = NULL; - GtkWidget * item1 = NULL; - GtkWidget * item2 = NULL; - AtkObject * grid_a = NULL; - AtkObject * item1_a = NULL; - AtkObject * item2_a = NULL; - gboolean received = FALSE; - gboolean popup_received = FALSE; - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - grid = hildon_grid_new (); - gtk_container_add(GTK_CONTAINER(window), grid); - grid_a = gtk_widget_get_accessible(grid); - - item1 = hildon_grid_item_new("qgn_list_gene_unknown_file"); - item1_a = gtk_widget_get_accessible(item1); - gtk_container_add(GTK_CONTAINER(grid), item1); - - item2 = hildon_grid_item_new("qgn_list_gene_unknown_file"); - item2_a = gtk_widget_get_accessible(item2); - gtk_container_add(GTK_CONTAINER(grid), item2); - - assert (atk_object_get_n_accessible_children(grid_a)==2); - - g_signal_connect(grid, "activate-child", - (GCallback)test_grid_item_actions_grid_get_activate_handler, - &received); - - gtk_widget_show_all(grid); - - assert (ATK_IS_ACTION(item1_a)); - assert(atk_action_do_action(ATK_ACTION(item1_a), 0)); - hail_tests_utils_button_waiter(1000); - - assert(received); - - g_signal_connect(grid, "popup-context-menu", - (GCallback)test_grid_item_actions_grid_get_popup_handler, - &popup_received); - - assert (ATK_IS_ACTION(grid_a)); - assert(atk_action_do_action(ATK_ACTION(grid_a), 0)); - hail_tests_utils_button_waiter(1000); - - assert (popup_received); - return 1; -} - -/** - * test_grid_item_image: - * - * Check #AtkImage support of #HildonGridItem - * - * Return value: 1 if the test is passed - */ -int -test_grid_item_image (void) -{ - GtkWidget * window = NULL; - GtkWidget * grid = NULL; - GtkWidget * item1 = NULL; - AtkObject * grid_a = NULL; - AtkObject * item1_a = NULL; - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - grid = hildon_grid_new (); - assert (HILDON_IS_GRID(grid)); - gtk_container_add(GTK_CONTAINER(window), grid); - grid_a = gtk_widget_get_accessible(grid); - assert (HAIL_IS_GRID(grid_a)); - gtk_widget_show_all(window); - - item1 = hildon_grid_item_new_with_label("qgn_list_gene_unknown_file", "Test label"); - assert(HILDON_IS_GRID_ITEM(item1)); - item1_a = gtk_widget_get_accessible(item1); - assert(HAIL_IS_GRID_ITEM(item1_a)); - - assert (atk_object_get_n_accessible_children(grid_a)==0); - gtk_container_add(GTK_CONTAINER(grid), item1); - - assert (ATK_IS_IMAGE(item1_a)); - assert (strcmp(atk_image_get_image_description(ATK_IMAGE(item1_a)), "Test label")==0); - hildon_grid_item_set_emblem_type(HILDON_GRID_ITEM(item1), "qgn_list_gene_unknown_file"); - assert (strcmp(atk_image_get_image_description(ATK_IMAGE(item1_a)), "Test label(qgn_list_gene_unknown_file)")==0); - - - return 1; -} - -/** - * test_grid_component: - * - * Check #AtkComponent support of #HildonGrid - * - * Return value: 1 if the test is passed - */ -int -test_grid_component (void) -{ - GtkWidget * window = NULL; - GtkWidget * grid = NULL; - GtkWidget * item1 = NULL; - AtkObject * grid_a = NULL; - AtkObject * item1_a = NULL; - AtkObject * tmp_a = NULL; - gint x, y, width, height; - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - grid = hildon_grid_new (); - assert (HILDON_IS_GRID(grid)); - grid_a = gtk_widget_get_accessible(grid); - assert (HAIL_IS_GRID(grid_a)); - - item1 = hildon_grid_item_new_with_label("qgn_list_gene_unknown_file", "Test label"); - assert(HILDON_IS_GRID_ITEM(item1)); - item1_a = gtk_widget_get_accessible(item1); - hildon_grid_item_set_emblem_type(HILDON_GRID_ITEM(item1), "qgn_list_gene_unknown_file"); - assert(HAIL_IS_GRID_ITEM(item1_a)); - - assert (atk_object_get_n_accessible_children(grid_a)==0); - gtk_container_add(GTK_CONTAINER(grid), item1); - gtk_container_add(GTK_CONTAINER(window), grid); - gtk_widget_show_all(window); - - assert(ATK_IS_COMPONENT(item1_a)); - assert(ATK_IS_COMPONENT(grid_a)); - - hail_tests_utils_button_waiter(600); - - atk_component_get_extents(ATK_COMPONENT(item1_a), &x, &y, &width, &height, ATK_XY_SCREEN); - assert(atk_component_contains(ATK_COMPONENT(item1_a), x, y, ATK_XY_SCREEN)); - tmp_a = atk_component_ref_accessible_at_point(ATK_COMPONENT(grid_a), x, y, ATK_XY_SCREEN); - assert(tmp_a != NULL); - assert(tmp_a == item1_a); - g_object_unref(tmp_a); - - tmp_a = atk_component_ref_accessible_at_point(ATK_COMPONENT(grid_a), x-1, y-1, ATK_XY_SCREEN); - assert(tmp_a == NULL); - - return 1; -} - - Modified: projects/haf/trunk/hail/ut/hailnumbereditor_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailnumbereditor_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailnumbereditor_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -31,7 +31,7 @@ #include <gtk/gtkwidget.h> #include <gtk/gtkwindow.h> -#include <hildon-widgets/hildon-number-editor.h> +#include <hildon/hildon-number-editor.h> #include <hail/hailnumbereditor.h> #include <stdlib.h> Modified: projects/haf/trunk/hail/ut/hailrangeeditor_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailrangeeditor_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailrangeeditor_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -31,7 +31,7 @@ #include <gtk/gtkwidget.h> #include <gtk/gtkwindow.h> -#include <hildon-widgets/hildon-range-editor.h> +#include <hildon/hildon-range-editor.h> #include <hail/hailrangeeditor.h> #include <assert.h> Modified: projects/haf/trunk/hail/ut/hailseekbar_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailseekbar_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailseekbar_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -32,7 +32,7 @@ #include <gtk/gtkwidget.h> #include <atk/atktext.h> #include <atk/atkvalue.h> -#include <hildon-widgets/hildon-seekbar.h> +#include <hildon/hildon-seekbar.h> #include <assert.h> #include <string.h> Modified: projects/haf/trunk/hail/ut/hailtimeeditor_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailtimeeditor_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailtimeeditor_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -31,7 +31,7 @@ #include <gtk/gtkwidget.h> #include <gtk/gtkwindow.h> -#include <hildon-widgets/hildon-time-editor.h> +#include <hildon/hildon-time-editor.h> #include <hail/hailtimeeditor.h> #include <assert.h> Modified: projects/haf/trunk/hail/ut/hailtimepicker_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailtimepicker_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailtimepicker_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -31,7 +31,7 @@ #include <gtk/gtkwidget.h> #include <atk/atkobject.h> -#include <hildon-widgets/hildon-time-picker.h> +#include <hildon/hildon-time-picker.h> #include <hail/hailtimepicker.h> #include <assert.h> Modified: projects/haf/trunk/hail/ut/hailvolumebar_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailvolumebar_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailvolumebar_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -30,8 +30,8 @@ */ #include <gtk/gtkwindow.h> -#include <hildon-widgets/hildon-hvolumebar.h> -#include <hildon-widgets/hildon-vvolumebar.h> +#include <hildon/hildon-hvolumebar.h> +#include <hildon/hildon-vvolumebar.h> #include <hail/hailvolumebar.h> #include <hail_tests_utils.h> Modified: projects/haf/trunk/hail/ut/hailweekdaypicker_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailweekdaypicker_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailweekdaypicker_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -32,7 +32,7 @@ #include <gtk/gtkwidget.h> #include <gtk/gtkwindow.h> #include <atk/atkobject.h> -#include <hildon-widgets/hildon-weekday-picker.h> +#include <hildon/hildon-weekday-picker.h> #include <hail/hailweekdaypicker.h> #include <hail_tests_utils.h> Modified: projects/haf/trunk/hail/ut/hailwindow_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailwindow_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailwindow_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -35,8 +35,8 @@ #include <gtk/gtkstock.h> #include <gtk/gtklabel.h> #include <gtk/gtktoolbutton.h> -#include <hildon-widgets/hildon-window.h> -#include <hildon-widgets/hildon-program.h> +#include <hildon/hildon-window.h> +#include <hildon/hildon-program.h> #include <hail/hailwindow.h> #include <string.h> Modified: projects/haf/trunk/hail/ut/hailwizarddialog_tests.c =================================================================== --- projects/haf/trunk/hail/ut/hailwizarddialog_tests.c 2007-03-21 15:55:07 UTC (rev 10707) +++ projects/haf/trunk/hail/ut/hailwizarddialog_tests.c 2007-03-21 15:59:12 UTC (rev 10708) @@ -32,7 +32,7 @@ #include <gtk/gtkvbox.h> #include <gtk/gtklabel.h> #include <atk/atkstateset.h> -#include <hildon-widgets/hildon-wizard-dialog.h> +#include <hildon/hildon-wizard-dialog.h> #include <assert.h> #include <string.h>
- Previous message: [maemo-commits] r10707 - in projects/haf/trunk/hildon-desktop: . data
- Next message: [maemo-commits] r10709 - in projects/haf/trunk/hildon-desktop: . libhildonwm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]