[WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Dec 2015 17:38:00 +0000 (17:38 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Dec 2015 17:38:00 +0000 (17:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152482

Reviewed by Brent Fulgham.

Tools:

vertical/horizontalScrollbar returns an accessibility element. That element can also be queried
for the same property. On WK2, the element returned will not be valid, but is still present and
that can lead to looping.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::horizontalScrollbar):
(AccessibilityUIElement::verticalScrollbar):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
Tools/ChangeLog
Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

index 23f54f2..dbee32f 100644 (file)
@@ -1,3 +1,12 @@
+2015-12-22  Chris Fleizach  <cfleizach@apple.com>
+
+        [WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
+        https://bugs.webkit.org/show_bug.cgi?id=152482
+
+        Reviewed by Brent Fulgham.
+
+        * platform/mac-wk2/TestExpectations:
+
 2015-12-21  Ryan Haddad  <ryanhaddad@apple.com>
 
         Skipping unsupported test on ios-simulator
index 2bf5dba..418b136 100644 (file)
@@ -364,9 +364,6 @@ webkit.org/b/142726 [ Yosemite ] fast/images/animated-png.html [ Skip ]
 
 [ Debug ] editing/undo/remove-css-property-and-remove-style.html [ Pass Failure ]
 
-# Test for WK1 only
-fast/dom/Window/property-access-on-cached-window-after-frame-removed.html [ Skip ]
-
 ### END OF (3) Unclassified failures
 ########################################
 
index 736b17c..ce5a19b 100644 (file)
@@ -1,3 +1,21 @@
+2015-12-22  Chris Fleizach  <cfleizach@apple.com>
+
+        [WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
+        https://bugs.webkit.org/show_bug.cgi?id=152482
+
+        Reviewed by Brent Fulgham.
+
+        vertical/horizontalScrollbar returns an accessibility element. That element can also be queried
+        for the same property. On WK2, the element returned will not be valid, but is still present and
+        that can lead to looping.
+
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        (AccessibilityUIElement::horizontalScrollbar):
+        (AccessibilityUIElement::verticalScrollbar):
+        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+        (WTR::AccessibilityUIElement::horizontalScrollbar):
+        (WTR::AccessibilityUIElement::verticalScrollbar):
+
 2015-12-22  Xabier Rodriguez Calvar  <calvaris@igalia.com>
 
         Unreviewed.
index 79471e5..e1cd770 100644 (file)
@@ -1292,6 +1292,9 @@ AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned col,
 
 AccessibilityUIElement AccessibilityUIElement::horizontalScrollbar() const
 {
+    if (!m_element)
+        return nullptr;
+    
     BEGIN_AX_OBJC_EXCEPTIONS
     return AccessibilityUIElement([m_element accessibilityAttributeValue:NSAccessibilityHorizontalScrollBarAttribute]);
     END_AX_OBJC_EXCEPTIONS    
@@ -1301,6 +1304,9 @@ AccessibilityUIElement AccessibilityUIElement::horizontalScrollbar() const
 
 AccessibilityUIElement AccessibilityUIElement::verticalScrollbar() const
 {
+    if (!m_element)
+        return nullptr;
+
     BEGIN_AX_OBJC_EXCEPTIONS
     return AccessibilityUIElement([m_element accessibilityAttributeValue:NSAccessibilityVerticalScrollBarAttribute]);
     END_AX_OBJC_EXCEPTIONS        
index 0351d1e..e01ba17 100644 (file)
@@ -1352,6 +1352,9 @@ PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::cellForColumnAndRow(u
 
 PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::horizontalScrollbar() const
 {
+    if (!m_element)
+        return nullptr;
+
     BEGIN_AX_OBJC_EXCEPTIONS
     return AccessibilityUIElement::create([m_element accessibilityAttributeValue:NSAccessibilityHorizontalScrollBarAttribute]);
     END_AX_OBJC_EXCEPTIONS    
@@ -1361,6 +1364,9 @@ PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::horizontalScrollbar()
 
 PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::verticalScrollbar() const
 {
+    if (!m_element)
+        return nullptr;
+    
     BEGIN_AX_OBJC_EXCEPTIONS
     return AccessibilityUIElement::create([m_element accessibilityAttributeValue:NSAccessibilityVerticalScrollBarAttribute]);
     END_AX_OBJC_EXCEPTIONS