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

Side by Side Diff: runtime/vm/dart_api_impl_test.cc

Issue 1799933002: Ensure embedder timeline callbacks are called for service protocol requests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698