Closed Bug 1717507 Opened 3 years ago Closed 3 years ago

Convert remaining places/tests/unifiedcomplete tests to urlbar tests

Categories

(Firefox :: Address Bar, task, P3)

task
Points:
8

Tracking

()

RESOLVED FIXED
91 Branch
Iteration:
91.3 - Jun 28 - Jul 11
Tracking Status
firefox91 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

Ahead of converting UnifiedComplete to being a modern provider, we should port its remaining tests into Urlbar tests. Porting unifiedcomplete tests has been handled on an as-needed basis for the providers split out from UnifiedComplete. Now that only the core functionality of UnifiedComplete remains, all the remaining tests can be ported. By porting them before porting UnifiedComplete itself, we reduce the risk of regressions and also shrink the size of the patch stack that will eventually port UnifiedComplete.

Blocks: 1717509

The last few subtests in test_tags_returnedInSearches.js got substantive changes. This is because urlbar tests reflect the results actually shown in the Urlbar and unifiedcomplete tests just tested what came out of UnifiedComplete. Those last few subtests tested that we show non-matching tags. While UnifiedComplete returns those non-matching tags, UrlbarProviderUnifiedComplete has filtered them out since bug 1522226.

Assignee: nobody → htwyford
Status: NEW → ASSIGNED

There are two substantive changes to test_protocol_swap worth pointing out:

  1. Some subtests now search for <protocol>://sit instead of <protocol>://site. This is because the latter would make the heuristic result the same as the relevant history result and the history result would be deduped. We would thus lose test coverage for that history result.
  2. Tests that expected allMatches no longer expect uri5. The muxer dedupes https://www. URLs in favour of https:// URLs.

Depends on D118636

Changes to these tests are atomic, so I'm going to post them in batches as I finish them. That spreads out the review work and makes them more manageable. Try for the three patches that I just posted: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0bfee83216ca2627c6ddc586b62c7a1445aced71

Depends on: 1719180
Iteration: --- → 91.3 - Jun 28 - Jul 11

Apologies in advance for this review. It's the test I've had to rewrite the most. This is because the unifiedcomplete tests did not care about sorting, and urlbar tests do. Since this test does some complicated stuff with frecency, many of the expected matches had to be reordered in the test. The old test just listed all the uris in descending order in matches, paying no mind to frecency. As I've been doing with other tests, I reversed the order which with they are added to history/bookmarks, to reduce the number of changes required in the sets of expected matches.
That yielded this order, in descending order of frecency:
uri11
uri1
uri4
uri6
uri5
uri7
uri8
uri9
uri10
uri12
uri2
uri3

Keywords: leave-open
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8f01cc154b14 Convert tag tests from unifiedcomplete to urlbar. r=adw https://hg.mozilla.org/integration/autoland/rev/eadeb8987785 Convert URI escaping tests from unifiedcomplete to urlbar. r=adw https://hg.mozilla.org/integration/autoland/rev/1871638cf64a Convert protocol tests from unifiedcomplete to urlbar. r=adw
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8c86b172d18 Convert batch 1 of miscellaneous tests from unifiedcomplete to urlbar. r=adw
Attachment #9230316 - Attachment description: Bug 1717507 - Convert tests bound to an a legacy instance of unifiedcomplete. r?adw! → Bug 1717507 - Convert tests bound to a legacy instance of unifiedcomplete. r?adw!
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2707d006b86a Convert batch 2 of miscellaneous tests from unifiedcomplete to urlbar. r=adw
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b4d32b143c00 Convert tests bound to a legacy instance of unifiedcomplete. r=adw
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: