Changeset 101951 in webkit
- Timestamp:
- Dec 4, 2011 1:39:28 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r101950 r101951 1 2011-12-03 Mario Sanchez Prada <msanchez@igalia.com> 2 3 [GTK] Don't log document events in DRT 4 https://bugs.webkit.org/show_bug.cgi?id=73746 5 6 Reviewed by Martin Robinson. 7 8 Unskip passing test, remove other transformed into a unit test and 9 rebaseline expectations now we stopped logging document events. 10 11 * platform/gtk/Skipped: Removed two skipped tests. 12 * platform/gtk/accessibility/aria-slider-required-attributes-expected.txt: Rebaselined 13 * platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt: Ditto. 14 * platform/gtk/accessibility/document-reload-events-expected.txt: Removed. 15 * platform/gtk/accessibility/document-reload-events.html: Removed. 16 1 17 2011-12-04 Ryosuke Niwa <rniwa@webkit.org> 2 18 -
trunk/LayoutTests/platform/gtk/Skipped
r101927 r101951 1360 1360 # Need layoutTestController.setShouldStayOnPageAfterHandlingBeforeUnload 1361 1361 fast/loader/form-submission-after-beforeunload-cancel.html 1362 1363 # https://bugs.webkit.org/show_bug.cgi?id=673981364 platform/gtk/accessibility/combo-box-collapsed-selection-changed.html1365 platform/gtk/accessibility/document-reload-events.html1366 1362 1367 1363 # https://bugs.webkit.org/show_bug.cgi?id=67713 -
trunk/LayoutTests/platform/gtk/accessibility/aria-slider-required-attributes-expected.txt
r82095 r101951 1 1 Accessibility object emitted "focus-event = 1" / Name: "(No name)" / Role: 50 2 2 Accessibility object emitted "state-change:focused = 1" / Name: "(No name)" / Role: 50 3 Accessibility object emitted "load-complete" / Name: "(No name)" / Role: 804 3 Accessibility object emitted "state-change:busy = 0" / Name: "(No name)" / Role: 80 5 4 Accessibility object emitted "property-change:accessible-value" / Name: "(No name)" / Role: 50 -
trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt
r80214 r101951 27 27 Accessibility object emitted "focus-event = 1" / Name: "foo" / Role: 34 28 28 Accessibility object emitted "state-change:focused = 1" / Name: "foo" / Role: 34 29 Accessibility object emitted "load-complete" / Name: "(No name)" / Role: 8030 Accessibility object emitted "state-change:busy = 0" / Name: "(No name)" / Role: 8031 29 32 30 This tests that the 'state-changed:selected' signal is emitted when arrowing through the options of a combobox while collapsed. -
trunk/Source/WebKit/gtk/ChangeLog
r101933 r101951 1 2011-12-03 Mario Sanchez Prada <msanchez@igalia.com> 2 3 Removing document related events from DRT 4 5 [GTK] Don't log document events in DRT 6 https://bugs.webkit.org/show_bug.cgi?id=73746 7 8 Reviewed by Martin Robinson. 9 10 New unit test to check events when reloading a document. This 11 replaces the former document-reload-events.html layout test. 12 13 * tests/testatk.c: 14 (updateLoadingEventsResult): New, updates a global variable to 15 allow checking later on that the right signals were emmitted. 16 (documentLoadingEventCallback): New, global listener for load-complete 17 and reload signals over the document object (the web area). 18 (testWebkitAtkDocumentLoadingEvents): New unit test, globally 19 connects to document-related signals and check they are properly 20 emitted when reloading the web view. 21 (main): Added new test. 22 1 23 2011-12-03 Xan Lopez <xlopez@igalia.com> 2 24 -
trunk/Source/WebKit/gtk/tests/testatk.c
r101349 r101951 488 488 } 489 489 490 static gchar* loadingEventsResult = 0; 491 492 static void updateLoadingEventsResult(const gchar* signalName) 493 { 494 g_assert(signalName); 495 496 gchar* previousResult = loadingEventsResult; 497 loadingEventsResult = g_strdup_printf("%s|%s", previousResult, signalName); 498 g_free(previousResult); 499 } 500 501 static gboolean documentLoadingEventCallback(GSignalInvocationHint *signalHint, guint numParamValues, const GValue *paramValues, gpointer data) 502 { 503 // At least we should receive the instance emitting the signal. 504 if (numParamValues < 1) 505 return TRUE; 506 507 GSignalQuery signal_query; 508 g_signal_query(signalHint->signal_id, &signal_query); 509 510 updateLoadingEventsResult(signal_query.signal_name); 511 return TRUE; 512 } 513 514 static void testWebkitAtkDocumentLoadingEvents() 515 { 516 WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); 517 g_object_ref_sink(webView); 518 GtkAllocation allocation = { 0, 0, 800, 600 }; 519 gtk_widget_size_allocate(GTK_WIDGET(webView), &allocation); 520 webkit_web_view_load_string(webView, contents, 0, 0, 0); 521 522 /* Trigger the creation of the full accessibility hierarchy by 523 asking for the webArea object, so we can listen to events. */ 524 getWebAreaObject(webView); 525 526 /* Connect globally to see those events during a reload, since the 527 document after that will be different than what we have now. */ 528 guint loadCompleteListenerId = atk_add_global_event_listener(documentLoadingEventCallback, "ATK:AtkDocument:load-complete"); 529 guint reloadListenerId = atk_add_global_event_listener(documentLoadingEventCallback, "ATK:AtkDocument:reload"); 530 531 /* Reload, so we can see those load events happening. */ 532 loadingEventsResult = g_strdup(""); 533 webkit_web_view_reload(webView); 534 535 atk_remove_global_event_listener(loadCompleteListenerId); 536 atk_remove_global_event_listener(reloadListenerId); 537 538 g_assert_cmpstr(loadingEventsResult, ==, "|reload|load-complete"); 539 540 g_free(loadingEventsResult); 541 g_object_unref(webView); 542 } 543 490 544 static void testWebkitAtkEmbeddedObjects() 491 545 { … … 1720 1774 g_test_add_func("/webkit/atk/caretOffsetsAndExtranousWhiteSpaces", testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces); 1721 1775 g_test_add_func("/webkit/atk/comboBox", testWebkitAtkComboBox); 1776 g_test_add_func("/webkit/atk/documentLoadingEvents", testWebkitAtkDocumentLoadingEvents); 1722 1777 g_test_add_func("/webkit/atk/embeddedObjects", testWebkitAtkEmbeddedObjects); 1723 1778 g_test_add_func("/webkit/atk/getTextAtOffset", testWebkitAtkGetTextAtOffset); -
trunk/Tools/ChangeLog
r101939 r101951 1 2011-12-03 Mario Sanchez Prada <msanchez@igalia.com> 2 3 [GTK] Don't log document events in DRT 4 https://bugs.webkit.org/show_bug.cgi?id=73746 5 6 Reviewed by Martin Robinson. 7 8 Stop connecting globally to document-related events. 9 10 * DumpRenderTree/gtk/AccessibilityCallbacks.cpp: 11 (connectAccessibilityCallbacks): Removed connections. 12 (disconnectAccessibilityCallbacks): Removed disconnections. 13 1 14 2011-12-03 Dan Bernstein <mitz@apple.com> 2 15 -
trunk/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp
r81810 r101951 43 43 static guint propertyChangedListenerId = 0; 44 44 static guint visibleDataChangedListenerId = 0; 45 46 static guint loadCompleteListenerId = 0;47 static guint loadStoppedListenerId = 0;48 static guint reloadListenerId = 0;49 45 50 46 static void printAccessibilityEvent(AtkObject* accessible, const gchar* signalName) … … 104 100 } 105 101 106 static gboolean axDocumentEventListener(GSignalInvocationHint *signalHint,107 guint numParamValues,108 const GValue *paramValues,109 gpointer data)110 {111 // At least we should receive the instance emitting the signal.112 if (numParamValues < 1)113 return TRUE;114 115 AtkObject* accessible = ATK_OBJECT(g_value_get_object(¶mValues[0]));116 if (!accessible || !ATK_IS_DOCUMENT(accessible))117 return TRUE;118 119 GSignalQuery signal_query;120 g_signal_query(signalHint->signal_id, &signal_query);121 122 printAccessibilityEvent(accessible, signal_query.signal_name);123 124 return TRUE;125 }126 127 102 void connectAccessibilityCallbacks() 128 103 { … … 148 123 g_object_unref(G_OBJECT(dummyNoOpAxObject)); 149 124 g_object_unref(dummyAxObject); 150 151 // Add global listeners for AtkDocument's signals.152 loadCompleteListenerId = atk_add_global_event_listener(axDocumentEventListener, "Gtk:AtkDocument:load-complete");153 loadStoppedListenerId = atk_add_global_event_listener(axDocumentEventListener, "Gtk:AtkDocument:load-stopped");154 reloadListenerId = atk_add_global_event_listener(axDocumentEventListener, "Gtk:AtkDocument:reload");155 125 } 156 126 … … 182 152 visibleDataChangedListenerId = 0; 183 153 } 184 185 // AtkDocument signals.186 if (loadCompleteListenerId) {187 atk_remove_global_event_listener(loadCompleteListenerId);188 loadCompleteListenerId = 0;189 }190 if (loadStoppedListenerId) {191 atk_remove_global_event_listener(loadStoppedListenerId);192 loadStoppedListenerId = 0;193 }194 if (reloadListenerId) {195 atk_remove_global_event_listener(reloadListenerId);196 reloadListenerId = 0;197 }198 154 } 199 155
Note: See TracChangeset
for help on using the changeset viewer.