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

Issue 1228723002: Extract duplicated code in browser_tests for closing a browser. (Closed)

Created:
5 years, 5 months ago by erikchen
Modified:
5 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, markusheintz_, rginda+watch_chromium.org, raymes+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extract duplicated code in browser_tests for closing a browser. There is a lot of duplicated code, and much of it only partially duplicated (and hence incorrect). Pull it out into the common methods CloseBrowserSynchronously(), CloseBrowserAsynchronously() and CloseAllBrowsers(). This fixes many Mac tests on Yosemite. BUG=445495 Committed: https://crrev.com/64a6d4440f3ac8fbca44de888406da881a0f4bd1 Cr-Commit-Position: refs/heads/master@{#338340}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Comments from rsesek. #

Patch Set 4 : Fix StartupBrowserCreatorTest. #

Patch Set 5 : Fix ProfileManagerBrowserTest.EphemeralProfile. #

Patch Set 6 : Update a comment. #

Patch Set 7 : Change a method name to prevent collisions. #

Patch Set 8 : Fix bug on Linux/Win. #

Total comments: 2

Patch Set 9 : s/WithoutWaiting/Asynchronously #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -97 lines) Patch
M chrome/browser/app_controller_mac_browsertest.mm View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/content_settings/content_settings_browsertest.cc View 1 chunk +2 lines, -15 lines 0 comments Download
M chrome/browser/extensions/app_background_page_apitest.cc View 3 chunks +1 line, -16 lines 0 comments Download
M chrome/browser/profiles/profile_manager_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/sessions/better_session_restore_browsertest.cc View 3 chunks +5 lines, -20 lines 0 comments Download
M chrome/browser/sessions/session_restore_browsertest.cc View 2 chunks +0 lines, -15 lines 0 comments Download
M chrome/browser/sessions/session_restore_browsertest_chromeos.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/ui/settings_window_manager_browsertest.cc View 2 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_browsertest.cc View 1 2 3 4 5 6 7 8 6 chunks +7 lines, -7 lines 0 comments Download
M chrome/test/base/in_process_browser_test.h View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 5 6 7 8 2 chunks +27 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 33 (15 generated)
erikchen
rsesek: Please review. https://codereview.chromium.org/1228723002/diff/20001/chrome/test/base/in_process_browser_test.h File chrome/test/base/in_process_browser_test.h (right): https://codereview.chromium.org/1228723002/diff/20001/chrome/test/base/in_process_browser_test.h#newcode116 chrome/test/base/in_process_browser_test.h:116: // outstanding resources. There is only ...
5 years, 5 months ago (2015-07-08 22:05:44 UTC) #2
Robert Sesek
LGTM but not an OWNER https://codereview.chromium.org/1228723002/diff/20001/chrome/test/base/in_process_browser_test.cc File chrome/test/base/in_process_browser_test.cc (right): https://codereview.chromium.org/1228723002/diff/20001/chrome/test/base/in_process_browser_test.cc#newcode384 chrome/test/base/in_process_browser_test.cc:384: content::NotificationService::AllSources()); May want to ...
5 years, 5 months ago (2015-07-08 22:19:37 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1228723002/40001
5 years, 5 months ago (2015-07-08 22:27:13 UTC) #6
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/25787) (exceeded global ...
5 years, 5 months ago (2015-07-08 23:10:14 UTC) #8
erikchen
rsesek: PTAL Some minor test fixes and API changes.
5 years, 5 months ago (2015-07-09 00:41:13 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1228723002/80001
5 years, 5 months ago (2015-07-09 00:41:50 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/55797) linux_chromium_rel_ng on ...
5 years, 5 months ago (2015-07-09 00:59:24 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1228723002/120001
5 years, 5 months ago (2015-07-09 01:13:10 UTC) #16
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/78314) (exceeded global ...
5 years, 5 months ago (2015-07-09 02:01:32 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1228723002/140001
5 years, 5 months ago (2015-07-09 06:57:33 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-09 07:37:18 UTC) #23
Robert Sesek
https://codereview.chromium.org/1228723002/diff/140001/chrome/test/base/in_process_browser_test.h File chrome/test/base/in_process_browser_test.h (right): https://codereview.chromium.org/1228723002/diff/140001/chrome/test/base/in_process_browser_test.h#newcode120 chrome/test/base/in_process_browser_test.h:120: void CloseBrowserWithoutWaiting(Browser* browser); Why "WithoutWaiting" instead of "Asynchronously" ?
5 years, 5 months ago (2015-07-09 15:07:05 UTC) #24
erikchen
https://codereview.chromium.org/1228723002/diff/140001/chrome/test/base/in_process_browser_test.h File chrome/test/base/in_process_browser_test.h (right): https://codereview.chromium.org/1228723002/diff/140001/chrome/test/base/in_process_browser_test.h#newcode120 chrome/test/base/in_process_browser_test.h:120: void CloseBrowserWithoutWaiting(Browser* browser); On 2015/07/09 15:07:05, Robert Sesek wrote: ...
5 years, 5 months ago (2015-07-09 23:35:43 UTC) #25
erikchen
jhawkins: Looking for an OWNER review of chrome/
5 years, 5 months ago (2015-07-09 23:38:54 UTC) #27
James Hawkins
lgtm
5 years, 5 months ago (2015-07-10 18:01:26 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1228723002/160001
5 years, 5 months ago (2015-07-10 18:11:57 UTC) #31
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 5 months ago (2015-07-10 19:38:27 UTC) #32
commit-bot: I haz the power
5 years, 5 months ago (2015-07-10 19:39:27 UTC) #33
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/64a6d4440f3ac8fbca44de888406da881a0f4bd1
Cr-Commit-Position: refs/heads/master@{#338340}

Powered by Google App Engine
This is Rietveld 408576698