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

Unified Diff: chrome/browser/cocoa/status_bubble_mac_unittest.mm

Issue 165499: Updates to clean up default theme and add hover states (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 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/cocoa/status_bubble_mac.mm ('k') | chrome/browser/cocoa/tab_cell.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/status_bubble_mac_unittest.mm
===================================================================
--- chrome/browser/cocoa/status_bubble_mac_unittest.mm (revision 24798)
+++ chrome/browser/cocoa/status_bubble_mac_unittest.mm (working copy)
@@ -10,7 +10,17 @@
#include "chrome/browser/cocoa/status_bubble_mac.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "third_party/GTM/AppKit/GTMTheme.h"
+@interface StatusBubbleMacTestWindowDelegate : NSObject <GTMThemeDelegate>;
+@end
+@implementation StatusBubbleMacTestWindowDelegate
+- (GTMTheme *)gtm_themeForWindow:(NSWindow *)window {
+ NSLog(@"gettheme");
+ return [[[GTMTheme alloc] init] autorelease];
+}
+@end
+
class StatusBubbleMacTest : public testing::Test {
public:
StatusBubbleMacTest() {
@@ -29,11 +39,24 @@
NSString* GetURLText() {
return bubble_->url_text_;
}
-
+ NSWindow* GetWindow() {
+ return bubble_->window_;
+ }
+ NSWindow* GetParent() {
+ return bubble_->parent_;
+ }
CocoaTestHelper cocoa_helper_; // Inits Cocoa, creates window, etc...
scoped_ptr<StatusBubbleMac> bubble_;
};
+TEST_F(StatusBubbleMacTest, Theme) {
+ bubble_->SetStatus(L"Theme test"); // Creates the window
+ [GetParent() setDelegate:
+ [[[StatusBubbleMacTestWindowDelegate alloc] init] autorelease]];
+ EXPECT_TRUE([GetParent() gtm_theme] != nil);
+ EXPECT_TRUE([[GetWindow() contentView] gtm_theme] != nil);
+}
+
TEST_F(StatusBubbleMacTest, SetStatus) {
bubble_->SetStatus(L"");
bubble_->SetStatus(L"This is a test");
« no previous file with comments | « chrome/browser/cocoa/status_bubble_mac.mm ('k') | chrome/browser/cocoa/tab_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698