Closed Bug 1804121 Opened 2 years ago Closed 2 years ago

The weather suggestion can flicker and pop in

Categories

(Firefox :: Address Bar, defect, P2)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

STR

  1. If weather suggestions are already disabled (and they're currently disabled by default), skip to the next step. Otherwise disable them and open a new window
  2. Click in the urlbar to show top sites
  3. Enable weather suggestions and make sure a suggestion is successfully prefetched
  4. Click in the urlbar again

There's flickering in the view: First the top sites are shown without the weather suggestion, and then the weather suggestion pops in. It will keep happening in the window for as long as it's open, weather suggestions are enabled, and the top sites don't change.

The problem is that the view's cached top-sites context is created in step 2 and it's never invalidated or recached. That's because the recache logic only checks the first result after a search finishes, which is a problem because now we're showing results in the top sites context that aren't actually top sites, namely the weather suggestion. We should instead check for the presence of a top site result anywhere in the results list.

Depends on: 1747973

This fixes the bug, adds a task to the existing test, and improves the test by
not waiting for the search to finish before checking the view. It also
simplifies the test a little by collecting URLs from rows into an array and
using Assert.deepEqual() instead of comparing rows one by one.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b36ac328dce2 When caching the top-sites context, check for the presence of a top-sites result anywhere in the list. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Blocks: 1815018
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: