| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_auth_handler.h" | 5 #include "net/http/http_auth_handler.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "net/base/capturing_net_log.h" | 9 #include "net/base/capturing_net_log.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 BoundNetLog bound_net_log(source, &capturing_net_log); | 42 BoundNetLog bound_net_log(source, &capturing_net_log); |
| 43 | 43 |
| 44 mock_handler.InitFromChallenge(&tokenizer, target, | 44 mock_handler.InitFromChallenge(&tokenizer, target, |
| 45 origin, bound_net_log); | 45 origin, bound_net_log); |
| 46 mock_handler.SetGenerateExpectation(async, rv); | 46 mock_handler.SetGenerateExpectation(async, rv); |
| 47 mock_handler.GenerateAuthToken(&username, &password, &request, | 47 mock_handler.GenerateAuthToken(&username, &password, &request, |
| 48 &test_callback, &auth_token); | 48 &test_callback, &auth_token); |
| 49 if (async) | 49 if (async) |
| 50 test_callback.WaitForResult(); | 50 test_callback.WaitForResult(); |
| 51 | 51 |
| 52 EXPECT_EQ(2u, capturing_net_log.entries().size()); | 52 net::CapturingNetLog::EntryList entries; |
| 53 EXPECT_TRUE(LogContainsBeginEvent(capturing_net_log.entries(), | 53 capturing_net_log.GetEntries(&entries); |
| 54 0, event_type)); | 54 |
| 55 EXPECT_TRUE(LogContainsEndEvent(capturing_net_log.entries(), | 55 EXPECT_EQ(2u, entries.size()); |
| 56 1, event_type)); | 56 EXPECT_TRUE(LogContainsBeginEvent(entries, 0, event_type)); |
| 57 EXPECT_TRUE(LogContainsEndEvent(entries, 1, event_type)); |
| 57 } | 58 } |
| 58 } | 59 } |
| 59 } | 60 } |
| 60 } | 61 } |
| 61 | 62 |
| 62 } // namespace net | 63 } // namespace net |
| OLD | NEW |