OLD | NEW |
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 #include <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" |
5 #include "chrome/common/chrome_utility_messages.h" | 10 #include "chrome/common/chrome_utility_messages.h" |
6 #include "chrome/utility/chrome_content_utility_client.h" | 11 #include "chrome/utility/chrome_content_utility_client.h" |
7 #include "ipc/ipc_channel.h" | 12 #include "ipc/ipc_channel.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/gfx/codec/jpeg_codec.h" | 14 #include "ui/gfx/codec/jpeg_codec.h" |
10 | 15 |
11 namespace { | 16 namespace { |
12 | 17 |
13 bool CreateJPEGImage(int width, | 18 bool CreateJPEGImage(int width, |
14 int height, | 19 int height, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 75 |
71 // Check that if resize not requested and image exceeds IPC size limit, | 76 // Check that if resize not requested and image exceeds IPC size limit, |
72 // an empty image is returned | 77 // an empty image is returned |
73 if (heights[i] > max_height_for_msg) { | 78 if (heights[i] > max_height_for_msg) { |
74 SkBitmap empty_bmp = ChromeContentUtilityClient::DecodeImage(jpg, false); | 79 SkBitmap empty_bmp = ChromeContentUtilityClient::DecodeImage(jpg, false); |
75 EXPECT_TRUE(empty_bmp.empty()); | 80 EXPECT_TRUE(empty_bmp.empty()); |
76 } | 81 } |
77 #endif | 82 #endif |
78 } | 83 } |
79 } | 84 } |
OLD | NEW |