Bug 964546 - Add test for ignored roles. r=surkov
authorDavid Bolter <dbolter@mozilla.com>
Tue, 28 Jan 2014 10:27:36 -0500
changeset 181632 be76dc85648200d3df4d4398e444ebee909d7a34
parent 181631 ad73fa1d8abb5359610ad84eb9d9ad4b557fb188
child 181633 da8c61077b5ad1af09b9336b26c03a642601c31e
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs964546
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 964546 - Add test for ignored roles. r=surkov
accessible/tests/mochitest/role/test_aria.html
--- a/accessible/tests/mochitest/role/test_aria.html
+++ b/accessible/tests/mochitest/role/test_aria.html
@@ -125,16 +125,20 @@
       for (a in abstract_roles)
         testRole(abstract_roles[a], ROLE_SECTION);
 
       //////////////////////////////////////////////////////////////////////////
       // roles transformed by ARIA state attributes
       testRole("togglebutton", ROLE_TOGGLE_BUTTON);
 
       //////////////////////////////////////////////////////////////////////////
+      // ignore unknown roles, take first known
+      testRole("unknown_roles", ROLE_PUSHBUTTON);
+
+      //////////////////////////////////////////////////////////////////////////
       // misc roles
       testRole("note", ROLE_NOTE);
       testRole("scrollbar", ROLE_SCROLLBAR);
       testRole("dir", ROLE_LIST);
 
       //////////////////////////////////////////////////////////////////////////
       // test document role map update
       var testDoc = getAccessible(document, [nsIAccessibleDocument]);
@@ -295,16 +299,19 @@
   <div role="select" id="select">select</div>
   <!-- test abstract structure roles -->
   <div role="section" id="section">section</div>
   <div role="sectionhead" id="sectionhead">sectionhead</div>
 
   <!-- roles transformed by ARIA state attributes -->
   <button aria-pressed="true" id="togglebutton">
 
+  <!-- take the first known mappable role -->
+  <div role="wiggly:worm abc123 button" id="unknown_roles">worm button</div>
+
   <!-- misc roles -->
   <div role="note" id="note">note</div>
   <div role="scrollbar" id="scrollbar">scrollbar</div>
 
   <div id="dir" role="directory">
     <div role="listitem">A</div>
     <div role="listitem">B</div>
     <div role="listitem">C</div>