Title: [101960] trunk/Source/WebKit/gtk
- Revision
- 101960
- Author
- [email protected]
- Date
- 2011-12-04 08:58:28 -0800 (Sun, 04 Dec 2011)
Log Message
[Gtk] Check for the load-complete event only in the unit tests.
There is currently a known issue happening in debug builds when
reloading the webview if it was loaded before through the function
webkit_web_view_load_string, resulting in a ASSERT failing (see
bug 50331) so we can't check for the reload event here, since it
makes the test to fail. Fortunately, checking for load-complete
event is a good enough test, so this small patch is about that.
Rubber-stamped by Philippe Normand.
* tests/testatk.c:
(testWebkitAtkDocumentLoadingEvents): Don't load and then reload
to check events, just load once and check whether the
'load-complete' event has happened.
Modified Paths
Diff
Modified: trunk/Source/WebKit/gtk/ChangeLog (101959 => 101960)
--- trunk/Source/WebKit/gtk/ChangeLog 2011-12-04 16:31:16 UTC (rev 101959)
+++ trunk/Source/WebKit/gtk/ChangeLog 2011-12-04 16:58:28 UTC (rev 101960)
@@ -1,3 +1,21 @@
+2011-12-04 Mario Sanchez Prada <[email protected]>
+
+ [Gtk] Check for the load-complete event only in the unit tests.
+
+ There is currently a known issue happening in debug builds when
+ reloading the webview if it was loaded before through the function
+ webkit_web_view_load_string, resulting in a ASSERT failing (see
+ bug 50331) so we can't check for the reload event here, since it
+ makes the test to fail. Fortunately, checking for load-complete
+ event is a good enough test, so this small patch is about that.
+
+ Rubber-stamped by Philippe Normand.
+
+ * tests/testatk.c:
+ (testWebkitAtkDocumentLoadingEvents): Don't load and then reload
+ to check events, just load once and check whether the
+ 'load-complete' event has happened.
+
2011-12-03 Mario Sanchez Prada <[email protected]>
Removing document related events from DRT
Modified: trunk/Source/WebKit/gtk/tests/testatk.c (101959 => 101960)
--- trunk/Source/WebKit/gtk/tests/testatk.c 2011-12-04 16:31:16 UTC (rev 101959)
+++ trunk/Source/WebKit/gtk/tests/testatk.c 2011-12-04 16:58:28 UTC (rev 101960)
@@ -517,25 +517,21 @@
g_object_ref_sink(webView);
GtkAllocation allocation = { 0, 0, 800, 600 };
gtk_widget_size_allocate(GTK_WIDGET(webView), &allocation);
+
+ /* Connect globally to see those events during a future load. */
+ guint loadCompleteListenerId = atk_add_global_event_listener(documentLoadingEventCallback, "ATK:AtkDocument:load-complete");
+
+ /* Do the load, so we can see those events happening. */
+ loadingEventsResult = g_strdup("");
webkit_web_view_load_string(webView, contents, 0, 0, 0);
/* Trigger the creation of the full accessibility hierarchy by
asking for the webArea object, so we can listen to events. */
getWebAreaObject(webView);
- /* Connect globally to see those events during a reload, since the
- document after that will be different than what we have now. */
- guint loadCompleteListenerId = atk_add_global_event_listener(documentLoadingEventCallback, "ATK:AtkDocument:load-complete");
- guint reloadListenerId = atk_add_global_event_listener(documentLoadingEventCallback, "ATK:AtkDocument:reload");
-
- /* Reload, so we can see those load events happening. */
- loadingEventsResult = g_strdup("");
- webkit_web_view_reload(webView);
-
atk_remove_global_event_listener(loadCompleteListenerId);
- atk_remove_global_event_listener(reloadListenerId);
- g_assert_cmpstr(loadingEventsResult, ==, "|reload|load-complete");
+ g_assert_cmpstr(loadingEventsResult, ==, "|load-complete");
g_free(loadingEventsResult);
g_object_unref(webView);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes