Open Bug 1839310 Opened 2 years ago Updated 8 months ago

test_autocomplete_with_composition_on_input.html is too slow

Categories

(Toolkit :: Autocomplete, defect, P1)

Desktop
All
defect

Tracking

()

ASSIGNED

People

(Reporter: masayuki, Assigned: masayuki)

Details

(Keywords: inputmethod)

Attachments

(1 file)

The test takes a couple of minutes or more because of wrong condition here:
https://searchfox.org/mozilla-central/rev/a5da23c8c9c1151dcdf0ca34b3cfd0a4d0fc3b48/toolkit/content/tests/chrome/file_autocomplete_with_composition.js#79-82

      waitForCondition(() => {
        this._controller.searchStatus >=
          Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH;
      }, this._checkResult.bind(this));

nsIAutoCompleteController.searchStatus may be other values because nsAutoCompleteController::StartSearch() does not reset the state. I think that this can be != Ci.nsIAutoCompleteController.STATUS_SEARCHING.

(I think that it's too risky to update mSearchStatus with composition state change because it may not represent the state in some cases, e.g., even if StopSearch() is called, it may be set to STATUS_COMPLETE_* or stay STATUS_NONE, so, it's hard to use the value in some cases.)

Oh, and also the arrow function never returns true because it does not have return statement even though wrapping with {}...

nsAutoCompleteController::mSearchStatus may be STATUS_NONE,
STATUS_COMPLETE_NO_MATCH or STATUS_COMPLETE_MATCH while it temporarily
stops working due to active IME composition because it's not updated with
composition state change. From point of view of the test, the important
point is, it's not searching and won't popup the suggest list. Therefore,
it's enough to check whether the state is no STATUS_SEARCHING.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/0748dcb01937 Make `nsDoTestsForAutoCompleteWithComposition.prototype._doTests` restart test if the state is not "searching" r=sgalich

That's odd. It seems that something is not correctly reset in the test.

Flags: needinfo?(masayuki)

The severity field is not set for this bug.
:serg, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sgalich)
Severity: N/A → S3
Flags: needinfo?(sgalich)

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:masayuki, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(sgalich)
Flags: needinfo?(masayuki)

I still don't have much time to investigate the failure of test_findbar.xhtml which runs after the test.

Flags: needinfo?(sgalich)
Flags: needinfo?(masayuki)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: