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 #import "chrome/browser/web_applications/web_app_mac.h" | 5 #import "chrome/browser/web_applications/web_app_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
11 #include "base/memory/scoped_nsobject.h" | 11 #include "base/memory/scoped_nsobject.h" |
12 #include "base/scoped_temp_dir.h" | 12 #include "base/scoped_temp_dir.h" |
13 #include "base/sys_string_conversions.h" | 13 #include "base/sys_string_conversions.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/common/mac/app_mode_common.h" | 15 #include "chrome/common/mac/app_mode_common.h" |
16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources_standard.h" |
17 #include "third_party/skia/include/core/SKBitmap.h" | 17 #include "third_party/skia/include/core/SKBitmap.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #import "testing/gtest_mac.h" | 20 #import "testing/gtest_mac.h" |
21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
22 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
23 | 23 |
24 using ::testing::_; | 24 using ::testing::_; |
25 using ::testing::Return; | 25 using ::testing::Return; |
26 using ::testing::NiceMock; | 26 using ::testing::NiceMock; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 dst_path.Append("Contents").Append("Resources").Append("app.icns"); | 113 dst_path.Append("Contents").Append("Resources").Append("app.icns"); |
114 | 114 |
115 scoped_nsobject<NSImage> image([[NSImage alloc] initWithContentsOfFile: | 115 scoped_nsobject<NSImage> image([[NSImage alloc] initWithContentsOfFile: |
116 base::mac::FilePathToNSString(icon_path)]); | 116 base::mac::FilePathToNSString(icon_path)]); |
117 EXPECT_TRUE(image); | 117 EXPECT_TRUE(image); |
118 EXPECT_EQ(info.favicon.ToSkBitmap()->width(), [image size].width); | 118 EXPECT_EQ(info.favicon.ToSkBitmap()->width(), [image size].width); |
119 EXPECT_EQ(info.favicon.ToSkBitmap()->height(), [image size].height); | 119 EXPECT_EQ(info.favicon.ToSkBitmap()->height(), [image size].height); |
120 } | 120 } |
121 | 121 |
122 } // namespace web_app | 122 } // namespace web_app |
OLD | NEW |