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 <sys/xattr.h> | 9 #include <sys/xattr.h> |
10 #include <errno.h> | 10 #include <errno.h> |
11 | 11 |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
14 #include "base/mac/foundation_util.h" | 14 #include "base/mac/foundation_util.h" |
15 #include "base/memory/scoped_nsobject.h" | 15 #include "base/memory/scoped_nsobject.h" |
16 #include "base/strings/sys_string_conversions.h" | 16 #include "base/strings/sys_string_conversions.h" |
17 #include "base/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "chrome/common/mac/app_mode_common.h" | 18 #include "chrome/common/mac/app_mode_common.h" |
19 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 #import "testing/gtest_mac.h" | 22 #import "testing/gtest_mac.h" |
23 #include "third_party/skia/include/core/SkBitmap.h" | 23 #include "third_party/skia/include/core/SkBitmap.h" |
24 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/gfx/image/image.h" | 25 #include "ui/gfx/image/image.h" |
26 | 26 |
27 using ::testing::_; | 27 using ::testing::_; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 dst_path.Append("Contents").Append("Resources").Append("app.icns"); | 152 dst_path.Append("Contents").Append("Resources").Append("app.icns"); |
153 | 153 |
154 scoped_nsobject<NSImage> image([[NSImage alloc] initWithContentsOfFile: | 154 scoped_nsobject<NSImage> image([[NSImage alloc] initWithContentsOfFile: |
155 base::mac::FilePathToNSString(icon_path)]); | 155 base::mac::FilePathToNSString(icon_path)]); |
156 EXPECT_TRUE(image); | 156 EXPECT_TRUE(image); |
157 EXPECT_EQ(product_logo.Width(), [image size].width); | 157 EXPECT_EQ(product_logo.Width(), [image size].width); |
158 EXPECT_EQ(product_logo.Height(), [image size].height); | 158 EXPECT_EQ(product_logo.Height(), [image size].height); |
159 } | 159 } |
160 | 160 |
161 } // namespace web_app | 161 } // namespace web_app |
OLD | NEW |