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

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: Synced 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 c8058c806123403f563b80e56161921851279a1c..9a969a7844e4d8e6c7534d7ed9a8be225fff1fe1 100644
--- a/chrome/browser/ui/panels/panel_gtk.cc
+++ b/chrome/browser/ui/panels/panel_gtk.cc
@@ -948,9 +948,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;
}
bool PanelGtk::IsPanelAlwaysOnTop() const {
« no previous file with comments | « chrome/browser/ui/panels/panel_drag_browsertest.cc ('k') | chrome/browser/ui/panels/test_panel_active_state_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698