Straighten up Translate browser tests.
There was a potential for a subtle race built into these tests: if the timing of determining the language shifted, the observer may end up waiting forever. This is what's happening in https://codereview.chromium.org/1398823004, and the race becomes visible. Instead, let's reogranize observation of chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED to be managed at the test harness level and ensure that observation begins outside of the message loop pump. Also, let's move a very similar test from browser_browsertest and convert it to use the same machinery. Finally, refactor that test to remove another subtle race: it actually opens two tabs and receives two notifications, but that is only vaguely implied by the test logic. R=jam,jochen,toyoshim@chromium.org BUG=521166 Review URL: https://codereview.chromium.org/1420093004 Cr-Commit-Position: refs/heads/master@{#357176}
Showing
Please register or sign in to comment