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

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

Issue 4118004: Update NetLog to be thread safe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add short test description Created 10 years, 1 month 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
OLDNEW
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
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
55 EXPECT_EQ(2u, entries.size());
56 EXPECT_TRUE(LogContainsBeginEvent(entries,
54 0, event_type)); 57 0, event_type));
55 EXPECT_TRUE(LogContainsEndEvent(capturing_net_log.entries(), 58 EXPECT_TRUE(LogContainsEndEvent(entries,
56 1, event_type)); 59 1, event_type));
57 } 60 }
58 } 61 }
59 } 62 }
60 } 63 }
61 64
62 } // namespace net 65 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698