|
|
DescriptionStraighten 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
Committed: https://crrev.com/edf618bbbe9dd5f3f5034676af058b62d640998f
Cr-Commit-Position: refs/heads/master@{#357176}
Patch Set 1 #Patch Set 2 : Fix my awesome UAF. #Patch Set 3 : I am a dummy. #Patch Set 4 : Changed to use GetMostRecentDetails. #Patch Set 5 : Maybe compile locally first. #Patch Set 6 : Let's try a less opinionated way. #
Total comments: 4
Patch Set 7 : More race-fixing. #Patch Set 8 : Feedback addressed. #
Messages
Total messages: 41 (18 generated)
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/1
PTAL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/20001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
Never mind, I need to work on this some more :)
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/40001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/60001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Maybe compile locally first.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/80001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/transla... File chrome/browser/translate/translate_manager_browsertest.cc (right): https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/transla... chrome/browser/translate/translate_manager_browsertest.cc:23: TranslateManagerBrowserTest() {} please add a virtual dtor https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/transla... chrome/browser/translate/translate_manager_browsertest.cc:61: }; disallow copy & assign
Description was changed from ========== 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 ========== to ========== 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 ==========
jam@chromium.org changed reviewers: - jam@chromium.org
removed myself since jochen already reviewed
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/120001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by dglazkov@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jochen@chromium.org Link to the patchset: https://codereview.chromium.org/1420093004/#ps140001 (title: "Feedback addressed.")
https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/transla... File chrome/browser/translate/translate_manager_browsertest.cc (right): https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/transla... chrome/browser/translate/translate_manager_browsertest.cc:23: TranslateManagerBrowserTest() {} On 2015/10/26 at 15:41:36, jochen wrote: > please add a virtual dtor Done. https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/transla... chrome/browser/translate/translate_manager_browsertest.cc:61: }; On 2015/10/26 at 15:41:36, jochen wrote: > disallow copy & assign This is not necessary, since the base class testing::Test already has them -- right?
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420093004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420093004/140001
Message was sent while issue was closed.
Committed patchset #8 (id:140001)
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/edf618bbbe9dd5f3f5034676af058b62d640998f Cr-Commit-Position: refs/heads/master@{#357176} |