<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[169487] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/169487">169487</a></dd>
<dt>Author</dt> <dd>mario.prada@samsung.com</dd>
<dt>Date</dt> <dd>2014-05-30 09:47:06 -0700 (Fri, 30 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[ATK] Deprecate usage of logAccessibilityEvents() in layout tests
https://bugs.webkit.org/show_bug.cgi?id=132280

Reviewed by Chris Fleizach.

Tools:
Remove implementation of logAccessibilityEvents() for ATK based
ports, as this has proved to be a flaky method of checking that
ATK events are being properly emitted. Instead, it's better to use
the addNotificationListener() functions and provide a JS callback
to check that the right events are being emmitted from the tests.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::logAccessibilityEvents): Replaced
with dummy implementation.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::logAccessibilityEvents): Removed

LayoutTests:
Removed 36 flaky expectations from TestExpectations for tests that
were ocassionally showing the output of logAccessibilityEvents()
even if they did not make use of that feature (thus the flakiness).

* platform/gtk/TestExpectations: Updated.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityControllerAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityNotificationHandlerAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityNotificationHandlerAtkh">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (169486 => 169487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-30 15:43:55 UTC (rev 169486)
+++ trunk/LayoutTests/ChangeLog        2014-05-30 16:47:06 UTC (rev 169487)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-05-30  Mario Sanchez Prada  &lt;mario.prada@samsung.com&gt;
+
+        [ATK] Deprecate usage of logAccessibilityEvents() in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=132280
+
+        Reviewed by Chris Fleizach.
+
+        Removed 36 flaky expectations from TestExpectations for tests that
+        were ocassionally showing the output of logAccessibilityEvents()
+        even if they did not make use of that feature (thus the flakiness).
+
+        * platform/gtk/TestExpectations: Updated.
+
</ins><span class="cx"> 2014-05-30  Jarek Czekalski  &lt;jarekczek@poczta.onet.pl&gt;
</span><span class="cx"> 
</span><span class="cx">         [ATK] Convert caret offset tests from testatk.c.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (169486 => 169487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2014-05-30 15:43:55 UTC (rev 169486)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2014-05-30 16:47:06 UTC (rev 169487)
</span><span class="lines">@@ -823,44 +823,6 @@
</span><span class="cx"> webkit.org/b/132277 fast/images/imagemap-case.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/132277 fast/images/imagemap-dynamic-area-updates.html [ Failure Pass ]
</span><span class="cx"> 
</span><del>-#Accessibility
-webkit.org/b/132280 platform/gtk/accessibility/aria-table-hierarchy.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/aria-toggle-button-role.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/button-accessible-name.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/caret-browsing-select-focus.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/caret-browsing-text-focus.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/entry-and-password.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/input-slider.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/list-items-always-exposed.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/media-controls-panel-title.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/media-emits-object-replacement.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/name-from-label.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/object-with-title.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/remapped-aria-crash.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/spans-paragraphs-and-divs.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/spans.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/table-hierarchy.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-embedded-objects.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-newlines.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-preformatted.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-simple.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-special-chars.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-textarea.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-textinput.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-at-offset-wrapped-lines.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-combo-box.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-embedded-objects.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-entry-and-password.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-extraneous-whitespace.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-formatted.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-heading.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-list-items.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-simple.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-table-cells.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-range-with-link.html [ Failure Pass ]
-webkit.org/b/132280 platform/gtk/accessibility/text-for-table.html [ Failure Pass ]
-
</del><span class="cx"> webkit.org/b/132425 fast/multicol/scrolling-overflow.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/132425 fast/multicol/span/span-as-immediate-child-generated-content.html [ Failure Pass ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (169486 => 169487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-05-30 15:43:55 UTC (rev 169486)
+++ trunk/Tools/ChangeLog        2014-05-30 16:47:06 UTC (rev 169487)
</span><span class="lines">@@ -3,6 +3,25 @@
</span><span class="cx">         [ATK] Deprecate usage of logAccessibilityEvents() in layout tests
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=132280
</span><span class="cx"> 
</span><ins>+        Reviewed by Chris Fleizach.
+
+        Remove implementation of logAccessibilityEvents() for ATK based
+        ports, as this has proved to be a flaky method of checking that
+        ATK events are being properly emitted. Instead, it's better to use
+        the addNotificationListener() functions and provide a JS callback
+        to check that the right events are being emmitted from the tests.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
+        (WTR::AccessibilityController::logAccessibilityEvents): Replaced
+        with dummy implementation.
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
+        (WTR::AccessibilityNotificationHandler::logAccessibilityEvents): Removed
+
+2014-05-30  Mario Sanchez Prada  &lt;mario.prada@samsung.com&gt;
+
+        [ATK] Deprecate usage of logAccessibilityEvents() in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=132280
+
</ins><span class="cx">         Rubber stamped by Carlos Garcia Campos.
</span><span class="cx"> 
</span><span class="cx">         Fix two small issues with previous patch (r169483), that caused some tests to break.
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityControllerAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp (169486 => 169487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp        2014-05-30 15:43:55 UTC (rev 169486)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp        2014-05-30 16:47:06 UTC (rev 169487)
</span><span class="lines">@@ -43,23 +43,8 @@
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityController::logAccessibilityEvents()
</span><span class="cx"> {
</span><del>-    // Ensure no callbacks are connected before.
-    resetToConsistentState();
-
-    // Ensure that accessibility is initialized for the WebView by querying for
-    // the root accessible object, which will create the full hierarchy.
-    rootElement();
-
-    if (!m_globalNotificationHandler)
-        m_globalNotificationHandler = AccessibilityNotificationHandler::create();
-    m_globalNotificationHandler-&gt;logAccessibilityEvents();
-
-    // Ensure the Atk interface types are registered, otherwise
-    // the AtkDocument signal handlers below won't get registered.
-    GObject* dummyAxObject = G_OBJECT(g_object_new(ATK_TYPE_OBJECT, nullptr));
-    AtkObject* dummyNoOpAxObject = atk_no_op_object_new(dummyAxObject);
-    g_object_unref(G_OBJECT(dummyNoOpAxObject));
-    g_object_unref(dummyAxObject);
</del><ins>+    // No longer implemented for ATK. Use addNotificationListener() instead to
+    // check that relevant ATK signals are being emmitted in response to events.
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityController::resetToConsistentState()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityNotificationHandlerAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp (169486 => 169487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp        2014-05-30 15:43:55 UTC (rev 169486)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp        2014-05-30 16:47:06 UTC (rev 169487)
</span><span class="lines">@@ -43,30 +43,7 @@
</span><span class="cx"> WTF::Vector&lt;unsigned&gt; listenerIds;
</span><span class="cx"> NotificationHandlersMap notificationHandlers;
</span><span class="cx"> AccessibilityNotificationHandler* globalNotificationHandler = nullptr;
</span><del>-bool loggingAccessibilityEvents = false;
</del><span class="cx"> 
</span><del>-void printAccessibilityEvent(AtkObject* accessible, const char* signalName, const char* signalValue)
-{
-    // Do not handle state-change:defunct signals, as the AtkObject
-    // associated to them will not be valid at this point already.
-    if (!signalName || !g_strcmp0(signalName, &quot;state-change:defunct&quot;))
-        return;
-
-    if (!accessible || !ATK_IS_OBJECT(accessible))
-        return;
-
-    const char* objectName = atk_object_get_name(accessible);
-    AtkRole objectRole = atk_object_get_role(accessible);
-
-    // Try to always provide a name to be logged for the object.
-    if (!objectName || *objectName == '\0')
-        objectName = &quot;(No name)&quot;;
-
-    GUniquePtr&lt;char&gt; signalNameAndValue(signalValue ? g_strdup_printf(&quot;%s = %s&quot;, signalName, signalValue) : g_strdup(signalName));
-    GUniquePtr&lt;char&gt; accessibilityEventString(g_strdup_printf(&quot;Accessibility object emitted \&quot;%s\&quot; / Name: \&quot;%s\&quot; / Role: %d\n&quot;, signalNameAndValue.get(), objectName, objectRole));
-    InjectedBundle::shared().outputText(String::fromUTF8(accessibilityEventString.get()));
-}
-
</del><span class="cx"> gboolean axObjectEventListener(GSignalInvocationHint* signalHint, unsigned numParamValues, const GValue* paramValues, gpointer data)
</span><span class="cx"> {
</span><span class="cx">     // At least we should receive the instance emitting the signal.
</span><span class="lines">@@ -125,9 +102,6 @@
</span><span class="cx">     } else
</span><span class="cx">         signalName.reset(g_strdup(signalQuery.signal_name));
</span><span class="cx"> 
</span><del>-    if (loggingAccessibilityEvents)
-        printAccessibilityEvent(accessible, signalName.get(), signalValue.get());
-
</del><span class="cx">     if (!jsContext)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="lines">@@ -174,12 +148,6 @@
</span><span class="cx">     disconnectAccessibilityCallbacks();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AccessibilityNotificationHandler::logAccessibilityEvents()
-{
-    connectAccessibilityCallbacks();
-    loggingAccessibilityEvents = true;
-}
-
</del><span class="cx"> void AccessibilityNotificationHandler::setNotificationFunctionCallback(JSValueRef notificationFunctionCallback)
</span><span class="cx"> {
</span><span class="cx">     if (!notificationFunctionCallback) {
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityNotificationHandlerAtkh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h (169486 => 169487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h        2014-05-30 15:43:55 UTC (rev 169486)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h        2014-05-30 16:47:06 UTC (rev 169487)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx">     GRefPtr&lt;AtkObject&gt; platformElement() const { return m_platformElement; }
</span><span class="cx">     void setNotificationFunctionCallback(JSValueRef);
</span><span class="cx">     JSValueRef notificationFunctionCallback() const { return m_notificationFunctionCallback; }
</span><del>-    void logAccessibilityEvents();
</del><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     AccessibilityNotificationHandler();
</span></span></pre>
</div>
</div>

</body>
</html>