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

Issue 2857653002: Fix BrowserActionsBarBrowserTest.OverflowedBrowserActionPopupTestRemoval in ASan with new libc++. (Closed)

Created:
3 years, 7 months ago by Nico
Modified:
3 years, 7 months ago
Reviewers:
Devlin
CC:
chromium-reviews, Finnur
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix BrowserActionsBarBrowserTest.OverflowedBrowserActionPopupTestRemoval in ASan with new libc++. superseded by https://codereview.chromium.org/2901193002 BUG=717554, 599467

Patch Set 1 #

Total comments: 1

Patch Set 2 : rdevlin #

Patch Set 3 : more rdevlin #

Patch Set 4 : hmm mac? #

Patch Set 5 : worse! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -4 lines) Patch
M chrome/browser/ui/cocoa/extensions/browser_action_button.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_action_button.mm View 1 2 3 4 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/extension_action_view_controller.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_bar.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/browser_actions_container.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (17 generated)
Nico
\noideanico, seems to work though.
3 years, 7 months ago (2017-05-02 15:36:34 UTC) #4
Devlin
https://codereview.chromium.org/2857653002/diff/1/chrome/browser/ui/toolbar/toolbar_actions_bar.cc File chrome/browser/ui/toolbar/toolbar_actions_bar.cc (right): https://codereview.chromium.org/2857653002/diff/1/chrome/browser/ui/toolbar/toolbar_actions_bar.cc#newcode663 chrome/browser/ui/toolbar/toolbar_actions_bar.cc:663: delegate_->RemoveViewForAction(removed_action.get()); This doesn't seem quite right to me. The ...
3 years, 7 months ago (2017-05-02 16:37:38 UTC) #7
Nico
Done in patch set 2, thanks for the detailed notes. (The classes look like xplat ...
3 years, 7 months ago (2017-05-03 21:01:32 UTC) #10
Nico
Hm, the test still fails on mac, so i guess something does need to change ...
3 years, 7 months ago (2017-05-03 21:11:43 UTC) #11
Devlin
On 2017/05/03 21:11:43, Nico wrote: > Hm, the test still fails on mac, so i ...
3 years, 7 months ago (2017-05-03 21:19:05 UTC) #12
Nico
On 2017/05/03 21:19:05, Devlin wrote: > On 2017/05/03 21:11:43, Nico wrote: > > Hm, the ...
3 years, 7 months ago (2017-05-03 22:24:45 UTC) #19
Nico
3 years, 7 months ago (2017-05-04 15:34:31 UTC) #22
(mostly talking to myself)

I think the problem here is that OnToolbarActionRemoved is called after
ToolbarActionsModel::RemoveItem() has already removed the ToolbarItem from its
toolbar_items_, but UndoPopOut() calls ToolbarActionsBar::GetIconCount() which
does:

    DCHECK_EQ(model_->toolbar_items().size(), toolbar_actions_.size());

So because of that, UndoPopOut() has to be called after also removing the
ToolbarActionViewController from toolbar_actions_ (like you said). But if I do
it later, then BrowsreActionsBarBrowserTest.RemovePoppedOutAction fails on Mac
like so:


[ RUN      ] BrowserActionsBarBrowserTest.RemovePoppedOutAction
[96286:775:0504/111812.455102:FATAL:toolbar_actions_bar.cc(310)] Check failed:
actions.size() != index (2 vs. 2)
0   libbase.dylib                       0x000000010bfdad5c
base::debug::StackTrace::StackTrace(unsigned long) + 28
1   libbase.dylib                       0x000000010c0062a0
logging::LogMessage::~LogMessage() + 224
2   browser_tests                       0x0000000104d681a6
ToolbarActionsBar::GetActions() const + 326
3   browser_tests                       0x0000000104f56533
-[BrowserActionsController redraw] + 211
4   browser_tests                       0x0000000104d6abe6
ToolbarActionsBar::OnToolbarActionRemoved(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 662
5   browser_tests                       0x0000000104625764
ToolbarActionsModel::RemoveItem(ToolbarActionsModel::ToolbarItem const&) + 1124
6   browser_tests                       0x000000010462445a
ToolbarActionsModel::OnExtensionUnloaded(content::BrowserContext*,
extensions::Extension const*, extensions::UnloadedExtensionReason) + 202
7   browser_tests                       0x0000000102c70f7f
extensions::ExtensionRegistry::TriggerOnUnloaded(extensions::Extension const*,
extensions::UnloadedExtensionReason) + 351
8   browser_tests                       0x00000001047b81b2
ExtensionService::UnloadExtension(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
extensions::UnloadedExtensionReason) + 434
9   browser_tests                       0x000000010265b3ff
BrowserActionsBarBrowserTest_RemovePoppedOutAction_Test::RunTestOnMainThread() +
2079
10  browser_tests                       0x0000000103c36083
content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() + 403
11  browser_tests                       0x0000000103402d58
ChromeBrowserMainParts::PreMainMessageLoopRunImpl() + 4824
12  browser_tests                       0x000000010340197e
ChromeBrowserMainParts::PreMainMessageLoopRun() + 62
13  libcontent.dylib                    0x0000000110c542e3
content::BrowserMainLoop::PreMainMessageLoopRun() + 67
14  libcontent.dylib                    0x00000001110c5517
content::StartupTaskRunner::RunAllTasksNow() + 39

I guess closing the bubble confuses something on Mac, I'm still debugging this.

Also, with this change, some media router tests start failing on all platforms.
in_reply_to: 5681717746597888

Powered by Google App Engine
This is Rietveld 408576698