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 "base/basictypes.h" | 5 #include <stddef.h> |
| 6 |
6 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" |
7 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
8 #include "extensions/browser/api/web_request/form_data_parser.h" | 10 #include "extensions/browser/api/web_request/form_data_parser.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
10 | 12 |
11 namespace extensions { | 13 namespace extensions { |
12 | 14 |
13 namespace { | 15 namespace { |
14 | 16 |
15 // Attempts to create a parser corresponding to the |content_type_header|. | 17 // Attempts to create a parser corresponding to the |content_type_header|. |
16 // On success, returns the parser. | 18 // On success, returns the parser. |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // Fourth test: empty URL-encoded POST data. Note that an empty string is a | 243 // Fourth test: empty URL-encoded POST data. Note that an empty string is a |
242 // valid url-encoded value, so this should parse correctly. | 244 // valid url-encoded value, so this should parse correctly. |
243 std::vector<std::string> output; | 245 std::vector<std::string> output; |
244 input.clear(); | 246 input.clear(); |
245 input.push_back(&kUrlEncodedBytesEmpty); | 247 input.push_back(&kUrlEncodedBytesEmpty); |
246 EXPECT_TRUE(RunParser(kUrlEncoded, input, &output)); | 248 EXPECT_TRUE(RunParser(kUrlEncoded, input, &output)); |
247 EXPECT_EQ(0u, output.size()); | 249 EXPECT_EQ(0u, output.size()); |
248 } | 250 } |
249 | 251 |
250 } // namespace extensions | 252 } // namespace extensions |
OLD | NEW |