OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" | 5 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 EXPECT_TRUE([rep isKindOfClass:[NSBitmapImageRep class]]); | 47 EXPECT_TRUE([rep isKindOfClass:[NSBitmapImageRep class]]); |
48 EXPECT_TRUE(CGImageGetWidth([rep CGImage]) == 400); | 48 EXPECT_TRUE(CGImageGetWidth([rep CGImage]) == 400); |
49 NSColor* color = [rep colorAtX:200 y:200]; | 49 NSColor* color = [rep colorAtX:200 y:200]; |
50 CGFloat red = 0, green = 0, blue = 0, alpha = 0; | 50 CGFloat red = 0, green = 0, blue = 0, alpha = 0; |
51 [color getRed:&red green:&green blue:&blue alpha:&alpha]; | 51 [color getRed:&red green:&green blue:&blue alpha:&alpha]; |
52 EXPECT_GE(red + green + blue, 3.0); | 52 EXPECT_GE(red + green + blue, 3.0); |
53 } | 53 } |
54 | 54 |
55 } // namespace | 55 } // namespace |
56 } // namespace chrome | 56 } // namespace chrome |
OLD | NEW |