Refactor test_aria_activedescendant.html

RESOLVED FIXED

Status

()

Core
Disability Access APIs
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: MarcoZ, Assigned: MarcoZ)

Tracking

({access})

Trunk
access
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Refactor the file so it uses common files and functions.
(Assignee)

Comment 1

10 years ago
Created attachment 345464 [details] [diff] [review]
Patch
Assignee: nobody → marco.zehe
Status: NEW → ASSIGNED
Attachment #345464 - Flags: review?(surkov.alexander)

Comment 2

10 years ago
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+
(Assignee)

Comment 3

10 years ago
Pushed with Surkov's comments addressed in changeset:
http://hg.mozilla.org/mozilla-central/rev/1ac20b494c0f
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.