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

Side by Side Diff: chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm

Issue 8771028: [Mac] Remove content/ CrApplication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk for commit-queue. Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "base/test/mock_chrome_application_mac.h"
12 #include "testing/platform_test.h" 11 #include "testing/platform_test.h"
13 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
14 13
15 namespace browser { 14 namespace browser {
16 namespace { 15 namespace {
17 16
18 typedef PlatformTest GrabWindowSnapshotTest; 17 typedef PlatformTest GrabWindowSnapshotTest;
19 18
20 TEST_F(GrabWindowSnapshotTest, TestGrabWindowSnapshot) { 19 TEST_F(GrabWindowSnapshotTest, TestGrabWindowSnapshot) {
21 // Launch a test window so we can take a snapshot. 20 // Launch a test window so we can take a snapshot.
(...skipping 20 matching lines...) Expand all
42 EXPECT_TRUE([rep isKindOfClass:[NSBitmapImageRep class]]); 41 EXPECT_TRUE([rep isKindOfClass:[NSBitmapImageRep class]]);
43 EXPECT_TRUE(CGImageGetWidth([rep CGImage]) == 400); 42 EXPECT_TRUE(CGImageGetWidth([rep CGImage]) == 400);
44 NSColor* color = [rep colorAtX:200 y:200]; 43 NSColor* color = [rep colorAtX:200 y:200];
45 CGFloat red = 0, green = 0, blue = 0, alpha = 0; 44 CGFloat red = 0, green = 0, blue = 0, alpha = 0;
46 [color getRed:&red green:&green blue:&blue alpha:&alpha]; 45 [color getRed:&red green:&green blue:&blue alpha:&alpha];
47 EXPECT_GE(red + green + blue, 3.0); 46 EXPECT_GE(red + green + blue, 3.0);
48 } 47 }
49 48
50 } // namespace 49 } // namespace
51 } // namespace browser 50 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698