Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: extensions/browser/api/web_request/form_data_parser_unittest.cc

Issue 584163004: Move web_request directory to //extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/basictypes.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "chrome/browser/extensions/api/web_request/form_data_parser.h" 8 #include "extensions/browser/api/web_request/form_data_parser.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 12
13 namespace { 13 namespace {
14 14
15 // Attempts to create a parser corresponding to the |content_type_header|. 15 // Attempts to create a parser corresponding to the |content_type_header|.
16 // On success, returns the parser. 16 // On success, returns the parser.
17 scoped_ptr<FormDataParser> InitParser(const std::string& content_type_header) { 17 scoped_ptr<FormDataParser> InitParser(const std::string& content_type_header) {
18 scoped_ptr<FormDataParser> parser( 18 scoped_ptr<FormDataParser> parser(
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Fourth test: empty URL-encoded POST data. Note that an empty string is a 241 // Fourth test: empty URL-encoded POST data. Note that an empty string is a
242 // valid url-encoded value, so this should parse correctly. 242 // valid url-encoded value, so this should parse correctly.
243 std::vector<std::string> output; 243 std::vector<std::string> output;
244 input.clear(); 244 input.clear();
245 input.push_back(&kUrlEncodedBytesEmpty); 245 input.push_back(&kUrlEncodedBytesEmpty);
246 EXPECT_TRUE(RunParser(kUrlEncoded, input, &output)); 246 EXPECT_TRUE(RunParser(kUrlEncoded, input, &output));
247 EXPECT_EQ(0u, output.size()); 247 EXPECT_EQ(0u, output.size());
248 } 248 }
249 249
250 } // namespace extensions 250 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/web_request/form_data_parser.cc ('k') | extensions/browser/api/web_request/upload_data_presenter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698