Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Issue 481693004: Omnibox: Prevent Asynchronous Suggestions from Changing Default Match (Closed)

Created:
6 years, 3 months ago by Mark P
Modified:
6 years, 3 months ago
Reviewers:
msw, kmadhusu
CC:
chromium-reviews, James Su, Peter Kasting
Project:
chromium
Visibility:
Public.

Description

Omnibox: Prevent Asynchronous Suggestions from Changing Default Match This is a re-land of https://codereview.chromium.org/471673002/ which was reverted because it caused a failure in interactive_ui_tests InstantExtendedPrefetchTest.SetPrefetchQuery (run #1): [ RUN ] InstantExtendedPrefetchTest.SetPrefetchQuery ../../chrome/browser/ui/search/instant_extended_interactive_uitest.cc:867: Failure Value of: SearchProvider::ShouldPrefetch(*( omnibox()->model()->result().default_match())) Actual: false Expected: true [ FAILED ] InstantExtendedPrefetchTest.SetPrefetchQuery, where TypeParam = and GetParam() = (1613 ms) http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Tests&number=12979 It has two changes: - revises the failing tests - does some requested cleanup of the unit tests The original changelist description follows: --- Calls to the suggest server may normally result in a new inline autocompletion. This can be disruptive because it means pressing enter may bring the user to different places depending on how long he/she waits after typing the last key. This change prevents new suggestions from becoming the default match. In other words, the default match is only allowed to change on a keystroke, not due to a reply coming back from the server. The consequence of this change is that if previously we'd show an inline suggestion on a server reply, now we only show it one keystroke later. I think this trade-off (one keystroke versus inconsistent omnibox behavior) is a good one to make. We still end up with default matches (inline autocompletions within the omnibox) from the suggest server after this change. Here's an example of why: User types "facebo" We send a suggest server request. Server asynchronously returns "facebook" as a top suggestion, beating the server-provided verbatim score for "facebo". We decide not to show it within the omnibox. It's instead shown somewhere in the dropdown. User types "o". We send a suggest server request. We reuse our cached suggestions and suggestion scores. <<< THE KEY We show "facebook" as an inline suggestion because it beats the default verbatim score that gets assigned to "faceboo". (This is the score that we assign by default without having yet received the most recent suggest server response.) We receive the response, which includes "facebook" as a top suggestion, beating the server-provided verbatim score for "faceboo". We show "facebook" as an inline suggestion. i.e., we decide not to demote it because it was already being shown inline TESTED: unit tests plus interactive tests (facebook.com/l, google.com/a) BUG=398135 Committed: https://crrev.com/6c18367d228b0360f2a7d1a06b9b88de61262ff0 Cr-Commit-Position: refs/heads/master@{#293049}

Patch Set 1 #

Patch Set 2 : fix interactive test #

Total comments: 58

Patch Set 3 : mike's extensive changes to tests #

Total comments: 12

Patch Set 4 : Mike's minor comments #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+774 lines, -508 lines) Patch
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 2 3 4 53 chunks +611 lines, -458 lines 0 comments Download
M chrome/browser/ui/search/instant_extended_interactive_uitest.cc View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M components/omnibox/base_search_provider.cc View 1 2 3 4 2 chunks +13 lines, -7 lines 0 comments Download
M components/omnibox/search_provider.h View 1 2 3 4 4 chunks +22 lines, -13 lines 0 comments Download
M components/omnibox/search_provider.cc View 1 2 3 4 11 chunks +108 lines, -26 lines 0 comments Download
M components/omnibox/search_suggestion_parser.h View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M components/omnibox/search_suggestion_parser.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 21 (3 generated)
Mark P
mpearson@chromium.org changed reviewers: + msw@chromium.org
6 years, 3 months ago (2014-08-25 22:40:10 UTC) #1
Mark P
Mike, as discussed, can we finish the review of this change? Once you approve, I'll ...
6 years, 3 months ago (2014-08-25 22:45:51 UTC) #2
Mark P
Mike, as discussed, can we finish the review of this change? Once you approve, I'll ...
6 years, 3 months ago (2014-08-25 22:46:59 UTC) #3
msw
https://codereview.chromium.org/481693004/diff/20001/chrome/browser/autocomplete/search_provider_unittest.cc File chrome/browser/autocomplete/search_provider_unittest.cc (right): https://codereview.chromium.org/481693004/diff/20001/chrome/browser/autocomplete/search_provider_unittest.cc#newcode168 chrome/browser/autocomplete/search_provider_unittest.cc:168: static const ExpectedMatch kEmptyExpectedMatch; nit: use |kEmptyMatch| for less ...
6 years, 3 months ago (2014-08-27 18:44:39 UTC) #4
Mark P
Made extensive revisions to the structure of the tests as requested. Please take another look. ...
6 years, 3 months ago (2014-08-27 23:08:20 UTC) #5
msw
LGTM with minor nits. I can take another look once you've figured out the test ...
6 years, 3 months ago (2014-08-28 19:21:40 UTC) #6
Mark P
I'm still looking the two crashing tests. They seem to crash on something unrelated to ...
6 years, 3 months ago (2014-08-28 20:18:52 UTC) #7
Mark P
mpearson@chromium.org changed reviewers: + kmadhusu@chromium.org
6 years, 3 months ago (2014-08-29 04:18:28 UTC) #8
Mark P
kmadhusu@, Can you please review the instant_extended_interactive test change here and, in general, the implications ...
6 years, 3 months ago (2014-08-29 04:20:27 UTC) #9
kmadhusu
On 2014/08/29 04:20:27, Mark P wrote: > kmadhusu@, > > Can you please review the ...
6 years, 3 months ago (2014-08-29 16:59:44 UTC) #10
kmadhusu
On 2014/08/29 04:20:27, Mark P wrote: > kmadhusu@, > > Can you please review the ...
6 years, 3 months ago (2014-08-29 16:59:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mpearson@chromium.org/481693004/60001
6 years, 3 months ago (2014-09-02 20:22:13 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 3 months ago (2014-09-02 22:50:56 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/49265) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/11213) ios_rel_device ...
6 years, 3 months ago (2014-09-02 22:53:37 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mpearson@chromium.org/481693004/80001
6 years, 3 months ago (2014-09-03 00:06:26 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_rel_device on tryserver.chromium.mac ...
6 years, 3 months ago (2014-09-03 01:40:00 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001) as 60ef42d4bfed8fc0240d167dff880fe6ff14fa6c
6 years, 3 months ago (2014-09-03 02:10:43 UTC) #20
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:22:50 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/6c18367d228b0360f2a7d1a06b9b88de61262ff0
Cr-Commit-Position: refs/heads/master@{#293049}

Powered by Google App Engine
This is Rietveld 408576698