<!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>[188290] branches/safari-601.1-branch</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/188290">188290</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2015-08-11 14:01:46 -0700 (Tue, 11 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/187595">r187595</a>.

    2015-07-30  Nan Wang  &lt;n_wang@apple.com&gt;

    aria-liveregions-notifications tests are very flaky
    https://bugs.webkit.org/show_bug.cgi?id=147299
    &lt;rdar://problem/21998675&gt;

    Reviewed by Chris Fleizach.

    These tests were flaky because they relied on timer notification callbacks.
    Fixed these tests by using different objects to capture the notifications instead.

    * platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt:
    * platform/mac/accessibility/aria-liveregions-notifications-always-sent.html:
    * platform/mac/accessibility/aria-liveregions-notifications-expected.txt:
    * platform/mac/accessibility/aria-liveregions-notifications.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6011branchLayoutTestsChangeLog">branches/safari-601.1-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationsalwayssentexpectedtxt">branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationsalwayssenthtml">branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent.html</a></li>
<li><a href="#branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationsexpectedtxt">branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-expected.txt</a></li>
<li><a href="#branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationshtml">branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications.html</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#branchessafari6011branch">branches/safari-601.1-branch/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6011branch"></a>
<div class="propset"><h4>Property changes: branches/safari-601.1-branch</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">   + /trunk:53455,186677,186900,186980,187126,187148,187194,187439,187441,187443,187595,187933
</span><a id="branchessafari6011branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/ChangeLog (188289 => 188290)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/ChangeLog        2015-08-11 20:47:08 UTC (rev 188289)
+++ branches/safari-601.1-branch/LayoutTests/ChangeLog        2015-08-11 21:01:46 UTC (rev 188290)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2015-08-11  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Merge r187595.
+
+    2015-07-30  Nan Wang  &lt;n_wang@apple.com&gt;
+
+            aria-liveregions-notifications tests are very flaky
+            https://bugs.webkit.org/show_bug.cgi?id=147299
+            &lt;rdar://problem/21998675&gt;
+
+            Reviewed by Chris Fleizach.
+
+            These tests were flaky because they relied on timer notification callbacks.
+            Fixed these tests by using different objects to capture the notifications instead.
+
+            * platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt:
+            * platform/mac/accessibility/aria-liveregions-notifications-always-sent.html:
+            * platform/mac/accessibility/aria-liveregions-notifications-expected.txt:
+            * platform/mac/accessibility/aria-liveregions-notifications.html:
+
</ins><span class="cx"> 2015-08-11  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r188195. rdar://problem/22102378
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationsalwayssentexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt (188289 => 188290)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt        2015-08-11 20:47:08 UTC (rev 188289)
+++ branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt        2015-08-11 21:01:46 UTC (rev 188290)
</span><span class="lines">@@ -1,11 +1,12 @@
</span><del>-Test test0test1test2
</del><ins>+Test test1
+test2
</ins><span class="cx"> This tests that ARIA live region notifications are sent even when an assistive technology is not accessing them directly on each update.
</span><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS addedNotification is true
-PASS liveRegionChangeCount == 3 is true
</del><ins>+PASS addedNotification1 is true
+PASS addedNotification2 is true
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationsalwayssenthtml"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent.html (188289 => 188290)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent.html        2015-08-11 20:47:08 UTC (rev 188289)
+++ branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent.html        2015-08-11 21:01:46 UTC (rev 188290)
</span><span class="lines">@@ -5,9 +5,10 @@
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body id=&quot;body&quot;&gt;
</span><span class="cx"> 
</span><del>-&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;
</del><ins>+&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion1&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;
</ins><span class="cx"> Test
</span><span class="cx"> &lt;/div&gt;
</span><ins>+&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion2&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span><span class="cx"> &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -19,44 +20,43 @@
</span><span class="cx"> 
</span><span class="cx">     if (window.accessibilityController) {
</span><span class="cx"> 
</span><del>-        liveRegion = accessibilityController.accessibleElementById(&quot;liveregion&quot;);
</del><ins>+        var liveRegion1 = accessibilityController.accessibleElementById(&quot;liveregion1&quot;);
+        var liveRegion2 = accessibilityController.accessibleElementById(&quot;liveregion2&quot;);
</ins><span class="cx"> 
</span><del>-        var liveRegionChangeCount = 0;
-        function ariaCallback(notification) {
</del><ins>+        var liveRegion1Changed = false;
+        var liveRegion2Changed = false;
+        function ariaCallback1(notification) {
</ins><span class="cx">            if (notification == &quot;AXLiveRegionChanged&quot;) {
</span><del>-               liveRegionChangeCount++;
</del><ins>+               liveRegion1Changed = true;
+               finishTest();
</ins><span class="cx">            }
</span><span class="cx">         }
</span><del>-        var addedNotification = liveRegion.addNotificationListener(ariaCallback);
-        shouldBe(&quot;addedNotification&quot;, &quot;true&quot;);
</del><ins>+        function ariaCallback2(notification) {
+           if (notification == &quot;AXLiveRegionChanged&quot;) {
+               liveRegion2Changed = true;
+               finishTest();
+           }
+        }
</ins><span class="cx"> 
</span><ins>+        addedNotification1 = liveRegion1.addNotificationListener(ariaCallback1);
+        shouldBe(&quot;addedNotification1&quot;, &quot;true&quot;);
+        addedNotification2 = liveRegion2.addNotificationListener(ariaCallback2);
+        shouldBe(&quot;addedNotification2&quot;, &quot;true&quot;);
+
</ins><span class="cx">         // this should trigger our live region callback for a new element.
</span><del>-        for (var k = 0; k &lt; 3; k++) {
-            // AXLiveRegionsChanged notifications are sent after a delay, so in order to ensure we 
-            // get an notification for each operation we should avoid coalescing which can occur
-            doSetTimeout(k);
</del><ins>+        for (var k = 1; k &lt; 3; k++) {
+            var textNode = document.createTextNode(&quot;test&quot; + k);
+            document.getElementById(&quot;liveregion&quot; + k).appendChild(textNode);
</ins><span class="cx">         }
</span><del>-
-        // add a short delay to check after all the operations if we have exactly three notificaitons
-        setTimeout(&quot;finishTest()&quot;, 200);
</del><span class="cx">     }
</span><span class="cx"> 
</span><del>-    function doSetTimeout(k) {
-        setTimeout(function() {
-            operation(k);
-        }, k * 30);
-    }
-
-    function operation(k) {
-        var textNode = document.createTextNode(&quot;test&quot; + k);
-        document.getElementById(&quot;liveregion&quot;).appendChild(textNode);
-    }
-    
</del><span class="cx">     function finishTest() {
</span><del>-        // We should get a total of three live region changes.
-        liveRegion.removeNotificationListener();
-        shouldBeTrue(&quot;liveRegionChangeCount == 3&quot;);
-        finishJSTest();
</del><ins>+        // We should get a total of two live region changes.
+        if (liveRegion1Changed &amp;&amp; liveRegion2Changed) {
+            liveRegion1.removeNotificationListener();
+            liveRegion2.removeNotificationListener();
+            finishJSTest();
+        }        
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-expected.txt (188289 => 188290)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-expected.txt        2015-08-11 20:47:08 UTC (rev 188289)
+++ branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-expected.txt        2015-08-11 21:01:46 UTC (rev 188290)
</span><span class="lines">@@ -1,11 +1,16 @@
</span><del>- new text element
</del><ins>+changed text
+
+new text element
+
</ins><span class="cx"> This tests that ARIA live regions are sending out the correct notifications. We perform four operations (add, remove, change text, change alt tag), each one should trigger a live region notification
</span><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS addedNotification is true
-PASS liveRegionChangeCount == 4 is true
</del><ins>+PASS addedNotification1 is true
+PASS addedNotification2 is true
+PASS addedNotification3 is true
+PASS addedNotification4 is true
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="branchessafari6011branchLayoutTestsplatformmacaccessibilityarialiveregionsnotificationshtml"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications.html (188289 => 188290)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications.html        2015-08-11 20:47:08 UTC (rev 188289)
+++ branches/safari-601.1-branch/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications.html        2015-08-11 21:01:46 UTC (rev 188290)
</span><span class="lines">@@ -5,11 +5,21 @@
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body id=&quot;body&quot;&gt;
</span><span class="cx"> 
</span><del>-&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;
-&lt;h3 id=&quot;innerlive&quot;&gt;text&lt;/h3&gt;
</del><ins>+&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion1&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;
+&lt;h3 id=&quot;innerlive1&quot;&gt;text&lt;/h3&gt;
+&lt;/div&gt;
+
+&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion2&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;&lt;/div&gt;
+
+&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion3&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;
</ins><span class="cx"> &lt;img src=&quot;test.gif&quot; width=100 height=100 alt=&quot;alt text&quot; tabindex=0 id=&quot;image&quot;&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+&lt;div role=&quot;group&quot; tabindex=0 id=&quot;liveregion4&quot; aria-live=&quot;polite&quot; aria-relevant=&quot;additions&quot;&gt;
+&lt;h3 id=&quot;innerlive2&quot;&gt;text&lt;/h3&gt;
+&lt;/div&gt;
+
+
</ins><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span><span class="cx"> &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -18,63 +28,93 @@
</span><span class="cx"> 
</span><span class="cx">     description(&quot;This tests that ARIA live regions are sending out the correct notifications. We perform four operations (add, remove, change text, change alt tag), each one should trigger a live region notification&quot;);
</span><span class="cx"> 
</span><del>-    var liveRegion = 0;
-    var liveRegionChangeCount = 0;
-    function ariaCallback(notification) {
</del><ins>+    var receivedTextChangeNotification = false;
+    var receivedNewElementNotification = false;
+    var receivedAlternativeChangeNotification = false;
+    var receivedRemoveElementNotification = false;
+    
+    // notification callbacks
+    function textChangeCallback(notification) {
</ins><span class="cx">         if (notification == &quot;AXLiveRegionChanged&quot;) {
</span><del>-            liveRegionChangeCount++;
</del><ins>+            receivedTextChangeNotification = true;
+            finishTest();
</ins><span class="cx">         }
</span><span class="cx">     }
</span><ins>+    function newElementCallback(notification) {
+        if (notification == &quot;AXLiveRegionChanged&quot;) {
+            receivedNewElementNotification = true;
+            finishTest();
+        }
+    }
+    function alternativeChangeCallback(notification) {
+        if (notification == &quot;AXLiveRegionChanged&quot;) {
+            receivedAlternativeChangeNotification = true;
+            finishTest();
+        }
+    }
+    function removeElementCallback(notification) {
+        if (notification == &quot;AXLiveRegionChanged&quot;) {
+            receivedRemoveElementNotification = true;
+            finishTest();
+        }
+    }
</ins><span class="cx"> 
</span><ins>+    function finishTest() {
+        // We should get a total of four live region changes.
+        if(receivedTextChangeNotification
+           &amp;&amp; receivedNewElementNotification
+           &amp;&amp; receivedAlternativeChangeNotification
+           &amp;&amp; receivedRemoveElementNotification) {
+            liveRegion1.removeNotificationListener();
+            liveRegion2.removeNotificationListener();
+            liveRegion3.removeNotificationListener();
+            liveRegion4.removeNotificationListener();
+            finishJSTest();
+        }
+    }
+
</ins><span class="cx">     if (window.accessibilityController) {
</span><span class="cx"> 
</span><del>-        liveRegion = accessibilityController.accessibleElementById(&quot;liveregion&quot;);
</del><ins>+        liveRegion1 = accessibilityController.accessibleElementById(&quot;liveregion1&quot;);
+        liveRegion2 = accessibilityController.accessibleElementById(&quot;liveregion2&quot;);
+        liveRegion3 = accessibilityController.accessibleElementById(&quot;liveregion3&quot;);
+        liveRegion4 = accessibilityController.accessibleElementById(&quot;liveregion4&quot;);
</ins><span class="cx"> 
</span><del>-        var addedNotification = liveRegion.addNotificationListener(ariaCallback);
-        shouldBe(&quot;addedNotification&quot;, &quot;true&quot;);
</del><ins>+        var addedNotification1 = liveRegion1.addNotificationListener(textChangeCallback);
+        shouldBe(&quot;addedNotification1&quot;, &quot;true&quot;);
+        var addedNotification2 = liveRegion2.addNotificationListener(newElementCallback);
+        shouldBe(&quot;addedNotification2&quot;, &quot;true&quot;);
+        var addedNotification3 = liveRegion3.addNotificationListener(alternativeChangeCallback);
+        shouldBe(&quot;addedNotification3&quot;, &quot;true&quot;);
+        var addedNotification4 = liveRegion4.addNotificationListener(removeElementCallback);
+        shouldBe(&quot;addedNotification4&quot;, &quot;true&quot;);
</ins><span class="cx"> 
</span><del>-        // AXLiveRegionsChanged notifications are sent after a delay, so in order to ensure we 
-        // get an notification for each operation we should avoid coalescing which can occur
-        setTimeout(&quot;textChangeOperation()&quot;, 0);
-        setTimeout(&quot;newElementOperation()&quot;, 30);
-        setTimeout(&quot;alternativeChangeOperation()&quot;, 60);
-        setTimeout(&quot;removeElementOperation()&quot;, 90);
-
-        // add a short delay to check after all the operations if we have exactly four notificaitons
-        setTimeout(&quot;finishTest()&quot;, 200);
</del><ins>+        textChangeOperation();
+        newElementOperation();
+        alternativeChangeOperation();
+        removeElementOperation();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     function textChangeOperation() {
</span><span class="cx">         // this should trigger our live region callback for a text change.
</span><del>-        document.getElementById(&quot;liveregion&quot;).childNodes[0].innerText = &quot;changed text&quot;;
</del><ins>+        document.getElementById(&quot;innerlive1&quot;).innerText = &quot;changed text&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     function newElementOperation() {
</span><span class="cx">         // this should trigger our live region callback for a new element.
</span><del>-        document.getElementById(&quot;liveregion&quot;).innerHTML += &quot;new text element&quot;;
</del><ins>+        document.getElementById(&quot;liveregion2&quot;).innerHTML += &quot;new text element&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     function alternativeChangeOperation() {
</span><span class="cx">         // this should also trigger our live region change because its a text alternative change. 
</span><span class="cx">         document.getElementById(&quot;image&quot;).setAttribute('alt', &quot;new image text&quot;);
</span><del>-
-        // Access the accessibility tree here because AX won't post the live region change
-        // notification twice when the children have already been marked as dirty.
-        liveRegion.childAtIndex(0);
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     function removeElementOperation() {
</span><span class="cx">         // this should trigger our live region callback for a removed element.
</span><del>-        document.getElementById(&quot;liveregion&quot;).removeChild(document.getElementById(&quot;innerlive&quot;)); 
</del><ins>+        document.getElementById(&quot;liveregion4&quot;).removeChild(document.getElementById(&quot;innerlive2&quot;)); 
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    function finishTest() {
-        // We should get a total of four live region changes.
-        liveRegion.removeNotificationListener();
-        shouldBeTrue(&quot;liveRegionChangeCount == 4&quot;);
-        finishJSTest();
-    }
-
</del><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre>
</div>
</div>

</body>
</html>