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

Issue 2918293002: Ensure all BrowserAction ExtensionHosts are destroyed in BrowserActionInteractiveTest (Closed)

Created:
3 years, 6 months ago by tapted
Modified:
3 years, 6 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org, dullweber
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure all BrowserAction ExtensionHosts are destroyed in BrowserActionInteractiveTest Currently they seem to get destroyed by luck. Chrome does a lot of work in TearDown, and InProcessBrowserTests spins run loops enough times, that the ExtensionHosts are destroyed before the Profile is. For some tests, the extension host tear down only starts when the parent browser window is closed. But, for extension popups, there's no explicit wait. This means that Extension Popup tests can flakily trigger DCHECKs in ProfileDestroyer::DestroyProfileWhenAppropriate(..). But, for official releases, DestroyProfileWhenAppropriate has a codepath to clean up. Add a class to the test harness that ensures NOTIFICATION_EXTENSION_HOST_CREATED/DESTOYED are balanced before continuing to browser window shutdown. This makes the failures assured rather than flaky. Then add explicit calls to close the popup to the tests that are missing it. BUG=729476 Review-Url: https://codereview.chromium.org/2918293002 Cr-Commit-Position: refs/heads/master@{#477083} Committed: https://chromium.googlesource.com/chromium/src/+/910f537829fe4483c965d4c16dcfd54e549cffbc

Patch Set 1 #

Patch Set 2 : fix one #

Patch Set 3 : clear upstream CL #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -6 lines) Patch
M chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc View 1 11 chunks +75 lines, -6 lines 3 comments Download

Messages

Total messages: 21 (16 generated)
tapted
Hi Devlin, please take a look. This is blocking http://crrev.com/2909053002/ from landing. +dullweber cc fyi
3 years, 6 months ago (2017-06-05 11:31:33 UTC) #14
Devlin
lgtm I am a little worried that this is going to mask a bug, because ...
3 years, 6 months ago (2017-06-05 14:22:12 UTC) #15
tapted
https://codereview.chromium.org/2918293002/diff/40001/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc File chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc (right): https://codereview.chromium.org/2918293002/diff/40001/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc#newcode43 chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc:43: // BrowserProcessImpl::StartTearDown(). TODO(tapted): The existence of this On 2017/06/05 ...
3 years, 6 months ago (2017-06-05 20:59:52 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2918293002/40001
3 years, 6 months ago (2017-06-05 21:00:30 UTC) #18
commit-bot: I haz the power
3 years, 6 months ago (2017-06-05 21:07:09 UTC) #21
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/910f537829fe4483c965d4c16dcf...

Powered by Google App Engine
This is Rietveld 408576698