| Index: base/mac/mac_util_unittest.mm
|
| diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm
|
| index 47ecebf98ed32a22e1018a98374ea07bab4779c1..81ed6feeadac1d4a0ed1ea39d00252af21f5dad6 100644
|
| --- a/base/mac/mac_util_unittest.mm
|
| +++ b/base/mac/mac_util_unittest.mm
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 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.
|
|
|
| @@ -53,37 +53,6 @@ TEST_F(MacUtilTest, TestLibraryPath) {
|
| EXPECT_FALSE(library_dir.value().empty());
|
| }
|
|
|
| -TEST_F(MacUtilTest, TestGrabWindowSnapshot) {
|
| - // Launch a test window so we can take a snapshot.
|
| - [MockCrApp sharedApplication];
|
| - NSRect frame = NSMakeRect(0, 0, 400, 400);
|
| - scoped_nsobject<NSWindow> window(
|
| - [[NSWindow alloc] initWithContentRect:frame
|
| - styleMask:NSBorderlessWindowMask
|
| - backing:NSBackingStoreBuffered
|
| - defer:NO]);
|
| - [window setBackgroundColor:[NSColor whiteColor]];
|
| - [window makeKeyAndOrderFront:NSApp];
|
| -
|
| - scoped_ptr<std::vector<unsigned char> > png_representation(
|
| - new std::vector<unsigned char>);
|
| - int width, height;
|
| - GrabWindowSnapshot(window, png_representation.get(),
|
| - &width, &height);
|
| -
|
| - // Copy png back into NSData object so we can make sure we grabbed a png.
|
| - scoped_nsobject<NSData> image_data(
|
| - [[NSData alloc] initWithBytes:&(*png_representation)[0]
|
| - length:png_representation->size()]);
|
| - NSBitmapImageRep* rep = [NSBitmapImageRep imageRepWithData:image_data.get()];
|
| - EXPECT_TRUE([rep isKindOfClass:[NSBitmapImageRep class]]);
|
| - EXPECT_TRUE(CGImageGetWidth([rep CGImage]) == 400);
|
| - NSColor* color = [rep colorAtX:200 y:200];
|
| - CGFloat red = 0, green = 0, blue = 0, alpha = 0;
|
| - [color getRed:&red green:&green blue:&blue alpha:&alpha];
|
| - EXPECT_GE(red + green + blue, 3.0);
|
| -}
|
| -
|
| TEST_F(MacUtilTest, TestGetAppBundlePath) {
|
| FilePath out;
|
|
|
|
|