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

Unified Diff: chrome/browser/ui/panels/panel_gtk.cc

Issue 10914242: Improve panel tests by properly waiting for expected conditions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: improve AutoResize test, was still flaking Created 8 years, 3 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
Index: chrome/browser/ui/panels/panel_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_gtk.cc b/chrome/browser/ui/panels/panel_gtk.cc
index b7455e4e507799d2eb6677772cbc865f19586d6d..3f8cef192e7ba840389b9fc73b0801a76aa088ac 100644
--- a/chrome/browser/ui/panels/panel_gtk.cc
+++ b/chrome/browser/ui/panels/panel_gtk.cc
@@ -947,9 +947,12 @@ gfx::Size PanelGtk::ContentSizeFromWindowSize(
}
int PanelGtk::TitleOnlyHeight() const {
- GtkAllocation allocation;
- gtk_widget_get_allocation(titlebar_->widget(), &allocation);
- return allocation.height;
+ gfx::Size& frame_size = GetFrameSize();
+ if (!frame_size.IsEmpty())
+ return frame_size.height() - kFrameBorderThickness;
+
+ NOTREACHED() << "Checking title height before window allocated";
+ return 0;
}
void PanelGtk::SetPanelAlwaysOnTop(bool on_top) {

Powered by Google App Engine
This is Rietveld 408576698