Index: base/trace_event/trace_event_unittest.cc |
diff --git a/base/trace_event/trace_event_unittest.cc b/base/trace_event/trace_event_unittest.cc |
index 91155ea1fe3456ef925b98dd98b32a22e36737d7..6a1d8a4991d28952f25e900e7378c48cd6ef80f9 100644 |
--- a/base/trace_event/trace_event_unittest.cc |
+++ b/base/trace_event/trace_event_unittest.cc |
@@ -2330,6 +2330,16 @@ TEST_F(TraceEventTestFixture, PrimitiveArgs) { |
EXPECT_EQ(1, int_value); |
} |
+TEST_F(TraceEventTestFixture, NameIsEscaped) { |
+ TraceLog::GetInstance()->SetEnabled(TraceConfig(kRecordAllCategoryFilter, ""), |
+ TraceLog::RECORDING_MODE); |
+ TRACE_EVENT0("category", "name\\with\\backspaces"); |
+ EndTraceAndFlush(); |
+ |
+ EXPECT_TRUE(FindMatchingValue("cat", "category")); |
+ EXPECT_TRUE(FindMatchingValue("name", "name\\with\\backspaces")); |
+} |
+ |
namespace { |
bool IsArgNameWhitelisted(const char* arg_name) { |