Closed Bug 469985 Opened 11 years ago Closed 11 years ago

turn the test from bug 354745 into mochitest

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 2 open bugs)

Details

(Keywords: access)

Attachments

(1 file)

No description provided.
Keywords: access
OS: Mac OS X → All
Version: unspecified → Trunk
Blocks: a11ytestdev
No longer blocks: 452564
Assignee: nobody → surkov.alexander
Blocks: eventa11y
Attached patch patchSplinter Review
Attachment #356167 - Flags: review?(marco.zehe)
Comment on attachment 356167 [details] [diff] [review]
patch

Aaron, I'm not sure you'd like to review mochitest changes but please ensure these mochitests correspond to testcase from bug 354745.
Attachment #356167 - Flags: review?(aaronleventhal)
Status: NEW → ASSIGNED
Attachment #356167 - Flags: review?(aaronleventhal) → review?(david.bolter)
Attachment #356167 - Flags: review?(david.bolter)
Comment on attachment 356167 [details] [diff] [review]
patch

Good work!
Attachment #356167 - Flags: review?(marco.zehe) → review+
Comment on attachment 356167 [details] [diff] [review]
patch

Nice. Great to have this test functionality in mochitests!

>+      var eventTypes = (!aEventTypes) ? kShowEvents : aEventTypes;

Note equivalent statement:

var eventTypes = aEventTypes || kShowEvents;

Anyways... r+ing, and re-adding Aaron to review coverage.
Attachment #356167 - Flags: review?(david.bolter)
Attachment #356167 - Flags: review?(aaronleventhal)
Attachment #356167 - Flags: review+
(In reply to comment #4)
> (From update of attachment 356167 [details] [diff] [review])
> Nice. Great to have this test functionality in mochitests!
> 
> >+      var eventTypes = (!aEventTypes) ? kShowEvents : aEventTypes;
> 
> Note equivalent statement:
> 
> var eventTypes = aEventTypes || kShowEvents;

sorry, I didn't catch, why?
Alex, are there any particular places I should look? I don't want to review the whole thing.
(In reply to comment #6)
> Alex, are there any particular places I should look? I don't want to review the
> whole thing.

Aaron, I believe it is sufficient if you look through the doTests() function and the HTML snippets below that to see if we covered all testcases you can think of/have encountered.
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 356167 [details] [diff] [review] [details])
> > Nice. Great to have this test functionality in mochitests!
> > 
> > >+      var eventTypes = (!aEventTypes) ? kShowEvents : aEventTypes;
> > 
> > Note equivalent statement:
> > 
> > var eventTypes = aEventTypes || kShowEvents;
> 
> sorry, I didn't catch, why?

It is just a code style thing. I've seen more of the latter used in javascript toolkits.
Aaron, you need to look at test_events_mutation.html file. In function doTests() see calls gQueue.push(new invokerObjects()), they defines sequence of actions. Then look at every invokerObject, there you will find actions they do (invoker method) and events they are listen. For example, the line gQueue.push(new changeStyle(id, "display", "none", kHideEvents)); means we set value of  display style to "none" and waits for hidden events (EVENT_ASYNCH_HIDE and EVENT_REORDER).
David, I just don't get why these are equivalent.
Surkov, a || b || c .... means something different in JS than in C++. 
It evaluates to the first variable that is not null. It's just shorter than using ? : for some things, but it's a style nit that JS geeks like David love :)
Attachment #356167 - Flags: review?(aaronleventhal) → review+
Comment on attachment 356167 [details] [diff] [review]
patch

This looks very cool. I didn't realize how important bug 472662 might be. Some screen readers need REORDER events to update their virtual buffer.
(In reply to comment #11)
> Surkov, a || b || c .... means something different in JS than in C++. 
> It evaluates to the first variable that is not null. It's just shorter than
> using ? : for some things, but it's a style nit that JS geeks like David love
> :)

Ok, thanks. I mixed up || and |.
http://hg.mozilla.org/mozilla-central/rev/ae21c96c4355
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Depends on: 473765
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.