Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 std::string CustomUrlRequestTestHttpHost::value_("127.0.0.1"); | |
|
Paweł Hajdan Jr.
2012/02/17 11:06:36
nit: // static above
erikwright (departed)
2012/02/17 17:48:12
It doesn't compile with a static here:
1>.\url_re
Paweł Hajdan Jr.
2012/02/21 16:56:35
We have a convention to add it as a *comment* .
| |
| 509 | |
| 510 CustomUrlRequestTestHttpHost::CustomUrlRequestTestHttpHost( | |
|
Paweł Hajdan Jr.
2012/02/17 11:06:36
Where is this instantiated?
erikwright (departed)
2012/02/17 11:15:21
In fake_external_tab.cc. I have not yet uploaded t
erikwright (departed)
2012/02/17 17:48:12
See http://codereview.chromium.org/9401013/diff/80
| |
| 511 const std::string& value) { | |
| 512 value_ = value; | |
| 513 } | |
| 514 | |
| 515 CustomUrlRequestTestHttpHost::~CustomUrlRequestTestHttpHost() { | |
| 516 value_ = "127.0.0.1"; | |
|
Paweł Hajdan Jr.
2012/02/17 11:06:36
This doesn't allow stacking. It'd be better to sto
erikwright (departed)
2012/02/17 11:15:21
Presumably it will be OK to support naive (i.e., f
erikwright (departed)
2012/02/17 17:48:12
Done.
| |
| 517 } | |
| 518 | |
| 519 const std::string& CustomUrlRequestTestHttpHost::value() { | |
|
Paweł Hajdan Jr.
2012/02/17 11:06:36
nit: // static above
erikwright (departed)
2012/02/17 17:48:12
Doesn't compile:
1>.\url_request\url_request_test
| |
| 520 return value_; | |
| 521 } | |
| OLD | NEW |