Closed Bug 1275983 Opened 8 years ago Closed 8 years ago

Add relations caching tests.

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: yzen, Assigned: yzen)

References

Details

Attachments

(2 files)

Continuing e10s compatible tests effort: adding state caching tests inspired by https://dxr.mozilla.org/mozilla-central/source/accessible/tests/mochitest/relations/test_update.html
Summary: Add state caching tests. → Add relations caching tests.
Attachment #8757395 - Flags: review?(tbsaunde+mozbugs)
Attached patch 1275983 testsSplinter Review
Attachment #8757396 - Flags: review?(eitan)
Comment on attachment 8757396 [details] [diff] [review]
1275983 tests

Review of attachment 8757396 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!
Attachment #8757396 - Flags: review?(eitan) → review+
Comment on attachment 8757395 [details] [diff] [review]
1275983 cpp patch

>Bug 1275983 - adding proxy support in GetRelationByType for xpcom. r=tbsaunde

support proxies in xpcAccessible::GetRelationByType() or something.  At least it should be add not adding, and the english is kind of wierd.

>+nsAccessibleRelation::nsAccessibleRelation(uint32_t aType,
>+                                           nsTArray<ProxyAccessible*>* aTargets) :

make it const

>+  mType(aType)
>+{
>+  mTargets = do_CreateInstance(NS_ARRAY_CONTRACTID);
>+  for (uint32_t idx = 0; idx < aTargets->Length(); ++idx) {
>+    mTargets->AppendElement(
>+      static_cast<nsIAccessible*>(ToXPC(aTargets->ElementAt(idx))),

I don't see why you need the cast, and given the length a local var would be good though maybe removing the cast fixes that.

>-  Relation rel = Intl()->RelationByType(static_cast<RelationType>(aType));
>-  NS_ADDREF(*aRelation = new nsAccessibleRelation(aType, &rel));
>+  if (IntlGeneric().IsAccessible()) {
>+    Relation rel = Intl()->RelationByType(static_cast<RelationType>(aType));
>+    NS_ADDREF(*aRelation = new nsAccessibleRelation(aType, &rel));
>+    return *aRelation ? NS_OK : NS_ERROR_FAILURE;

*aRelation is always true so you might as well drop the condition

>+  NS_ADDREF(*aRelation = new nsAccessibleRelation(aType, &targets));
>+
>   return *aRelation ? NS_OK : NS_ERROR_FAILURE;

same
Attachment #8757395 - Flags: review?(tbsaunde+mozbugs) → review+
https://hg.mozilla.org/mozilla-central/rev/6e80d6ebb0f9
https://hg.mozilla.org/mozilla-central/rev/dfa30f88a5e5
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: