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

Unified Diff: chrome/browser/gtk/status_icons/status_tray_gtk_unittest.cc

Issue 6251001: Move chrome/browser/gtk/ to chrome/browser/ui/gtk/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/browser/gtk/status_icons/status_tray_gtk.cc ('k') | chrome/browser/gtk/tab_contents_container_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/status_icons/status_tray_gtk_unittest.cc
===================================================================
--- chrome/browser/gtk/status_icons/status_tray_gtk_unittest.cc (revision 71352)
+++ chrome/browser/gtk/status_icons/status_tray_gtk_unittest.cc (working copy)
@@ -1,54 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "app/menus/simple_menu_model.h"
-#include "app/resource_bundle.h"
-#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
-#include "chrome/browser/gtk/status_icons/status_icon_gtk.h"
-#include "chrome/browser/gtk/status_icons/status_tray_gtk.h"
-#include "grit/browser_resources.h"
-#include "grit/theme_resources.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-class MockStatusIconObserver : public StatusIcon::Observer {
- public:
- MOCK_METHOD0(OnClicked, void());
-};
-
-TEST(StatusTrayGtkTest, CreateTray) {
- // Just tests creation/destruction.
- StatusTrayGtk tray;
-}
-
-TEST(StatusTrayGtkTest, CreateIcon) {
- // Create an icon, set the images and tooltip, then shut it down.
- StatusTrayGtk tray;
- StatusIcon* icon = tray.CreateStatusIcon();
- SkBitmap* bitmap = ResourceBundle::GetSharedInstance().GetBitmapNamed(
- IDR_STATUS_TRAY_ICON);
- icon->SetImage(*bitmap);
- icon->SetPressedImage(*bitmap);
- icon->SetToolTip(ASCIIToUTF16("tool tip"));
- menus::SimpleMenuModel* menu = new menus::SimpleMenuModel(NULL);
- menu->AddItem(0, ASCIIToUTF16("foo"));
- icon->SetContextMenu(menu);
-}
-
-TEST(StatusTrayGtkTest, ClickOnIcon) {
- // Create an icon, send a fake click event, make sure observer is called.
- StatusTrayGtk tray;
- StatusIconGtk* icon = static_cast<StatusIconGtk*>(tray.CreateStatusIcon());
- MockStatusIconObserver observer;
- icon->AddObserver(&observer);
- EXPECT_CALL(observer, OnClicked());
- // Mimic a click.
- icon->OnClick(NULL);
- icon->RemoveObserver(&observer);
-}
-
-} // namespace
« no previous file with comments | « chrome/browser/gtk/status_icons/status_tray_gtk.cc ('k') | chrome/browser/gtk/tab_contents_container_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698