Closed Bug 462314 Opened 16 years ago Closed 16 years ago

Refactor test_aria_activedescendant.html

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: MarcoZ, Assigned: MarcoZ)

References

Details

(Keywords: access)

Attachments

(1 file)

Refactor the file so it uses common files and functions.
Attached patch PatchSplinter Review
Assignee: nobody → marco.zehe
Status: NEW → ASSIGNED
Attachment #345464 - Flags: review?(surkov.alexander)
Comment on attachment 345464 [details] [diff] [review]
Patch


>     var gContainerFocused = false;
> 
>     function doTest()
>     {
>       var focusHandler = {
>         handleEvent: function handleEvent(aEvent) {
>           var target = aEvent.target;
>           if (target.nodeType ==  ELEMENT_NODE &&
>               target.getAttribute("id") == "container")
>             gContainerFocused = true;
>         }
>       };
> 
>       var container = document.getElementById("container");
>       container.addEventListener("focus", focusHandler, false);
> 
>-      gAccRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
>-                      getService(nsIAccessibleRetrieval);
> 
>       var item2 = document.getElementById("item2");

remove this line and

>+      var item2Acc = getAccessible(item2);

pass "item2"

>+      if (!item2Acc) {
>+        SimpleTest.finish();
>+        return;
>+      }

nit: I would prefer
if  (item2Acc) {
}

once you are here please remove event listener at the end.

>       SimpleTest.finish();
>     }
Attachment #345464 - Flags: review?(surkov.alexander) → review+
Pushed with Surkov's comments addressed in changeset:
http://hg.mozilla.org/mozilla-central/rev/1ac20b494c0f
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: