Continuing on from https://codereview.chromium.org/2960143002/diff/40001/chrome/browser/ui/chrome_pages.cc#newcode174
Steps to reproduce:
1. Press Ctrl-H to open History
2. Search for a something at the top of the page (so that the URL is something like chrome://history/?q=test)
3. Change to a different tab
4. Press Ctrl-H again.
Actual behavior:
The history tab focuses and the page is refreshed back to chrome://history
Expected behavior:
I'm not sure!
On one hand, it seems weird that we clobber the page state entirely. I could be in the middle of something on that existing History tab (eg, selecting a bunch of items in preparation to delete them) which will be undone when the page is refreshed.
On the other hand, clearing the state is a nice way of making sure the user is always able to get back to the root of the page and that the latest data is shown.
The same behavior happens on all WebUI pages that have browser menu items/shortcuts and multiple URL routes, except for MD Bookmarks, where https://codereview.chromium.org/2960143002 returns to the pre-MD behavior that doesn't clobber the bookmark manager state when pressing Ctrl-Shift-O.
+ some Settings folks in case they have opinions about the correct behavior here.
Comment 1 by tsergeant@chromium.org
, Jul 6 2017