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

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

Issue 9368031: Expose a static configuration value for the host to use for URLRequestTestHTTP tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to review comments. Created 8 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/url_request/url_request_test_util.h" 5 #include "net/url_request/url_request_test_util.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 event_order_[req_id] += "OnAuthRequired\n"; 497 event_order_[req_id] += "OnAuthRequired\n";
498 EXPECT_TRUE(next_states_[req_id] & kStageAuthRequired) << 498 EXPECT_TRUE(next_states_[req_id] & kStageAuthRequired) <<
499 event_order_[req_id]; 499 event_order_[req_id];
500 next_states_[req_id] = kStageBeforeSendHeaders | 500 next_states_[req_id] = kStageBeforeSendHeaders |
501 kStageHeadersReceived | // Request canceled by delegate simulates empty 501 kStageHeadersReceived | // Request canceled by delegate simulates empty
502 // response. 502 // response.
503 kStageResponseStarted | // data: URLs do not trigger sending headers 503 kStageResponseStarted | // data: URLs do not trigger sending headers
504 kStageBeforeRedirect; // a delegate can trigger a redirection 504 kStageBeforeRedirect; // a delegate can trigger a redirection
505 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; 505 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
506 } 506 }
507
508 namespace {
509 std::string g_url_request_test_http_host("127.0.0.1");
510 } // namespace
511
512 void set_url_request_test_http_host(const std::string& host) {
513 g_url_request_test_http_host = host;
514 }
515
516 const std::string& url_request_test_http_host() {
517 return g_url_request_test_http_host;
518 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698