| 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 "platform/network/HTTPParsers.h" | 5 #include "platform/network/HTTPParsers.h" |
| 6 | 6 |
| 7 #include "platform/heap/Handle.h" | 7 #include "platform/heap/Handle.h" |
| 8 #include "platform/network/ResourceResponse.h" | 8 #include "platform/loader/fetch/ResourceResponse.h" |
| 9 #include "platform/weborigin/Suborigin.h" | 9 #include "platform/weborigin/Suborigin.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "wtf/MathExtras.h" | 11 #include "wtf/MathExtras.h" |
| 12 #include "wtf/dtoa/utils.h" | 12 #include "wtf/dtoa/utils.h" |
| 13 #include "wtf/text/AtomicString.h" | 13 #include "wtf/text/AtomicString.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 TEST(HTTPParsersTest, ParseCacheControl) { | 17 TEST(HTTPParsersTest, ParseCacheControl) { |
| 18 CacheControlHeader header; | 18 CacheControlHeader header; |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 parseMultipartHeadersFromBody(data, strlen(data), &response, &end); | 494 parseMultipartHeadersFromBody(data, strlen(data), &response, &end); |
| 495 | 495 |
| 496 EXPECT_TRUE(result); | 496 EXPECT_TRUE(result); |
| 497 EXPECT_EQ(strlen(data), end); | 497 EXPECT_EQ(strlen(data), end); |
| 498 EXPECT_EQ("text/html; charset=utf-8", | 498 EXPECT_EQ("text/html; charset=utf-8", |
| 499 response.httpHeaderField("content-type")); | 499 response.httpHeaderField("content-type")); |
| 500 EXPECT_EQ("utf-8", response.textEncodingName()); | 500 EXPECT_EQ("utf-8", response.textEncodingName()); |
| 501 } | 501 } |
| 502 | 502 |
| 503 } // namespace blink | 503 } // namespace blink |
| OLD | NEW |