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

Issue 1420093004: Straighten up Translate browser tests. (Closed)

Created:
5 years, 2 months ago by dglazkov
Modified:
5 years, 1 month ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -72 lines) Patch
M chrome/browser/translate/translate_manager_browsertest.cc View 1 2 3 4 5 6 7 3 chunks +115 lines, -24 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -48 lines 0 comments Download

Messages

Total messages: 41 (18 generated)
commit-bot: I haz the power
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
5 years, 2 months ago (2015-10-23 20:48:10 UTC) #2
dglazkov
PTAL.
5 years, 2 months ago (2015-10-23 20:48:31 UTC) #3
commit-bot: I haz the power
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_asan_rel_ng/builds/69537) win_chromium_x64_rel_ng on ...
5 years, 2 months ago (2015-10-23 21:22:56 UTC) #5
commit-bot: I haz the power
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
5 years, 2 months ago (2015-10-23 21:36:58 UTC) #7
commit-bot: I haz the power
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_asan_rel_ng/builds/69577) win_chromium_rel_ng on ...
5 years, 2 months ago (2015-10-23 22:16:40 UTC) #9
dglazkov
Never mind, I need to work on this some more :)
5 years, 2 months ago (2015-10-23 22:31:43 UTC) #10
commit-bot: I haz the power
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
5 years, 2 months ago (2015-10-23 23:38:10 UTC) #12
commit-bot: I haz the power
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_ng/builds/125306)
5 years, 2 months ago (2015-10-24 00:07:00 UTC) #14
commit-bot: I haz the power
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
5 years, 2 months ago (2015-10-24 04:55:04 UTC) #16
commit-bot: I haz the power
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_chromeos_compile_dbg_ng/builds/111899)
5 years, 2 months ago (2015-10-24 05:09:08 UTC) #18
dglazkov
Maybe compile locally first.
5 years, 2 months ago (2015-10-24 05:26:56 UTC) #20
commit-bot: I haz the power
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
5 years, 2 months ago (2015-10-24 05:27:10 UTC) #21
commit-bot: I haz the power
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_rel_ng/builds/131100)
5 years, 2 months ago (2015-10-24 06:01:47 UTC) #23
commit-bot: I haz the power
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
5 years, 1 month ago (2015-10-26 04:17:08 UTC) #25
commit-bot: I haz the power
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_asan_rel_ng/builds/69823)
5 years, 1 month ago (2015-10-26 04:50:28 UTC) #27
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/translate/translate_manager_browsertest.cc File chrome/browser/translate/translate_manager_browsertest.cc (right): https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/translate/translate_manager_browsertest.cc#newcode23 chrome/browser/translate/translate_manager_browsertest.cc:23: TranslateManagerBrowserTest() {} please add a virtual dtor https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/translate/translate_manager_browsertest.cc#newcode61 ...
5 years, 1 month ago (2015-10-26 15:41:36 UTC) #28
jam
removed myself since jochen already reviewed
5 years, 1 month ago (2015-10-26 17:20:50 UTC) #31
commit-bot: I haz the power
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
5 years, 1 month ago (2015-10-30 17:03:58 UTC) #33
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-30 18:26:27 UTC) #35
dglazkov
https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/translate/translate_manager_browsertest.cc File chrome/browser/translate/translate_manager_browsertest.cc (right): https://codereview.chromium.org/1420093004/diff/100001/chrome/browser/translate/translate_manager_browsertest.cc#newcode23 chrome/browser/translate/translate_manager_browsertest.cc:23: TranslateManagerBrowserTest() {} On 2015/10/26 at 15:41:36, jochen wrote: > ...
5 years, 1 month ago (2015-10-30 18:43:53 UTC) #38
commit-bot: I haz the power
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
5 years, 1 month ago (2015-10-30 18:45:06 UTC) #39
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 1 month ago (2015-10-30 19:47:11 UTC) #40
commit-bot: I haz the power
5 years, 1 month ago (2015-10-30 19:48:12 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/edf618bbbe9dd5f3f5034676af058b62d640998f
Cr-Commit-Position: refs/heads/master@{#357176}

Powered by Google App Engine
This is Rietveld 408576698