Bug 883672 - Inherit XULLinkAccessible from XULLabelAccessible + test. r=surkov
authorArnaud Sourioux <six.dsn@gmail.com>
Tue, 20 Aug 2013 16:42:26 -0400
changeset 151597 1d29b04fc7c347ed3e41020c65fc69011970e14b
parent 151596 353b662234995befac891e3ed80724a81aab8b3a
child 151598 16eed749e8aba395fb3eb16de9875c5faa81db7b
push idunknown
push userunknown
push dateunknown
reviewerssurkov
bugs883672
milestone26.0a1
Bug 883672 - Inherit XULLinkAccessible from XULLabelAccessible + test. r=surkov
accessible/src/xul/XULElementAccessibles.cpp
accessible/src/xul/XULElementAccessibles.h
accessible/tests/mochitest/hyperlink/test_general.xul
--- a/accessible/src/xul/XULElementAccessibles.cpp
+++ b/accessible/src/xul/XULElementAccessibles.cpp
@@ -178,22 +178,22 @@ XULTooltipAccessible::NativeRole()
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULLinkAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
 XULLinkAccessible::
   XULLinkAccessible(nsIContent* aContent, DocAccessible* aDoc) :
-  HyperTextAccessibleWrap(aContent, aDoc)
+  XULLabelAccessible(aContent, aDoc)
 {
 }
 
 // Expose nsIAccessibleHyperLink unconditionally
-NS_IMPL_ISUPPORTS_INHERITED1(XULLinkAccessible, HyperTextAccessibleWrap,
+NS_IMPL_ISUPPORTS_INHERITED1(XULLinkAccessible, XULLabelAccessible,
                              nsIAccessibleHyperLink)
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULLinkAccessible. nsIAccessible
 
 void
 XULLinkAccessible::Value(nsString& aValue)
 {
--- a/accessible/src/xul/XULElementAccessibles.h
+++ b/accessible/src/xul/XULElementAccessibles.h
@@ -74,17 +74,17 @@ class XULTooltipAccessible : public Leaf
 public:
   XULTooltipAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
   virtual a11y::role NativeRole();
   virtual uint64_t NativeState();
 };
 
-class XULLinkAccessible : public HyperTextAccessibleWrap
+class XULLinkAccessible : public XULLabelAccessible
 {
 
 public:
   XULLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessible
--- a/accessible/tests/mochitest/hyperlink/test_general.xul
+++ b/accessible/tests/mochitest/hyperlink/test_general.xul
@@ -18,19 +18,16 @@
   <script type="application/javascript"
           src="../events.js" />
 
   <script type="application/javascript"
           src="hyperlink.js" />
 
   <script type="application/javascript">
   <![CDATA[
-    if (MAC)
-      SimpleTest.expectAssertions(1);
-
     function testThis(aID, aAcc, aRole, aAnchorCount, aAnchorName, aURI,
                       aStartIndex, aEndIndex, aValid)
     {
       testRole(aID, aRole);
       is(aAcc.anchorCount, aAnchorCount, "Wrong number of anchors for ID " 
          + aID + "!");
       is(aAcc.getAnchor(0).name, aAnchorName, "Wrong name for ID " + aID + "!");
       is(aAcc.getURI(0).spec, aURI, "URI wrong for ID " + aID + "!");