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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 6369008: Fix the newly added OverrideUserAgent net test so that it works in ChromeFram... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/url_request/url_request_unittest.h" 5 #include "net/url_request/url_request_unittest.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <shlobj.h> 10 #include <shlobj.h>
11 #include <windows.h> 11 #include <windows.h>
12 #elif defined(USE_NSS) 12 #elif defined(USE_NSS)
13 #include "base/nss_util.h" 13 #include "base/nss_util.h"
14 #endif 14 #endif
15 15
16 #include <algorithm> 16 #include <algorithm>
17 #include <string> 17 #include <string>
18 18
19 #include "base/file_util.h" 19 #include "base/file_util.h"
20 #include "base/format_macros.h" 20 #include "base/format_macros.h"
21 #include "base/message_loop.h" 21 #include "base/message_loop.h"
22 #include "base/path_service.h" 22 #include "base/path_service.h"
23 #include "base/process_util.h" 23 #include "base/process_util.h"
24 #include "base/string_number_conversions.h" 24 #include "base/string_number_conversions.h"
25 #include "base/string_piece.h" 25 #include "base/string_piece.h"
26 #include "base/stringprintf.h" 26 #include "base/stringprintf.h"
27 #include "base/string_util.h"
wtc 2011/01/21 22:11:06 Nit: this should be listed right after "base/strin
ananta 2011/01/21 22:24:05 Done.
27 #include "base/utf_string_conversions.h" 28 #include "base/utf_string_conversions.h"
28 #include "net/base/cookie_monster.h" 29 #include "net/base/cookie_monster.h"
29 #include "net/base/cookie_policy.h" 30 #include "net/base/cookie_policy.h"
30 #include "net/base/load_flags.h" 31 #include "net/base/load_flags.h"
31 #include "net/base/net_errors.h" 32 #include "net/base/net_errors.h"
32 #include "net/base/net_log.h" 33 #include "net/base/net_log.h"
33 #include "net/base/net_log_unittest.h" 34 #include "net/base/net_log_unittest.h"
34 #include "net/base/net_module.h" 35 #include "net/base/net_module.h"
35 #include "net/base/net_util.h" 36 #include "net/base/net_util.h"
36 #include "net/base/ssl_connection_status_flags.h" 37 #include "net/base/ssl_connection_status_flags.h"
(...skipping 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 2663
2663 TestDelegate d; 2664 TestDelegate d;
2664 TestURLRequest 2665 TestURLRequest
2665 req(test_server_.GetURL("echoheaderoverride?User-Agent"), &d); 2666 req(test_server_.GetURL("echoheaderoverride?User-Agent"), &d);
2666 req.set_context(new TestURLRequestContext()); 2667 req.set_context(new TestURLRequestContext());
2667 net::HttpRequestHeaders headers; 2668 net::HttpRequestHeaders headers;
2668 headers.SetHeader(net::HttpRequestHeaders::kUserAgent, "Lynx (textmode)"); 2669 headers.SetHeader(net::HttpRequestHeaders::kUserAgent, "Lynx (textmode)");
2669 req.SetExtraRequestHeaders(headers); 2670 req.SetExtraRequestHeaders(headers);
2670 req.Start(); 2671 req.Start();
2671 MessageLoop::current()->Run(); 2672 MessageLoop::current()->Run();
2672 EXPECT_EQ(std::string("Lynx (textmode)"), d.data_received()); 2673 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode)", true));
wtc 2011/01/21 22:11:06 It would be nice to document the purpose of the St
ananta 2011/01/21 22:24:05 Done.
2673 } 2674 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698