Closed Bug 1092254 Opened 10 years ago Closed 10 years ago

Use Solo.waitForCondition under the hood in BaseTest.waitForTest

Categories

(Firefox for Android Graveyard :: Testing, defect)

All
Android
defect
Not set
normal

Tracking

(firefox34 fixed, firefox35 fixed, firefox36 fixed)

RESOLVED FIXED
Firefox 36
Tracking Status
firefox34 --- fixed
firefox35 --- fixed
firefox36 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

Details

Attachments

(1 file, 1 obsolete file)

waitForCondition will likely be more robust because we don't have to maintain it.

e.g. waitForTest might be causing background thread starvation issues in bug 1090618.
It should be possible to convert clients of waitForTest to use waitForCondition instead, and then we could remove waitForTest entirely.
(In reply to Geoff Brown [:gbrown] from comment #2)
> It should be possible to convert clients of waitForTest to use
> waitForCondition instead, and then we could remove waitForTest entirely.

True, but it will take a while and I have other things to do - looks like a good mentored bug (someone had my idea! bug 982797).
Comment on attachment 8515139 [details] [diff] [review]
Use Solo.waitForCondition under the hood in BaseTest.waitForTest

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

::: mobile/android/base/tests/BaseTest.java
@@ +333,5 @@
> +     * @deprecated use {@link #waitForCondition(Condition, int)} instead
> +     */
> +    @Deprecated
> +    protected final boolean waitForTest(final BooleanTest t, final int timeout) {
> +        final boolean wasSatisfied = mSolo.waitForCondition(new Condition() {

Nit: I would prefer isSatisfied instead of wasSatisfied per general naming convention, but up to you.
Attachment #8515139 - Flags: review?(liuche) → review+
https://hg.mozilla.org/mozilla-central/rev/3ac2eb20194b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Flags: needinfo?(ryanvm)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: