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

Side by Side Diff: net/http/http_response_headers_unittest.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 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 "net/http/http_response_headers.h" 5 #include "net/http/http_response_headers.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iostream> 10 #include <iostream>
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 1812
1813 TEST_P(RemoveHeadersTest, RemoveHeaders) { 1813 TEST_P(RemoveHeadersTest, RemoveHeaders) {
1814 const RemoveHeadersTestData test = GetParam(); 1814 const RemoveHeadersTestData test = GetParam();
1815 1815
1816 std::string orig_headers(test.orig_headers); 1816 std::string orig_headers(test.orig_headers);
1817 HeadersToRaw(&orig_headers); 1817 HeadersToRaw(&orig_headers);
1818 scoped_refptr<HttpResponseHeaders> parsed( 1818 scoped_refptr<HttpResponseHeaders> parsed(
1819 new HttpResponseHeaders(orig_headers)); 1819 new HttpResponseHeaders(orig_headers));
1820 1820
1821 std::unordered_set<std::string> to_remove; 1821 std::unordered_set<std::string> to_remove;
1822 for (const auto& header : test.to_remove) { 1822 for (auto* header : test.to_remove) {
1823 if (header) 1823 if (header)
1824 to_remove.insert(header); 1824 to_remove.insert(header);
1825 } 1825 }
1826 parsed->RemoveHeaders(to_remove); 1826 parsed->RemoveHeaders(to_remove);
1827 1827
1828 EXPECT_EQ(std::string(test.expected_headers), ToSimpleString(parsed)); 1828 EXPECT_EQ(std::string(test.expected_headers), ToSimpleString(parsed));
1829 } 1829 }
1830 1830
1831 const RemoveHeadersTestData remove_headers_tests[] = { 1831 const RemoveHeadersTestData remove_headers_tests[] = {
1832 {"HTTP/1.1 200 OK\n" 1832 {"HTTP/1.1 200 OK\n"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 "Fri, 20 Jan 2011 10:40:08 GMT", "Fri, 20 Jan 2011 10:40:12 GMT", 2282 "Fri, 20 Jan 2011 10:40:08 GMT", "Fri, 20 Jan 2011 10:40:12 GMT",
2283 "Fri, 20 Jan 2011 10:40:14 GMT", 7}}; 2283 "Fri, 20 Jan 2011 10:40:14 GMT", 7}};
2284 2284
2285 INSTANTIATE_TEST_CASE_P(HttpResponseHeaders, 2285 INSTANTIATE_TEST_CASE_P(HttpResponseHeaders,
2286 GetCurrentAgeTest, 2286 GetCurrentAgeTest,
2287 testing::ValuesIn(get_current_age_tests)); 2287 testing::ValuesIn(get_current_age_tests));
2288 2288
2289 } // namespace 2289 } // namespace
2290 2290
2291 } // namespace net 2291 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http2/decoder/payload_decoders/ping_payload_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698