OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/renderer/web_apps.h" | 5 #include "chrome/renderer/web_apps.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
9 | 12 |
10 // Tests ParseIconSizes with various input. | 13 // Tests ParseIconSizes with various input. |
11 TEST(WebAppInfo, ParseIconSizes) { | 14 TEST(WebAppInfo, ParseIconSizes) { |
12 struct TestData { | 15 struct TestData { |
13 const char* input; | 16 const char* input; |
14 const bool expected_result; | 17 const bool expected_result; |
15 const bool is_any; | 18 const bool is_any; |
16 const size_t expected_size_count; | 19 const size_t expected_size_count; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ASSERT_EQ(data[i].width1, sizes[0].width()); | 56 ASSERT_EQ(data[i].width1, sizes[0].width()); |
54 ASSERT_EQ(data[i].height1, sizes[0].height()); | 57 ASSERT_EQ(data[i].height1, sizes[0].height()); |
55 } | 58 } |
56 if (sizes.size() > 1) { | 59 if (sizes.size() > 1) { |
57 ASSERT_EQ(data[i].width2, sizes[1].width()); | 60 ASSERT_EQ(data[i].width2, sizes[1].width()); |
58 ASSERT_EQ(data[i].height2, sizes[1].height()); | 61 ASSERT_EQ(data[i].height2, sizes[1].height()); |
59 } | 62 } |
60 } | 63 } |
61 } | 64 } |
62 } | 65 } |
OLD | NEW |