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

Issue 1225093003: mac: Flush the autorelease pool after making a browser window in browser tests. (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@browser_test_base
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mac: Flush the autorelease pool after making a browser window in browser tests. Failure to do so causes some Chrome NSObjects to not be destroyed until after the rest of the test infrastructure has been torn down. This causes failures when running browser tests on Yosemite. This CL moves the method OpenURLOffTheRecord from the ui_test_utils namespace into an instance method on InProcessBrowserTest. This allows the method to flush the autoreleasepool on Macs. This CL adds the method OpenDevToolsWindow to InProcessBrowserTest. This is a wrapper around DevToolsWindow::OpenDevToolsWindow that flushes the autoreleasepool on Macs. BUG=445495 Committed: https://crrev.com/ff8b5c7ae0273be9b56d64930aaee1f5f13e1eba Cr-Commit-Position: refs/heads/master@{#338593}

Patch Set 1 #

Patch Set 2 : Patch Set for CQ. #

Patch Set 3 : Patch set for review. #

Patch Set 4 : Fix grammar on some comments. #

Total comments: 2

Patch Set 5 : Comments from rsesek. #

Patch Set 6 : Add missing include. #

Total comments: 7

Patch Set 7 : Comments from jhawkins. #

Patch Set 8 : Comments from jhawkins, round two. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -80 lines) Patch
M chrome/browser/apps/app_browsertest.cc View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/extensions/api/cookies/cookies_apitest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/extension_action/browser_action_apitest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/preference/preference_apitest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_apitest.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_apitest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_context_menu_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_icon_source_apitest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_incognito_apitest.cc View 1 2 3 4 5 6 6 chunks +9 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extension_messages_apitest.cc View 1 2 3 4 7 chunks +10 lines, -13 lines 0 comments Download
M chrome/browser/extensions/extension_override_apitest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_view_host_factory_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/lazy_background_page_apitest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/geolocation/geolocation_browsertest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/prefetch/prefetch_browsertest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profiles/host_zoom_map_browsertest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_browsertest.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/webui_webview_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/in_process_browser_test.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 5 6 7 4 chunks +24 lines, -0 lines 0 comments Download
A chrome/test/base/in_process_browser_test_mac.cc View 1 2 3 4 5 6 7 1 chunk +94 lines, -0 lines 0 comments Download
M chrome/test/base/ui_test_utils.h View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/test/base/ui_test_utils.cc View 1 2 3 4 5 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 37 (14 generated)
erikchen
rsesek: Please review.
5 years, 5 months ago (2015-07-09 01:19:10 UTC) #3
Robert Sesek
https://codereview.chromium.org/1225093003/diff/60001/chrome/test/base/in_process_browser_test.cc File chrome/test/base/in_process_browser_test.cc (right): https://codereview.chromium.org/1225093003/diff/60001/chrome/test/base/in_process_browser_test.cc#newcode434 chrome/test/base/in_process_browser_test.cc:434: return ui_test_utils::OpenURLOffTheRecord(profile, url); For this case, how will callers ...
5 years, 5 months ago (2015-07-09 15:11:46 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1225093003/80001
5 years, 5 months ago (2015-07-10 00:01:50 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/71797) ios_dbg_simulator_ninja on ...
5 years, 5 months ago (2015-07-10 00:06:28 UTC) #8
erikchen
https://codereview.chromium.org/1225093003/diff/60001/chrome/test/base/in_process_browser_test.cc File chrome/test/base/in_process_browser_test.cc (right): https://codereview.chromium.org/1225093003/diff/60001/chrome/test/base/in_process_browser_test.cc#newcode434 chrome/test/base/in_process_browser_test.cc:434: return ui_test_utils::OpenURLOffTheRecord(profile, url); On 2015/07/09 15:11:46, Robert Sesek wrote: ...
5 years, 5 months ago (2015-07-10 00:14:41 UTC) #9
Robert Sesek
LGTM but not an OWNER
5 years, 5 months ago (2015-07-10 19:15:36 UTC) #10
erikchen
jhawkins: Looking for an OWNER review.
5 years, 5 months ago (2015-07-10 19:16:39 UTC) #12
James Hawkins
On 2015/07/10 19:16:39, erikchen wrote: > jhawkins: Looking for an OWNER review. Ping back when ...
5 years, 5 months ago (2015-07-10 19:47:48 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/1225093003/80001
5 years, 5 months ago (2015-07-10 20:06:10 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/43232) linux_chromium_compile_dbg_32_ng on ...
5 years, 5 months ago (2015-07-10 20:19:41 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1225093003/100001
5 years, 5 months ago (2015-07-10 21:24:29 UTC) #20
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-10 22:07:35 UTC) #22
erikchen
On 2015/07/10 22:07:35, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
5 years, 5 months ago (2015-07-10 22:12:29 UTC) #23
James Hawkins
https://codereview.chromium.org/1225093003/diff/100001/chrome/test/base/in_process_browser_test.h File chrome/test/base/in_process_browser_test.h (right): https://codereview.chromium.org/1225093003/diff/100001/chrome/test/base/in_process_browser_test.h#newcode127 chrome/test/base/in_process_browser_test.h:127: void OpenDevToolsWindow(content::WebContents* web_contents); The CL description doesn't mention OpenDevToolsWindow. ...
5 years, 5 months ago (2015-07-10 23:01:21 UTC) #24
erikchen
On 2015/07/10 23:01:21, James Hawkins wrote: > https://codereview.chromium.org/1225093003/diff/100001/chrome/test/base/in_process_browser_test.h > File chrome/test/base/in_process_browser_test.h (right): > > https://codereview.chromium.org/1225093003/diff/100001/chrome/test/base/in_process_browser_test.h#newcode127 ...
5 years, 5 months ago (2015-07-10 23:12:54 UTC) #25
James Hawkins
https://codereview.chromium.org/1225093003/diff/100001/chrome/browser/extensions/extension_incognito_apitest.cc File chrome/browser/extensions/extension_incognito_apitest.cc (right): https://codereview.chromium.org/1225093003/diff/100001/chrome/browser/extensions/extension_incognito_apitest.cc#newcode113 chrome/browser/extensions/extension_incognito_apitest.cc:113: "/extensions/test_file.html")); Indentation is off. https://codereview.chromium.org/1225093003/diff/100001/chrome/test/base/in_process_browser_test.cc File chrome/test/base/in_process_browser_test.cc (right): https://codereview.chromium.org/1225093003/diff/100001/chrome/test/base/in_process_browser_test.cc#newcode479 ...
5 years, 5 months ago (2015-07-13 18:22:23 UTC) #26
erikchen
jhawkins: PTAL https://codereview.chromium.org/1225093003/diff/100001/chrome/browser/extensions/extension_incognito_apitest.cc File chrome/browser/extensions/extension_incognito_apitest.cc (right): https://codereview.chromium.org/1225093003/diff/100001/chrome/browser/extensions/extension_incognito_apitest.cc#newcode113 chrome/browser/extensions/extension_incognito_apitest.cc:113: "/extensions/test_file.html")); On 2015/07/13 18:22:23, James Hawkins wrote: ...
5 years, 5 months ago (2015-07-13 19:39:22 UTC) #27
James Hawkins
On 2015/07/13 19:39:22, erikchen wrote: > jhawkins: PTAL > > https://codereview.chromium.org/1225093003/diff/100001/chrome/browser/extensions/extension_incognito_apitest.cc > File chrome/browser/extensions/extension_incognito_apitest.cc (right): ...
5 years, 5 months ago (2015-07-13 20:13:38 UTC) #28
erikchen
On 2015/07/13 20:13:38, James Hawkins wrote: > On 2015/07/13 19:39:22, erikchen wrote: > > jhawkins: ...
5 years, 5 months ago (2015-07-13 21:12:54 UTC) #31
James Hawkins
lgtm
5 years, 5 months ago (2015-07-13 21:20:24 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1225093003/180001
5 years, 5 months ago (2015-07-13 21:33:23 UTC) #35
commit-bot: I haz the power
Committed patchset #8 (id:180001)
5 years, 5 months ago (2015-07-13 23:41:41 UTC) #36
commit-bot: I haz the power
5 years, 5 months ago (2015-07-13 23:43:38 UTC) #37
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ff8b5c7ae0273be9b56d64930aaee1f5f13e1eba
Cr-Commit-Position: refs/heads/master@{#338593}

Powered by Google App Engine
This is Rietveld 408576698