Changeset 90627 in webkit
- Timestamp:
- Jul 8, 2011 6:42:27 AM (13 years ago)
- Location:
- trunk/Source/WebKit/gtk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/gtk/ChangeLog
r90240 r90627 1 2011-07-08 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] testwebview API test fails after http://trac.webkit.org/changeset/90471 4 https://bugs.webkit.org/show_bug.cgi?id=64159 5 6 Rework the icon-uri change test so that the condition for quitting 7 the mainloop is the icon-uri change itself, along with a timeout 8 to avoid taking too long in case of failure. Since the conditions 9 for considering a page loaded were changed we can't rely on that 10 for this test anymore. 11 12 Reviewed by Xan Lopez. 13 14 * tests/testwebview.c: 15 (timeout_cb): error out if it takes too long for the icon-uri 16 change to happen. 17 (icon_uri_changed_cb): quit the loop here instead of waiting on 18 the page being loaded. 19 (test_webkit_web_view_icon_uri): 20 1 21 2011-07-01 Joone Hur <joone.hur@collabora.co.uk> 2 22 -
trunk/Source/WebKit/gtk/tests/testwebview.c
r86361 r90627 79 79 } 80 80 81 static gboolean timeout_cb(gpointer data) 82 { 83 g_error("Didn't get icon-uri before timing out."); 84 return FALSE; 85 } 86 81 87 static void icon_uri_changed_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) 82 88 { 83 gboolean* been_here = (gboolean*)data;84 89 char* expected_uri; 85 90 … … 90 95 g_free(expected_uri); 91 96 92 *been_here = TRUE;97 g_main_loop_quit(loop); 93 98 } 94 99 … … 107 112 static void test_webkit_web_view_icon_uri() 108 113 { 109 gboolean been_to_uri_changed = FALSE;110 114 gboolean been_to_icon_loaded = FALSE; 111 115 WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new()); … … 115 119 116 120 g_object_connect(G_OBJECT(view), 117 "signal::notify::progress", idle_quit_loop_cb, NULL, 118 "signal::notify::icon-uri", icon_uri_changed_cb, &been_to_uri_changed, 121 "signal::notify::icon-uri", icon_uri_changed_cb, NULL, 119 122 "signal::icon-loaded", icon_loaded_cb, &been_to_icon_loaded, 120 123 NULL); … … 122 125 webkit_web_view_load_uri(view, base_uri); 123 126 124 g_main_loop_run(loop); 125 126 g_assert(been_to_uri_changed); 127 guint timeout_id = g_timeout_add(500, timeout_cb, 0); 128 129 g_main_loop_run(loop); 130 131 g_source_remove(timeout_id); 132 127 133 g_assert(been_to_icon_loaded); 128 134
Note: See TracChangeset
for help on using the changeset viewer.