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

Side by Side Diff: chrome/browser/ui/cocoa/sprite_view_unittest.mm

Issue 480693002: Use a qualified path for ui_resources.h grit includes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
9 #import "chrome/browser/ui/cocoa/sprite_view.h" 9 #import "chrome/browser/ui/cocoa/sprite_view.h"
10 #include "grit/ui_resources.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 11 #include "testing/platform_test.h"
13 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/image/image.h" 13 #include "ui/gfx/image/image.h"
14 #include "ui/resources/grit/ui_resources.h"
15 15
16 namespace { 16 namespace {
17 17
18 class SpriteViewTest : public CocoaTest { 18 class SpriteViewTest : public CocoaTest {
19 public: 19 public:
20 SpriteViewTest() { 20 SpriteViewTest() {
21 image_.reset(ResourceBundle::GetSharedInstance() 21 image_.reset(ResourceBundle::GetSharedInstance()
22 .GetNativeImageNamed(IDR_THROBBER) 22 .GetNativeImageNamed(IDR_THROBBER)
23 .CopyNSImage()); 23 .CopyNSImage());
24 view_.reset([[SpriteView alloc] init]); 24 view_.reset([[SpriteView alloc] init]);
(...skipping 10 matching lines...) Expand all
35 TEST_F(SpriteViewTest, TestViewFrame) { 35 TEST_F(SpriteViewTest, TestViewFrame) {
36 NSSize imageSize = [image_ size]; 36 NSSize imageSize = [image_ size];
37 NSRect frame = [view_ frame]; 37 NSRect frame = [view_ frame];
38 EXPECT_EQ(0.0, frame.origin.x); 38 EXPECT_EQ(0.0, frame.origin.x);
39 EXPECT_EQ(0.0, frame.origin.y); 39 EXPECT_EQ(0.0, frame.origin.y);
40 EXPECT_EQ(imageSize.height, NSWidth(frame)); 40 EXPECT_EQ(imageSize.height, NSWidth(frame));
41 EXPECT_EQ(imageSize.height, NSHeight(frame)); 41 EXPECT_EQ(imageSize.height, NSHeight(frame));
42 } 42 }
43 43
44 } // namespace 44 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698