Changeset 58511 in webkit


Ignore:
Timestamp:
Apr 29, 2010 6:50:07 AM (14 years ago)
Author:
xan@webkit.org
Message:

2010-04-29 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=33590

Add WebKitDOMDocument tests to the build.

  • GNUmakefile.am:

WebKit/gtk:

2010-04-29 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=33590

Move WebKitDOMDocument unit tests to their own file.

  • tests/testdomdocument.c: Added. (finish_loading): (dom_document_fixture_setup): (dom_document_fixture_teardown): (test_dom_document_title): (main):
  • tests/testwebview.c:
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r58443 r58511  
     12010-04-29  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] GObject DOM bindings
     6        https://bugs.webkit.org/show_bug.cgi?id=33590
     7
     8        Add WebKitDOMDocument tests to the build.
     9
     10        * GNUmakefile.am:
     11
    1122010-04-28  Sam Weinig  <sam@webkit.org>
    213
  • trunk/GNUmakefile.am

    r57985 r58511  
    623623        -no-fast-install
    624624
    625 TEST_PROGS += Programs/unittests/testhttpbackend \
     625TEST_PROGS += \
     626        Programs/unittests/testdomdocument \
     627        Programs/unittests/testhttpbackend \
    626628        Programs/unittests/testloading \
    627629        Programs/unittests/testglobals \
     
    644646
    645647# Add additional tests here
     648Programs_unittests_testdomdocument_SOURCES = WebKit/gtk/tests/testdomdocument.c
     649Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
     650Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
     651Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
     652
    646653Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
    647654Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
  • trunk/WebKit/gtk/ChangeLog

    r58509 r58511  
     12010-04-29  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] GObject DOM bindings
     6        https://bugs.webkit.org/show_bug.cgi?id=33590
     7
     8        Move WebKitDOMDocument unit tests to their own file.
     9
     10        * tests/testdomdocument.c: Added.
     11        (finish_loading):
     12        (dom_document_fixture_setup):
     13        (dom_document_fixture_teardown):
     14        (test_dom_document_title):
     15        (main):
     16        * tests/testwebview.c:
     17
    1182010-04-29  Xan Lopez  <xlopez@igalia.com>
    219
  • trunk/WebKit/gtk/tests/testwebview.c

    r58108 r58511  
    337337}   
    338338
    339 static void test_webkit_web_view_document()
    340 {
    341     GtkWidget* window;
    342     GtkWidget* web_view;
    343     gchar* title;
    344     WebKitDOMDocument* document;
    345    
    346     window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    347     web_view = webkit_web_view_new();
    348    
    349     gtk_container_add(GTK_CONTAINER(window), web_view);
    350     gtk_widget_show_all(window);
    351 
    352     loop = g_main_loop_new(NULL, TRUE);
    353 
    354     g_signal_connect(window, "map-event",
    355                      G_CALLBACK(map_event_cb), loop);
    356     g_main_loop_run(loop);
    357 
    358     document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(web_view));
    359     g_assert(document);
    360     webkit_dom_document_set_title(document, (gchar*)"First title");
    361     title = webkit_dom_document_get_title(document);
    362     g_assert(title);
    363     g_assert_cmpstr(title, ==, "First title");
    364     g_free(title);
    365     webkit_dom_document_set_title(document, (gchar*)"Title changed by DOM bindings");
    366     title = webkit_dom_document_get_title(document);
    367     g_assert(title);
    368     g_assert_cmpstr(title, ==, "Title changed by DOM bindings");
    369     g_free(title);
    370    
    371     gtk_widget_destroy(window);
    372 }   
    373 
    374339int main(int argc, char** argv)
    375340{
     
    400365    g_test_add_func("/webkit/webview/grab_focus", test_webkit_web_view_grab_focus);
    401366    g_test_add_func("/webkit/webview/window-features", test_webkit_web_view_window_features);
    402     g_test_add_func("/webkit/webview/document", test_webkit_web_view_document);
    403367
    404368    return g_test_run ();
Note: See TracChangeset for help on using the changeset viewer.