|
|
DescriptionPlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp()
AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp()
method after PlatformAppBrowserTest::SetUp. But testcases run in:
PlatformAppBrowserTest ->
ExtensionApiTest ->
ExtensionBrowserTest -> InProcessBrowserTest ->
BrowserTestBase::SetUp[1]
BrowserTestBase::SetUp calls ContentMain() to launch the browser and
run testcase and the browser destroys its FieldTrialList and
FeatureList on shutdown.
Stack trace:
base::FieldTrialList::~FieldTrialList()
ChromeBrowserMainParts::~ChromeBrowserMainParts()
ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac()
content::BrowserMainLoop::~BrowserMainLoop()
content::BrowserMainLoop::~BrowserMainLoop()
content::BrowserMainRunnerImpl::Shutdown()
content::BrowserMain(content::MainFunctionParams const&)
content::RunNamedProcessTypeMain(std::__1::basic_string<char,
content::MainFunctionParams const&, content::ContentMainDelegate*)
content::ContentMainRunnerImpl::Run()
service_manager::Main(service_manager::MainParams const&)
content::ContentMain(content::ContentMainParams const&)
content::BrowserTestBase::SetUp()
InProcessBrowserTest::SetUp()
That is why it caused the memory issue. So we should call
PlatformAppBrowserTest::SetUp call at the end of
AppShimInteractiveTest::SetUp()
BUG=
Review-Url: https://codereview.chromium.org/2963193004
Cr-Commit-Position: refs/heads/master@{#484416}
Committed: https://chromium.googlesource.com/chromium/src/+/9d126b1389be2431d6c95eae379f5f0f059089c6
Patch Set 1 #
Dependent Patchsets: Messages
Total messages: 25 (13 generated)
chaopeng@chromium.org changed reviewers: + isherman@chromium.org
We got a memory regression from Change ScopedFeatureList to overrides FeatureList not reset. Need this patch before reland. Ilya, PTAL. Thank you.
LGTM
chaopeng@chromium.org changed reviewers: + thestig@chromium.org
thestig@chromium.org: Please review changes。 Thank you.
thestig@chromium.org: Please review changes。 Thank you.
lgtm For the CL description: 1) There's a typo: BroswerTest 2) It's unclear what the "[1]" is suppose to reference. Right now it points to a #if defined() line. 3) Can you refer to real class names? There's no class called BrowserTest or Super. The inheritance chain is PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> content::BrowserTestBase.
Description was changed from ========== Super::SetUp must call at the end of SetUp in BrowserTest For BroswerTest, testcase runs in BrowserTestBase::SetUp, so Super::SetUp must call at the end of SetUp in BrowserTest. [1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc... BUG= ========== to ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() For BrowserTest, testcase runs in BrowserTest Base::SetUp, so Super::SetUp must call at the end of SetUp in AppShimInteractiveTest. [1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc... BUG= ==========
The CQ bit was checked by chaopeng@chromium.org
The CQ bit was unchecked by chaopeng@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() For BrowserTest, testcase runs in BrowserTest Base::SetUp, so Super::SetUp must call at the end of SetUp in AppShimInteractiveTest. [1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc... BUG= ========== to ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() For BrowserTest, testcase runs in PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> content::BrowserTestBase::SetUp, so PlatformAppBrowserTest::SetUp must call at the end of SetUp in AppShimInteractiveTest. [1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc... BUG= ==========
The CQ bit was checked by chaopeng@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/07/05 18:37:47, Lei Zhang wrote: > lgtm > > For the CL description: > 1) There's a typo: BroswerTest > 2) It's unclear what the "[1]" is suppose to reference. Right now it points to a > #if defined() line. > 3) Can you refer to real class names? There's no class called BrowserTest or > Super. The inheritance chain is PlatformAppBrowserTest -> ExtensionApiTest -> > ExtensionBrowserTest -> InProcessBrowserTest -> content::BrowserTestBase. For (2), now [1] points to line 270, which as of this writing is: EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams())); Are you really trying to point out that line, or that base::FeatureList::ClearInstanceForTesting() gets called in BrowserTestBase::SetUp() ? Links to cs.chromium.org probably won't stand up to the test of time. In a few months, that line will point to some other part of the code, and future readers who click on that link will see something that is not what you intended to link to. I'm guessing what the commit message is really trying to say something like: AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp() method. AppShimInteractiveTest ultimately inherits from content::BrowserTestBase, and BrowserTestBase::SetUp() calls base::FeatureList::ClearInstanceForTesting(). To make the interaction between these two calls work with an upcoming ScopedFeatureList change, AppShimInteractiveTest::SetUp() should initialize the ScopedFeatureList first, and then call its parent class's SetUp() method.
The CQ bit was unchecked by chaopeng@chromium.org
On 2017/07/05 21:47:32, Lei Zhang wrote: > On 2017/07/05 18:37:47, Lei Zhang wrote: > > lgtm > > > > For the CL description: > > 1) There's a typo: BroswerTest > > 2) It's unclear what the "[1]" is suppose to reference. Right now it points to > a > > #if defined() line. > > 3) Can you refer to real class names? There's no class called BrowserTest or > > Super. The inheritance chain is PlatformAppBrowserTest -> ExtensionApiTest -> > > ExtensionBrowserTest -> InProcessBrowserTest -> content::BrowserTestBase. > > For (2), now [1] points to line 270, which as of this writing is: > > EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams())); > > Are you really trying to point out that line, or that > base::FeatureList::ClearInstanceForTesting() gets called in > BrowserTestBase::SetUp() ? Links to http://cs.chromium.org probably won't stand up to > the test of time. In a few months, that line will point to some other part of > the code, and future readers who click on that link will see something that is > not what you intended to link to. > > > I'm guessing what the commit message is really trying to say something like: > > AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp() method. > AppShimInteractiveTest ultimately inherits from content::BrowserTestBase, and > BrowserTestBase::SetUp() calls base::FeatureList::ClearInstanceForTesting(). To > make the interaction between these two calls work with an upcoming > ScopedFeatureList change, AppShimInteractiveTest::SetUp() should initialize the > ScopedFeatureList first, and then call its parent class's SetUp() method. Yes, the test case is run in ContentMain(*GetContentMainParams()). let me change the message to clarify.
On 2017/07/05 21:58:56, chaopeng wrote: > Yes, the test case is run in ContentMain(*GetContentMainParams()). let me change > the message to clarify. Thanks! It's really helpful to have good commit messages, so people who read the code in the future can understand what happened.
Description was changed from ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() For BrowserTest, testcase runs in PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> content::BrowserTestBase::SetUp, so PlatformAppBrowserTest::SetUp must call at the end of SetUp in AppShimInteractiveTest. [1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc... BUG= ========== to ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp() method after PlatformAppBrowserTest::SetUp. But testcases run in: PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> content::BrowserTestBase::SetUp[1] Stack trace: base::FieldTrialList::~FieldTrialList() ChromeBrowserMainParts::~ChromeBrowserMainParts() ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainRunnerImpl::Shutdown() content::BrowserMain(content::MainFunctionParams const&) content::RunNamedProcessTypeMain(std::__1::basic_string<char, content::MainFunctionParams const&, content::ContentMainDelegate*) content::ContentMainRunnerImpl::Run() service_manager::Main(service_manager::MainParams const&) content::ContentMain(content::ContentMainParams const&) content::BrowserTestBase::SetUp() InProcessBrowserTest::SetUp() In BrowserMainRunnerImpl::Shutdown, we also destruct FieldTrialList, that is why it hit the memory issue. So we should call PlatformAppBrowserTest::SetUp call at the end of AppShimInteractiveTest::SetUp() [1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc... BUG= ==========
Description was changed from ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp() method after PlatformAppBrowserTest::SetUp. But testcases run in: PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> content::BrowserTestBase::SetUp[1] Stack trace: base::FieldTrialList::~FieldTrialList() ChromeBrowserMainParts::~ChromeBrowserMainParts() ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainRunnerImpl::Shutdown() content::BrowserMain(content::MainFunctionParams const&) content::RunNamedProcessTypeMain(std::__1::basic_string<char, content::MainFunctionParams const&, content::ContentMainDelegate*) content::ContentMainRunnerImpl::Run() service_manager::Main(service_manager::MainParams const&) content::ContentMain(content::ContentMainParams const&) content::BrowserTestBase::SetUp() InProcessBrowserTest::SetUp() In BrowserMainRunnerImpl::Shutdown, we also destruct FieldTrialList, that is why it hit the memory issue. So we should call PlatformAppBrowserTest::SetUp call at the end of AppShimInteractiveTest::SetUp() [1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc... BUG= ========== to ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp() method after PlatformAppBrowserTest::SetUp. But testcases run in: PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> BrowserTestBase::SetUp[1] BrowserTestBase::SetUp calls ContentMain() to launch the browser and run testcase and the browser destroys its FieldTrialList and FeatureList on shutdown. Stack trace: base::FieldTrialList::~FieldTrialList() ChromeBrowserMainParts::~ChromeBrowserMainParts() ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainRunnerImpl::Shutdown() content::BrowserMain(content::MainFunctionParams const&) content::RunNamedProcessTypeMain(std::__1::basic_string<char, content::MainFunctionParams const&, content::ContentMainDelegate*) content::ContentMainRunnerImpl::Run() service_manager::Main(service_manager::MainParams const&) content::ContentMain(content::ContentMainParams const&) content::BrowserTestBase::SetUp() InProcessBrowserTest::SetUp() That is why it caused the memory issue. So we should call PlatformAppBrowserTest::SetUp call at the end of AppShimInteractiveTest::SetUp() BUG= ==========
The CQ bit was checked by chaopeng@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 1, "attempt_start_ts": 1499294666836830, "parent_rev": "2257ee6edf2e07aeae8105ac952ab30722311e63", "commit_rev": "9d126b1389be2431d6c95eae379f5f0f059089c6"}
Message was sent while issue was closed.
Description was changed from ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp() method after PlatformAppBrowserTest::SetUp. But testcases run in: PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> BrowserTestBase::SetUp[1] BrowserTestBase::SetUp calls ContentMain() to launch the browser and run testcase and the browser destroys its FieldTrialList and FeatureList on shutdown. Stack trace: base::FieldTrialList::~FieldTrialList() ChromeBrowserMainParts::~ChromeBrowserMainParts() ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainRunnerImpl::Shutdown() content::BrowserMain(content::MainFunctionParams const&) content::RunNamedProcessTypeMain(std::__1::basic_string<char, content::MainFunctionParams const&, content::ContentMainDelegate*) content::ContentMainRunnerImpl::Run() service_manager::Main(service_manager::MainParams const&) content::ContentMain(content::ContentMainParams const&) content::BrowserTestBase::SetUp() InProcessBrowserTest::SetUp() That is why it caused the memory issue. So we should call PlatformAppBrowserTest::SetUp call at the end of AppShimInteractiveTest::SetUp() BUG= ========== to ========== PlatformAppBrowserTest::SetUp should call at the end of AppShimInteractiveTest::SetUp() AppShimInteractiveTest initializes a ScopedFeatureList in its SetUp() method after PlatformAppBrowserTest::SetUp. But testcases run in: PlatformAppBrowserTest -> ExtensionApiTest -> ExtensionBrowserTest -> InProcessBrowserTest -> BrowserTestBase::SetUp[1] BrowserTestBase::SetUp calls ContentMain() to launch the browser and run testcase and the browser destroys its FieldTrialList and FeatureList on shutdown. Stack trace: base::FieldTrialList::~FieldTrialList() ChromeBrowserMainParts::~ChromeBrowserMainParts() ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainLoop::~BrowserMainLoop() content::BrowserMainRunnerImpl::Shutdown() content::BrowserMain(content::MainFunctionParams const&) content::RunNamedProcessTypeMain(std::__1::basic_string<char, content::MainFunctionParams const&, content::ContentMainDelegate*) content::ContentMainRunnerImpl::Run() service_manager::Main(service_manager::MainParams const&) content::ContentMain(content::ContentMainParams const&) content::BrowserTestBase::SetUp() InProcessBrowserTest::SetUp() That is why it caused the memory issue. So we should call PlatformAppBrowserTest::SetUp call at the end of AppShimInteractiveTest::SetUp() BUG= Review-Url: https://codereview.chromium.org/2963193004 Cr-Commit-Position: refs/heads/master@{#484416} Committed: https://chromium.googlesource.com/chromium/src/+/9d126b1389be2431d6c95eae379f... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/9d126b1389be2431d6c95eae379f... |