diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-10 20:20:32 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-10 20:20:32 +0000 |
commit | 3abacd60fa00bc53d4cf3d28352e855d10533ac0 (patch) | |
tree | 444933dd014250163b78713a4e9d7a9ac8d4356b /net/base/net_log_unittest.cc | |
parent | 8b2d262447607c79fd3b18efa5eb1e5c2efa4cad (diff) | |
download | chromium_src-3abacd60fa00bc53d4cf3d28352e855d10533ac0.zip chromium_src-3abacd60fa00bc53d4cf3d28352e855d10533ac0.tar.gz chromium_src-3abacd60fa00bc53d4cf3d28352e855d10533ac0.tar.bz2 |
Make NetLog take in callbacks that return Values rather
than refcounted objects. Avoids the need to create
classes and copy data. Also no longer get time whenever
an event is logged.
BUG=126243
Review URL: https://chromiumcodereview.appspot.com/10399083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_log_unittest.cc')
-rw-r--r-- | net/base/net_log_unittest.cc | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/net/base/net_log_unittest.cc b/net/base/net_log_unittest.cc deleted file mode 100644 index 3454df3..0000000 --- a/net/base/net_log_unittest.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/memory/scoped_ptr.h" -#include "net/base/capturing_net_log.h" -#include "net/base/net_log.h" -#include "net/base/net_log_unittest.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace net { - -namespace { - -TEST(NetLog, ScopedNetLogEventTest) { - CapturingNetLog log; - BoundNetLog net_log(BoundNetLog::Make(&log, NetLog::SOURCE_URL_REQUEST)); - - scoped_ptr<ScopedNetLogEvent> net_log_event( - new ScopedNetLogEvent(net_log, NetLog::TYPE_REQUEST_ALIVE, NULL)); - - CapturingNetLog::CapturedEntryList entries; - log.GetEntries(&entries); - EXPECT_EQ(1u, entries.size()); - EXPECT_TRUE(LogContainsBeginEvent(entries, 0, NetLog::TYPE_REQUEST_ALIVE)); - - net_log_event.reset(); - log.GetEntries(&entries); - EXPECT_EQ(2u, entries.size()); - EXPECT_TRUE(LogContainsEndEvent(entries, 1, NetLog::TYPE_REQUEST_ALIVE)); -} - -} // namespace - -} // namespace net |