| Index: base/mac_util_unittest.mm
|
| diff --git a/base/mac_util_unittest.mm b/base/mac_util_unittest.mm
|
| index aebb731ae1505eead6a2b489462211eb00d71bb3..f590ac1439d2730bad91d5458d2271a66ea2d2ec 100644
|
| --- a/base/mac_util_unittest.mm
|
| +++ b/base/mac_util_unittest.mm
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2008-2009 The Chromium Authors. All rights reserved.
|
| +// 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.
|
|
|
| @@ -165,6 +165,21 @@ TEST_F(MacUtilTest, TestGetValueFromDictionary) {
|
| dict, CFSTR("no-exist"), CFStringGetTypeID()));
|
| }
|
|
|
| +TEST_F(MacUtilTest, CopyNSImageToCGImage) {
|
| + scoped_nsobject<NSImage> nsImage(
|
| + [[NSImage alloc] initWithSize:NSMakeSize(20, 20)]);
|
| + [nsImage lockFocus];
|
| + [[NSColor redColor] set];
|
| + NSRect rect = NSZeroRect;
|
| + rect.size = [nsImage size];
|
| + NSRectFill(rect);
|
| + [nsImage unlockFocus];
|
| +
|
| + scoped_cftyperef<CGImageRef> cgImage(
|
| + mac_util::CopyNSImageToCGImage(nsImage.get()));
|
| + EXPECT_TRUE(cgImage.get());
|
| +}
|
| +
|
| } // namespace
|
|
|
| } // namespace mac_util
|
|
|