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

Unified Diff: runtime/vm/timeline_test.cc

Issue 2984603002: Special-case Timeline.{start,finish}Sync for Fuchsia (Closed)
Patch Set: Address comments Created 3 years, 5 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 | « runtime/vm/timeline_macos.cc ('k') | runtime/vm/timeline_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline_test.cc
diff --git a/runtime/vm/timeline_test.cc b/runtime/vm/timeline_test.cc
index 1cec65b8e05ef13faf030edee5c0b2037d809013..6e59425b53f5686219b4796c7b1c5148628bf5fe 100644
--- a/runtime/vm/timeline_test.cc
+++ b/runtime/vm/timeline_test.cc
@@ -161,6 +161,7 @@ TEST_CASE(TimelineEventDurationPrintJSON) {
event.DurationEnd();
}
+#if defined(HOST_OS_ANDROID) || defined(HOST_OS_LINUX)
TEST_CASE(TimelineEventPrintSystrace) {
const intptr_t kBufferLength = 1024;
char buffer[kBufferLength];
@@ -175,13 +176,15 @@ TEST_CASE(TimelineEventPrintSystrace) {
// Test a Begin event.
event.Begin("apple", 1, 2);
- event.PrintSystrace(&buffer[0], kBufferLength);
+ TimelineEventSystraceRecorder::PrintSystrace(&event, &buffer[0],
+ kBufferLength);
EXPECT_SUBSTRING("|apple", buffer);
EXPECT_SUBSTRING("B|", buffer);
// Test an End event.
event.End("apple", 2, 3);
- event.PrintSystrace(&buffer[0], kBufferLength);
+ TimelineEventSystraceRecorder::PrintSystrace(&event, &buffer[0],
+ kBufferLength);
EXPECT_STREQ("E", buffer);
// Test a Counter event. We only report the first counter value (in this case
@@ -193,16 +196,19 @@ TEST_CASE(TimelineEventPrintSystrace) {
event.CopyArgument(0, "cats", "4");
// Set the second counter value.
event.CopyArgument(1, "dogs", "1");
- event.PrintSystrace(&buffer[0], kBufferLength);
+ TimelineEventSystraceRecorder::PrintSystrace(&event, &buffer[0],
+ kBufferLength);
EXPECT_SUBSTRING("C|", buffer);
EXPECT_SUBSTRING("|CTR|4", buffer);
// Test a duration event. This event kind is not supported so we should
// serialize it to an empty string.
event.Duration("DUR", 0, 1, 2, 3);
- event.PrintSystrace(&buffer[0], kBufferLength);
+ TimelineEventSystraceRecorder::PrintSystrace(&event, &buffer[0],
+ kBufferLength);
EXPECT_STREQ("", buffer);
}
+#endif // defined(HOST_OS_ANDROID) || defined(HOST_OS_LINUX)
TEST_CASE(TimelineEventArguments) {
// Create a test stream.
« no previous file with comments | « runtime/vm/timeline_macos.cc ('k') | runtime/vm/timeline_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698