summaryrefslogtreecommitdiffstats
path: root/base/debug/trace_event_unittest.cc
diff options
context:
space:
mode:
authorsimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 00:14:11 +0000
committersimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 00:14:11 +0000
commit1321e20794513e3ff6540821ad9c18ce8ba625d9 (patch)
treee73577bbfdee5628684b91e4b9b8cd0281d77863 /base/debug/trace_event_unittest.cc
parent54150ef19ae35643bb1cbc78da4e8a9da482bce7 (diff)
downloadchromium_src-1321e20794513e3ff6540821ad9c18ce8ba625d9.zip
chromium_src-1321e20794513e3ff6540821ad9c18ce8ba625d9.tar.gz
chromium_src-1321e20794513e3ff6540821ad9c18ce8ba625d9.tar.bz2
Plot async steps in about:tracing.
BUG=None TEST=base_unittests,timeline_test.html,trace_event_importer_test.html Review URL: http://codereview.chromium.org/9839041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug/trace_event_unittest.cc')
-rw-r--r--base/debug/trace_event_unittest.cc25
1 files changed, 9 insertions, 16 deletions
diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc
index 94be430..f9a8b7a 100644
--- a/base/debug/trace_event_unittest.cc
+++ b/base/debug/trace_event_unittest.cc
@@ -330,12 +330,10 @@ void TraceWithAllMacroVariants(WaitableEvent* task_complete_event) {
"name1", "value1",
"name2", "value2");
- TRACE_EVENT_ASYNC_STEP0("all", "TRACE_EVENT_ASYNC_STEP0 call", 5);
- TRACE_EVENT_ASYNC_STEP1("all", "TRACE_EVENT_ASYNC_STEP1 call", 5,
- "name1", "value1");
- TRACE_EVENT_ASYNC_STEP2("all", "TRACE_EVENT_ASYNC_STEP2 call", 5,
- "name1", "value1",
- "name2", "value2");
+ TRACE_EVENT_ASYNC_BEGIN_STEP0("all", "TRACE_EVENT_ASYNC_BEGIN_STEP0 call",
+ 5, "step1");
+ TRACE_EVENT_ASYNC_BEGIN_STEP1("all", "TRACE_EVENT_ASYNC_BEGIN_STEP1 call",
+ 5, "step2", "name1", "value1");
TRACE_EVENT_ASYNC_END0("all", "TRACE_EVENT_ASYNC_END0 call", 5);
TRACE_EVENT_ASYNC_END1("all", "TRACE_EVENT_ASYNC_END1 call", 5,
@@ -463,21 +461,16 @@ void ValidateAllTraceMacrosCreatedData(const ListValue& trace_parsed) {
EXPECT_SUB_FIND_("name2");
EXPECT_SUB_FIND_("value2");
- EXPECT_FIND_("TRACE_EVENT_ASYNC_STEP0 call");
+ EXPECT_FIND_("TRACE_EVENT_ASYNC_BEGIN_STEP0 call");
EXPECT_SUB_FIND_("id");
EXPECT_SUB_FIND_("5");
- EXPECT_FIND_("TRACE_EVENT_ASYNC_STEP1 call");
+ EXPECT_SUB_FIND_("step1");
+ EXPECT_FIND_("TRACE_EVENT_ASYNC_BEGIN_STEP1 call");
EXPECT_SUB_FIND_("id");
EXPECT_SUB_FIND_("5");
+ EXPECT_SUB_FIND_("step2");
EXPECT_SUB_FIND_("name1");
EXPECT_SUB_FIND_("value1");
- EXPECT_FIND_("TRACE_EVENT_ASYNC_STEP2 call");
- EXPECT_SUB_FIND_("id");
- EXPECT_SUB_FIND_("5");
- EXPECT_SUB_FIND_("name1");
- EXPECT_SUB_FIND_("value1");
- EXPECT_SUB_FIND_("name2");
- EXPECT_SUB_FIND_("value2");
EXPECT_FIND_("TRACE_EVENT_ASYNC_END0 call");
EXPECT_SUB_FIND_("id");
@@ -947,7 +940,7 @@ TEST_F(TraceEventTestFixture, AsyncBeginEndEvents) {
unsigned long long id = 0xfeedbeeffeedbeefull;
TRACE_EVENT_ASYNC_BEGIN0( "cat", "name1", id);
- TRACE_EVENT_ASYNC_STEP0( "cat", "name1", id);
+ TRACE_EVENT_ASYNC_BEGIN_STEP0( "cat", "name1", id, "step1");
TRACE_EVENT_ASYNC_END0("cat", "name1", id);
TRACE_EVENT_BEGIN0( "cat", "name2");
TRACE_EVENT_ASYNC_BEGIN0( "cat", "name3", 0);