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

Side by Side Diff: content/browser/devtools/protocol/tracing_handler_unittest.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/trace_event/trace_config.h" 6 #include "base/trace_event/trace_config.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "content/browser/devtools/protocol/tracing_handler.h" 8 #include "content/browser/devtools/protocol/tracing_handler.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 "{\"mode\":\"detailed\",\"periodicIntervalMs\":1000}" 50 "{\"mode\":\"detailed\",\"periodicIntervalMs\":1000}"
51 "]" 51 "]"
52 "}," 52 "},"
53 "\"recordMode\":\"recordContinuously\"," 53 "\"recordMode\":\"recordContinuously\","
54 "\"synthetic_delays\":[\"test.Delay1;16\",\"test.Delay2;32\"]" 54 "\"synthetic_delays\":[\"test.Delay1;16\",\"test.Delay2;32\"]"
55 "}"; 55 "}";
56 56
57 } 57 }
58 58
59 TEST(TracingHandlerTest, GetTraceConfigFromDevToolsConfig) { 59 TEST(TracingHandlerTest, GetTraceConfigFromDevToolsConfig) {
60 scoped_ptr<base::Value> value = base::JSONReader::Read( 60 std::unique_ptr<base::Value> value =
61 kCustomTraceConfigStringDevToolsStyle); 61 base::JSONReader::Read(kCustomTraceConfigStringDevToolsStyle);
62 scoped_ptr<base::DictionaryValue> devtools_style_dict( 62 std::unique_ptr<base::DictionaryValue> devtools_style_dict(
63 static_cast<base::DictionaryValue*>(value.release())); 63 static_cast<base::DictionaryValue*>(value.release()));
64 64
65 base::trace_event::TraceConfig trace_config = 65 base::trace_event::TraceConfig trace_config =
66 TracingHandler::GetTraceConfigFromDevToolsConfig(*devtools_style_dict); 66 TracingHandler::GetTraceConfigFromDevToolsConfig(*devtools_style_dict);
67 67
68 EXPECT_STREQ(kCustomTraceConfigString, trace_config.ToString().c_str()); 68 EXPECT_STREQ(kCustomTraceConfigString, trace_config.ToString().c_str());
69 } 69 }
70 70
71 } // namespace tracing 71 } // namespace tracing
72 } // namespace devtools 72 } // namespace devtools
73 } // namespace content 73 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/tracing_handler.cc ('k') | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698