Allow Search Keywords with ":" or "/"
Previously these keyword would not be recognized because we try to clean up the user's input before checking to see if it matches a keyword. This changelist makes use only try various cleaning of the user's input until we get a match (or tried all the cleaning steps we have). For example if the input such as "wiki:" matches a keyword, we don't do any cleanup. Tested amply with unit tests. Also tested interactively. Some key interactive cases: * typing an unusual keyword and pressing tab enters keyword mode. * typing an unusual keyword and pressing space enters keyword mode. * putting the cursor in the middle of a string and pressing space in a while that would make the left side into an unusual keyword puts the user into keyword mode * backspacing out of keyword mode works correctly * these suggestions for unusual keywords appear in the dropdown when the user types a prefix of them. * when the user is in keyword mode for one of these unusual keywords, switching tabs and switching back keeps the user in keyword mode. * when typing an unusual keyword with an additional thing that can be cleaned up (for example www.wiki: or http://wiki:), pressing space at the end of the keyword does NOT enter keyword mode. This seems reasonable to me. Pressing tab at the end of the keyword does enter keyword mode. Yay for fixing a four-digit bug. (It's one of the ~40 oldest existing bugs in chromium.) Bug: 2740 Change-Id: Ie53089421956acf5eb58fe1d1b53932e10169178 Reviewed-on: https://chromium-review.googlesource.com/664251 Commit-Queue: Mark Pearson <mpearson@chromium.org> Reviewed-by:Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#502747}
Showing
This diff is collapsed.
Please register or sign in to comment