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

Unified Diff: chrome/test/base/view_event_test_base.cc

Issue 1864423002: ToolbarButton: Reset menu runner before deleting its menu's delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ViewEventTestBase fix Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/view_event_test_base.cc
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc
index 869179fd8cd7565ab48e42770682e1b754d81f8b..0b86478249d5aa3b89e52a313a29cade4038cb21 100644
--- a/chrome/test/base/view_event_test_base.cc
+++ b/chrome/test/base/view_event_test_base.cc
@@ -31,6 +31,12 @@ class TestView : public views::View {
}
void Layout() override {
+ // Permit a test to remove the view being tested from the hierarchy, then
+ // still handle a _NET_WM_STATE event on Linux during teardown that triggers
+ // layout.
+ if (!has_children())
+ return;
+
View* child_view = child_at(0);
child_view->SetBounds(0, 0, width(), height());
}
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698