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 "components/variations/net/variations_http_headers.h" | 5 #include "components/variations/net/variations_http_headers.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/macros.h" | 9 #include "base/macros.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "url/gurl.h" | 11 #include "url/gurl.h" |
10 | 12 |
11 namespace variations { | 13 namespace variations { |
12 | 14 |
13 TEST(VariationsHttpHeadersTest, ShouldAppendHeaders) { | 15 TEST(VariationsHttpHeadersTest, ShouldAppendHeaders) { |
14 struct { | 16 struct { |
15 const char* url; | 17 const char* url; |
16 bool should_append_headers; | 18 bool should_append_headers; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 104 |
103 for (size_t i = 0; i < arraysize(cases); ++i) { | 105 for (size_t i = 0; i < arraysize(cases); ++i) { |
104 const GURL url(cases[i].url); | 106 const GURL url(cases[i].url); |
105 EXPECT_EQ(cases[i].should_append_headers, | 107 EXPECT_EQ(cases[i].should_append_headers, |
106 internal::ShouldAppendVariationHeaders(url)) | 108 internal::ShouldAppendVariationHeaders(url)) |
107 << url; | 109 << url; |
108 } | 110 } |
109 } | 111 } |
110 | 112 |
111 } // namespace variations | 113 } // namespace variations |
OLD | NEW |