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

Side by Side Diff: Source/platform/network/HTTPParsersTest.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/network/HTTPParsers.cpp ('k') | Source/platform/network/HTTPRequest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "HTTPParsers.h" 6 #include "HTTPParsers.h"
7 7
8 #include "wtf/MathExtras.h" 8 #include "wtf/MathExtras.h"
9 #include "wtf/testing/WTFTestHelpers.h" 9 #include "wtf/testing/WTFTestHelpers.h"
10 #include "wtf/text/AtomicString.h" 10 #include "wtf/text/AtomicString.h"
11 11
12 #include <gtest/gtest.h> 12 #include <gtest/gtest.h>
13 13
14 namespace WebCore { 14 namespace blink {
15 15
16 namespace { 16 namespace {
17 17
18 size_t parseHTTPHeader(const char* data, String& failureReason, AtomicString& na meStr, AtomicString& valueStr) 18 size_t parseHTTPHeader(const char* data, String& failureReason, AtomicString& na meStr, AtomicString& valueStr)
19 { 19 {
20 return WebCore::parseHTTPHeader(data, strlen(data), failureReason, nameStr, valueStr); 20 return blink::parseHTTPHeader(data, strlen(data), failureReason, nameStr, va lueStr);
21 } 21 }
22 22
23 } // namespace 23 } // namespace
24 24
25 TEST(HTTPParsersTest, ParseCacheControl) 25 TEST(HTTPParsersTest, ParseCacheControl)
26 { 26 {
27 CacheControlHeader header; 27 CacheControlHeader header;
28 28
29 header = parseCacheControlDirectives("no-cache", AtomicString()); 29 header = parseCacheControlDirectives("no-cache", AtomicString());
30 EXPECT_TRUE(header.parsed); 30 EXPECT_TRUE(header.parsed);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 EXPECT_TRUE(failureReason.isEmpty()); 216 EXPECT_TRUE(failureReason.isEmpty());
217 EXPECT_EQ("foo", name.string()); 217 EXPECT_EQ("foo", name.string());
218 EXPECT_EQ("bar", value.string()); 218 EXPECT_EQ("bar", value.string());
219 219
220 EXPECT_EQ(12u, parseHTTPHeader(data + 10, failureReason, name, value)); 220 EXPECT_EQ(12u, parseHTTPHeader(data + 10, failureReason, name, value));
221 EXPECT_TRUE(failureReason.isEmpty()); 221 EXPECT_TRUE(failureReason.isEmpty());
222 EXPECT_EQ("hoge", name.string()); 222 EXPECT_EQ("hoge", name.string());
223 EXPECT_EQ("fuga", value.string()); 223 EXPECT_EQ("fuga", value.string());
224 } 224 }
225 225
226 } // namespace WebCore 226 } // namespace blink
227 227
OLDNEW
« no previous file with comments | « Source/platform/network/HTTPParsers.cpp ('k') | Source/platform/network/HTTPRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698