aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-07-27 17:30:18 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-07-27 17:30:18 +0000
commita8d97174e6b98587d479261a6854f3a5a4e7107a (patch)
treef33800bc86bb00a4fbbfd94bd10a2e9929535855 /AppKit
parentc9e416c3c74910d79fd548180584491b257b833b (diff)
[Author: alcor]
Fix unit tests R=dmaclach DELTA=18 (4 added, 5 deleted, 9 changed)
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMThemeTest.m27
1 files changed, 13 insertions, 14 deletions
diff --git a/AppKit/GTMThemeTest.m b/AppKit/GTMThemeTest.m
index dd6cd37..e58e95f 100644
--- a/AppKit/GTMThemeTest.m
+++ b/AppKit/GTMThemeTest.m
@@ -33,32 +33,31 @@
// When there are no values, use window default colors
STAssertEqualObjects([theme backgroundColor],
- [NSColor colorWithCalibratedWhite:0.75 alpha:1.0], nil);
- STAssertNil([theme backgroundImageForStyle:GTMThemeStyleWindow state:YES],
+ [NSColor colorWithCalibratedWhite:0.667 alpha:1.0], nil);
+ STAssertNil([theme backgroundImageForStyle:GTMThemeStyleWindow
+ state:GTMThemeStateActiveWindow],
nil);
STAssertNil([theme backgroundImage], nil);
NSColor *color = [NSColor redColor];
NSData *colorData = [NSArchiver archivedDataWithRootObject:color];
- [[NSUserDefaults standardUserDefaults] setObject:colorData
- forKey:@"GTMThemeBackgroundColor"];
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ [defaults setObject:colorData forKey:kGTMThemeBackgroundColorKey];
- STAssertNotNil([theme backgroundImageForStyle:GTMThemeStyleWindow state:YES],
- nil);
STAssertNotNil([theme backgroundPatternColorForStyle:GTMThemeStyleToolBar
- state:YES], nil);
+ state:GTMThemeStateActiveWindow], nil);
STAssertNotNil([theme strokeColorForStyle:GTMThemeStyleToolBar
- state:YES], nil);
+ state:GTMThemeStateActiveWindow], nil);
STAssertNotNil([theme gradientForStyle:GTMThemeStyleToolBar
- state:YES], nil);
+ state:GTMThemeStateActiveWindow], nil);
- STAssertEqualObjects([theme backgroundColor],
- color, nil);
+ STAssertEqualObjects([theme backgroundColor], color, nil);
+ NSBackgroundStyle style
+ = [theme interiorBackgroundStyleForStyle:GTMThemeStyleToolBar
+ state:GTMThemeStateActiveWindow];
// TODO(alcor): add more of these cases once the constants are more concrete
- STAssertEquals([theme interiorBackgroundStyleForStyle:GTMThemeStyleToolBar
- state:YES],
- (NSBackgroundStyle)NSBackgroundStyleRaised, nil);
+ STAssertEquals(style, (NSBackgroundStyle)NSBackgroundStyleRaised, nil);
[[NSUserDefaults standardUserDefaults] removeObjectForKey:
@"GTMThemeBackgroundColor"];