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

Unified Diff: base/debug/trace_event_unittest.cc

Issue 7840017: Fix trace_event code to accept double-quote and backslash characters in string values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « base/debug/trace_event.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_unittest.cc
diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc
index 3fbc777203e7fbfc56c9abefc56fd7a4de0b5617..839b19ac7628a857ee2fb6b57745180afb7e3891 100644
--- a/base/debug/trace_event_unittest.cc
+++ b/base/debug/trace_event_unittest.cc
@@ -206,8 +206,8 @@ void TraceWithAllMacroVariants(WaitableEvent* task_complete_event) {
TRACE_EVENT0("all", "TRACE_EVENT0 call");
TRACE_EVENT1("all", "TRACE_EVENT1 call", "name1", "value1");
TRACE_EVENT2("all", "TRACE_EVENT2 call",
- "name1", "value1",
- "name2", "value2");
+ "name1", "\"value1\"",
+ "name2", "value\\2");
TRACE_EVENT_INSTANT0("all", "TRACE_EVENT_INSTANT0 call");
TRACE_EVENT_INSTANT1("all", "TRACE_EVENT_INSTANT1 call", "name1", "value1");
@@ -269,9 +269,9 @@ void ValidateAllTraceMacrosCreatedData(const ListValue& trace_parsed,
EXPECT_FIND_("TRACE_EVENT1 call");
EXPECT_FIND_("TRACE_EVENT2 call");
EXPECT_SUB_FIND_("name1");
- EXPECT_SUB_FIND_("value1");
+ EXPECT_SUB_FIND_("\"value1\"");
EXPECT_SUB_FIND_("name2");
- EXPECT_SUB_FIND_("value2");
+ EXPECT_SUB_FIND_("value\\2");
EXPECT_FIND_("TRACE_EVENT_INSTANT0 call");
EXPECT_FIND_("TRACE_EVENT_INSTANT1 call");
EXPECT_FIND_("TRACE_EVENT_INSTANT2 call");
« no previous file with comments | « base/debug/trace_event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698