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

Side by Side Diff: net/base/trace_net_log_observer_unittest.cc

Issue 935723002: Promote "netlog" tracing category to a default category (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test Created 5 years, 9 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
« no previous file with comments | « net/base/trace_net_log_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/base/trace_net_log_observer.h" 5 #include "net/base/trace_net_log_observer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 10 matching lines...) Expand all
21 #include "net/base/net_log.h" 21 #include "net/base/net_log.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 using base::trace_event::TraceLog; 24 using base::trace_event::TraceLog;
25 25
26 namespace net { 26 namespace net {
27 27
28 namespace { 28 namespace {
29 29
30 // TraceLog category for NetLog events. 30 // TraceLog category for NetLog events.
31 const char kNetLogTracingCategory[] = TRACE_DISABLED_BY_DEFAULT("netlog"); 31 const char kNetLogTracingCategory[] = "netlog";
32 32
33 struct TraceEntryInfo { 33 struct TraceEntryInfo {
34 std::string category; 34 std::string category;
35 std::string id; 35 std::string id;
36 std::string phase; 36 std::string phase;
37 std::string name; 37 std::string name;
38 std::string source_type; 38 std::string source_type;
39 }; 39 };
40 40
41 TraceEntryInfo GetTraceEntryInfoFromValue(const base::DictionaryValue& value) { 41 TraceEntryInfo GetTraceEntryInfoFromValue(const base::DictionaryValue& value) {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 EXPECT_TRUE(item1->GetString("args.params.foo", &item1_params)); 369 EXPECT_TRUE(item1->GetString("args.params.foo", &item1_params));
370 EXPECT_EQ("bar", item1_params); 370 EXPECT_EQ("bar", item1_params);
371 371
372 EXPECT_TRUE(item2->GetString("args.params", &item2_params)); 372 EXPECT_TRUE(item2->GetString("args.params", &item2_params));
373 EXPECT_TRUE(item2_params.empty()); 373 EXPECT_TRUE(item2_params.empty());
374 } 374 }
375 375
376 } // namespace 376 } // namespace
377 377
378 } // namespace net 378 } // namespace net
OLDNEW
« no previous file with comments | « net/base/trace_net_log_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698