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

Unified Diff: content/browser/devtools/protocol/tracing_handler_unittest.cc

Issue 1814043002: Revert of Update DevTools Tracing.Start to accept trace config as a parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/protocol/tracing_handler.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/tracing_handler_unittest.cc
diff --git a/content/browser/devtools/protocol/tracing_handler_unittest.cc b/content/browser/devtools/protocol/tracing_handler_unittest.cc
deleted file mode 100644
index 8182f45826f4600f40db47ab05945aa8b6f2998a..0000000000000000000000000000000000000000
--- a/content/browser/devtools/protocol/tracing_handler_unittest.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2016 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/json/json_reader.h"
-#include "base/trace_event/trace_config.h"
-#include "base/values.h"
-#include "content/browser/devtools/protocol/tracing_handler.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace content {
-namespace devtools {
-namespace tracing {
-
-namespace {
-
-const char kCustomTraceConfigString[] =
- "{"
- "\"enable_argument_filter\":true,"
- "\"enable_sampling\":true,"
- "\"enable_systrace\":true,"
- "\"excluded_categories\":[\"excluded\",\"exc_pattern*\"],"
- "\"included_categories\":[\"included\","
- "\"inc_pattern*\","
- "\"disabled-by-default-cc\","
- "\"disabled-by-default-memory-infra\"],"
- "\"memory_dump_config\":{"
- "\"triggers\":["
- "{\"mode\":\"light\",\"periodic_interval_ms\":50},"
- "{\"mode\":\"detailed\",\"periodic_interval_ms\":1000}"
- "]"
- "},"
- "\"record_mode\":\"record-continuously\","
- "\"synthetic_delays\":[\"test.Delay1;16\",\"test.Delay2;32\"]"
- "}";
-
-const char kCustomTraceConfigStringDevToolsStyle[] =
- "{"
- "\"enableArgumentFilter\":true,"
- "\"enableSampling\":true,"
- "\"enableSystrace\":true,"
- "\"excludedCategories\":[\"excluded\",\"exc_pattern*\"],"
- "\"includedCategories\":[\"included\","
- "\"inc_pattern*\","
- "\"disabled-by-default-cc\","
- "\"disabled-by-default-memory-infra\"],"
- "\"memoryDumpConfig\":{"
- "\"triggers\":["
- "{\"mode\":\"light\",\"periodicIntervalMs\":50},"
- "{\"mode\":\"detailed\",\"periodicIntervalMs\":1000}"
- "]"
- "},"
- "\"recordMode\":\"recordContinuously\","
- "\"synthetic_delays\":[\"test.Delay1;16\",\"test.Delay2;32\"]"
- "}";
-
-}
-
-TEST(TracingHandlerTest, GetTraceConfigFromDevToolsConfig) {
- scoped_ptr<base::Value> value = base::JSONReader::Read(
- kCustomTraceConfigStringDevToolsStyle);
- scoped_ptr<base::DictionaryValue> devtools_style_dict(
- static_cast<base::DictionaryValue*>(value.release()));
-
- base::trace_event::TraceConfig trace_config =
- TracingHandler::GetTraceConfigFromDevToolsConfig(*devtools_style_dict);
-
- EXPECT_STREQ(kCustomTraceConfigString, trace_config.ToString().c_str());
-}
-
-} // namespace tracing
-} // namespace devtools
-} // namespace content
« no previous file with comments | « content/browser/devtools/protocol/tracing_handler.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698