AX: fix accessibility/loading-iframe-updates-axtree.html test for mac
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Aug 2015 03:12:25 +0000 (03:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Aug 2015 03:12:25 +0000 (03:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148251

Patch by Nan Wang <n_wang@apple.com> on 2015-08-20
Reviewed by Chris Fleizach.

Added a container in order to make the frame accessible. Also, added expected results for
both WK1 and WK2.

* accessibility/loading-iframe-updates-axtree-expected.txt:
* accessibility/loading-iframe-updates-axtree.html:
* platform/mac-wk1/accessibility: Added.
* platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt: Added.
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188746 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/loading-iframe-updates-axtree-expected.txt
LayoutTests/accessibility/loading-iframe-updates-axtree.html
LayoutTests/platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations

index 29159a629bef3ba9187b9d9bc9dab2129ec8dfd0..160c001842da3c07a16fa9f0f79ba8e97c8ca5bf 100644 (file)
@@ -1,3 +1,19 @@
+2015-08-20  Nan Wang  <n_wang@apple.com>
+
+        AX: fix accessibility/loading-iframe-updates-axtree.html test for mac
+        https://bugs.webkit.org/show_bug.cgi?id=148251
+
+        Reviewed by Chris Fleizach.
+
+        Added a container in order to make the frame accessible. Also, added expected results for
+        both WK1 and WK2.
+
+        * accessibility/loading-iframe-updates-axtree-expected.txt:
+        * accessibility/loading-iframe-updates-axtree.html:
+        * platform/mac-wk1/accessibility: Added.
+        * platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt: Added.
+        * platform/mac/TestExpectations:
+
 2015-08-20  Chris Dumez  <cdumez@apple.com>
 
         Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker()
index 30037d8700b86f8a614d3228af791d0f7d59ced3..47c68fd741cf897541c02220125aaead750511b7 100644 (file)
@@ -10,9 +10,9 @@ This tests that if an iframe loads new content after its accessibility object ha
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS iframe.isEqual(newIframe) is true
-PASS scrollarea.isEqual(newScrollarea) is false
-PASS subwebarea.isEqual(newSubwebarea) is false
+iframe.isEqual(newIframe): true
+scrollarea.isEqual(newScrollarea): false
+subwebarea.isEqual(newSubwebarea): false
 PASS newSubwebarea.childrenCount > 0 is true
 
 TEST COMPLETE
index d840507c3d662f625e2cf3ebd3e42ce0e7a2edb6..7a50b1454f06f95aca701ef263eaca9875505b2f 100644 (file)
@@ -11,7 +11,7 @@
         description("This tests that if an iframe loads new content after its accessibility object has already been accessed, the iframe accessibility object's descendants are the new scroll area and web area, not the old deleted ones.");
 
         if (window.accessibilityController) {
-            window.iframe = accessibilityController.accessibleElementById('iframe');
+            window.iframe = accessibilityController.accessibleElementById('iframeContainer');
             window.scrollarea = iframe.childAtIndex(0);
             window.subwebarea = scrollarea.childAtIndex(0);
         }
         window.iframeElement = document.getElementById("iframe");
         iframeElement.addEventListener("load", function() {
             if (window.accessibilityController) {
-                window.newIframe = accessibilityController.accessibleElementById('iframe');
+                window.newIframe = accessibilityController.accessibleElementById('iframeContainer');
                 window.newScrollarea = newIframe.childAtIndex(0);
                 window.newSubwebarea = newScrollarea.childAtIndex(0);
 
-                shouldBeTrue("iframe.isEqual(newIframe)");
-                shouldBeFalse("scrollarea.isEqual(newScrollarea)");
-                shouldBeFalse("subwebarea.isEqual(newSubwebarea)");
+                // for WK1, the scroll area does not change
+                var iframeEqual = iframe.isEqual(newIframe);
+                var scrollareaEqual = scrollarea.isEqual(newScrollarea);
+                var subwebareaEqual = subwebarea.isEqual(newSubwebarea);
+                debug("iframe.isEqual(newIframe): " + iframeEqual);
+                debug("scrollarea.isEqual(newScrollarea): " + scrollareaEqual);
+                debug("subwebarea.isEqual(newSubwebarea): " + subwebareaEqual);
                 shouldBeTrue("newSubwebarea.childrenCount > 0");
             }
 
@@ -51,7 +55,9 @@
 
 <p>Before</p>
 
-<iframe id="iframe" role="group"></iframe>
+<div id="iframeContainer">
+<iframe id="iframe"></iframe>
+</div>
 
 <p>After</p>
 
diff --git a/LayoutTests/platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt b/LayoutTests/platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt
new file mode 100644 (file)
index 0000000..087f2d0
--- /dev/null
@@ -0,0 +1,19 @@
+Before
+
+
+After
+
+End of test
+
+This tests that if an iframe loads new content after its accessibility object has already been accessed, the iframe accessibility object's descendants are the new scroll area and web area, not the old deleted ones.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+iframe.isEqual(newIframe): true
+scrollarea.isEqual(newScrollarea): true
+subwebarea.isEqual(newSubwebarea): false
+PASS newSubwebarea.childrenCount > 0 is true
+
+TEST COMPLETE
+
index 6e56c6aa2d8862102edecd28c2d687b942ab7c1b..ae183ffdda29a886badb2d3cbef3c8d52682b3ef 100644 (file)
@@ -35,9 +35,6 @@ fast/notifications
 fast/dom/Window/slow-unload-handler.html
 fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
 
-# This test fails on release and crashes on debug because of trying to use isEqual() with undefined objects
-webkit.org/b/126066 accessibility/loading-iframe-updates-axtree.html [ Failure Crash ]
-
 webkit.org/b/116636 accessibility/document-attributes.html [ Failure ]
 
 # Accessibility tests with missing AccessibilityController functionality.