Use Solo.waitForCondition under the hood in BaseTest.waitForTest

RESOLVED FIXED in Firefox 34

Status

()

Firefox for Android
Testing
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mcomella, Assigned: mcomella)

Tracking

unspecified
Firefox 36
All
Android
Points:
---

Firefox Tracking Flags

(firefox34 fixed, firefox35 fixed, firefox36 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

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.
Created attachment 8515139 [details] [diff] [review]
Use Solo.waitForCondition under the hood in BaseTest.waitForTest
Attachment #8515139 - Flags: review?(liuche)
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+
Created attachment 8515382 [details] [diff] [review]
Use Solo.waitForCondition under the hood in BaseTest.waitForTest

was -> is
Attachment #8515139 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/3ac2eb20194b
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Flags: needinfo?(ryanvm)
https://hg.mozilla.org/releases/mozilla-aurora/rev/180de799976d
https://hg.mozilla.org/releases/mozilla-beta/rev/cdd31f8931ae
status-firefox34: --- → fixed
status-firefox35: --- → fixed
status-firefox36: --- → fixed
Flags: needinfo?(ryanvm)
You need to log in before you can comment on or make changes to this bug.