OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/favicon_base/large_icon_url_parser.h" | 5 #include "components/favicon_base/large_icon_url_parser.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "url/gurl.h" | 12 #include "url/gurl.h" |
10 | 13 |
11 namespace { | 14 namespace { |
12 | 15 |
13 const char kTestUrlStr[] = "https://www.google.ca/imghp?hl=en&tab=wi"; | 16 const char kTestUrlStr[] = "https://www.google.ca/imghp?hl=en&tab=wi"; |
14 | 17 |
15 } // namespace | 18 } // namespace |
16 | 19 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 "/http://www.google.com/", // Missing size. | 55 "/http://www.google.com/", // Missing size. |
53 "not_a_number/http://www.google.com/", // Bad size. | 56 "not_a_number/http://www.google.com/", // Bad size. |
54 "0/http://www.google.com/", // Non-positive size. | 57 "0/http://www.google.com/", // Non-positive size. |
55 "-1/http://www.google.com/", // Non-positive size. | 58 "-1/http://www.google.com/", // Non-positive size. |
56 }; | 59 }; |
57 for (size_t i = 0; i < arraysize(test_cases); ++i) { | 60 for (size_t i = 0; i < arraysize(test_cases); ++i) { |
58 LargeIconUrlParser parser; | 61 LargeIconUrlParser parser; |
59 EXPECT_FALSE(parser.Parse(test_cases[i])) << "test_cases[" << i << "]"; | 62 EXPECT_FALSE(parser.Parse(test_cases[i])) << "test_cases[" << i << "]"; |
60 } | 63 } |
61 } | 64 } |
OLD | NEW |