| 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 #include "skia/ext/skia_utils_ios.h" |
| 6 |
| 7 #import <ImageIO/ImageIO.h> |
| 5 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 6 | 9 |
| 7 #include "base/base64.h" | 10 #include "base/base64.h" |
| 8 #include "skia/ext/skia_utils_ios.mm" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 12 |
| 11 namespace { | 13 namespace { |
| 12 | 14 |
| 13 typedef testing::Test SkiaUtilsIosTest; | 15 typedef testing::Test SkiaUtilsIosTest; |
| 14 | 16 |
| 15 // This is a base64 encoded version of google.com ico file. generated by | 17 // This is a base64 encoded version of google.com ico file. generated by |
| 16 // curl http://www.google.com/favicon.ico | base64 -b 76 | 18 // curl http://www.google.com/favicon.ico | base64 -b 76 |
| 17 const char kIcoEncodedData[] = | 19 const char kIcoEncodedData[] = |
| 18 "AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAA" | 20 "AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAA" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 150 } |
| 149 | 151 |
| 150 TEST_F(SkiaUtilsIosTest, EmptyDataFailure) { | 152 TEST_F(SkiaUtilsIosTest, EmptyDataFailure) { |
| 151 std::vector<SkBitmap> bitmaps(gfx::ImageDataToSkBitmaps([NSData data])); | 153 std::vector<SkBitmap> bitmaps(gfx::ImageDataToSkBitmaps([NSData data])); |
| 152 | 154 |
| 153 EXPECT_EQ(0UL, bitmaps.size()); | 155 EXPECT_EQ(0UL, bitmaps.size()); |
| 154 } | 156 } |
| 155 | 157 |
| 156 } // namespace | 158 } // namespace |
| 157 | 159 |
| OLD | NEW |