OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "bin/builtin.h" | 5 #include "bin/builtin.h" |
6 #include "include/dart_api.h" | 6 #include "include/dart_api.h" |
7 #include "include/dart_mirrors_api.h" | 7 #include "include/dart_mirrors_api.h" |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "include/dart_tools_api.h" | 9 #include "include/dart_tools_api.h" |
10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 9809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9820 TEST_CASE(Timeline_Dart_EmbedderTimelineGetTimeline) { | 9820 TEST_CASE(Timeline_Dart_EmbedderTimelineGetTimeline) { |
9821 Dart_SetEmbedderTimelineCallbacks(NULL, NULL, GetTimeline); | 9821 Dart_SetEmbedderTimelineCallbacks(NULL, NULL, GetTimeline); |
9822 | 9822 |
9823 Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_EMBEDDER); | 9823 Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_EMBEDDER); |
9824 Dart_TimelineDuration("testDurationEvent", 0, 1); | 9824 Dart_TimelineDuration("testDurationEvent", 0, 1); |
9825 | 9825 |
9826 AppendData data; | 9826 AppendData data; |
9827 bool success = Dart_GlobalTimelineGetTrace(AppendStreamConsumer, &data); | 9827 bool success = Dart_GlobalTimelineGetTrace(AppendStreamConsumer, &data); |
9828 EXPECT(success); | 9828 EXPECT(success); |
9829 | 9829 |
9830 EXPECT_SUBSTRING("HELLO FROM EMBEDDER,{\"name\":\"testDurationEvent\"", | 9830 EXPECT_SUBSTRING("}},HELLO FROM EMBEDDER", |
9831 data.buffer); | 9831 data.buffer); |
9832 | 9832 |
9833 // Free buffer allocated by AppendStreamConsumer | 9833 // Free buffer allocated by AppendStreamConsumer |
9834 free(data.buffer); | 9834 free(data.buffer); |
9835 } | 9835 } |
9836 | 9836 |
9837 #endif // !PRODUCT | 9837 #endif // !PRODUCT |
9838 | 9838 |
9839 } // namespace dart | 9839 } // namespace dart |
OLD | NEW |