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

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

Issue 10987037: Add tests for panel app icon functionaility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix builds 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/gtk/panels/panel_gtk.cc
diff --git a/chrome/browser/ui/gtk/panels/panel_gtk.cc b/chrome/browser/ui/gtk/panels/panel_gtk.cc
index 268b6fac2e766ae36866ab7b8fe0f91655769c53..776e3d0eb3be079c2e37ff6cb6b894b2590a6b4c 100644
--- a/chrome/browser/ui/gtk/panels/panel_gtk.cc
+++ b/chrome/browser/ui/gtk/panels/panel_gtk.cc
@@ -1028,6 +1028,7 @@ class GtkNativePanelTesting : public NativePanelTesting {
virtual void FinishDragTitlebar() OVERRIDE;
virtual bool VerifyDrawingAttention() const OVERRIDE;
virtual bool VerifyActiveState(bool is_active) OVERRIDE;
+ virtual bool VerifyAppIcon() const OVERRIDE;
virtual void WaitForWindowCreationToComplete() const OVERRIDE;
virtual bool IsWindowSizeKnown() const OVERRIDE;
virtual bool IsAnimatingBounds() const OVERRIDE;
@@ -1111,6 +1112,13 @@ bool GtkNativePanelTesting::VerifyActiveState(bool is_active) {
return false;
}
+bool GtkNativePanelTesting::VerifyAppIcon() const {
+ GdkPixbuf* icon = gtk_window_get_icon(panel_gtk_->GetNativePanelHandle());
+ return icon &&
+ gdk_pixbuf_get_width(icon) == 32 &&
jennb 2012/10/02 17:51:08 Should this 32 be a defined constant somewhere, ma
jianli 2012/10/02 21:37:26 Done.
+ gdk_pixbuf_get_height(icon) == 32;
+}
+
void GtkNativePanelTesting::WaitForWindowCreationToComplete() const {
while (GetFrameSize().IsEmpty())
MessageLoopForUI::current()->RunAllPending();

Powered by Google App Engine
This is Rietveld 408576698