1 // Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4
5 #include "include/base/cef_callback.h"
6 #include "include/cef_file_util.h"
7 #include "include/cef_task.h"
8 #include "include/cef_trace.h"
9 #include "include/cef_waitable_event.h"
10 #include "include/wrapper/cef_closure_task.h"
11 #include "tests/ceftests/test_handler.h"
12 #include "tests/gtest/include/gtest/gtest.h"
13 #include "tests/shared/browser/file_util.h"
14
15 // Use the CEF version of the TRACE_* macros instead of the Chromium version.
16 #undef USING_CHROMIUM_INCLUDES
17 #include "include/base/cef_trace_event.h"
18
19 enum TracingTestType {
20 TT_TRACE_EVENT0,
21 TT_TRACE_EVENT1,
22 TT_TRACE_EVENT2,
23 TT_TRACE_EVENT_INSTANT0,
24 TT_TRACE_EVENT_INSTANT1,
25 TT_TRACE_EVENT_INSTANT2,
26 TT_TRACE_EVENT_COPY_INSTANT0,
27 TT_TRACE_EVENT_COPY_INSTANT1,
28 TT_TRACE_EVENT_COPY_INSTANT2,
29 TT_TRACE_EVENT_BEGIN0,
30 TT_TRACE_EVENT_BEGIN1,
31 TT_TRACE_EVENT_BEGIN2,
32 TT_TRACE_EVENT_COPY_BEGIN0,
33 TT_TRACE_EVENT_COPY_BEGIN1,
34 TT_TRACE_EVENT_COPY_BEGIN2,
35 TT_TRACE_EVENT_END0,
36 TT_TRACE_EVENT_END1,
37 TT_TRACE_EVENT_END2,
38 TT_TRACE_EVENT_COPY_END0,
39 TT_TRACE_EVENT_COPY_END1,
40 TT_TRACE_EVENT_COPY_END2,
41 TT_TRACE_COUNTER1,
42 TT_TRACE_COPY_COUNTER1,
43 TT_TRACE_COUNTER2,
44 TT_TRACE_COPY_COUNTER2,
45 TT_TRACE_COUNTER_ID1,
46 TT_TRACE_COPY_COUNTER_ID1,
47 TT_TRACE_COUNTER_ID2,
48 TT_TRACE_COPY_COUNTER_ID2,
49 TT_TRACE_EVENT_ASYNC_BEGIN0,
50 TT_TRACE_EVENT_ASYNC_BEGIN1,
51 TT_TRACE_EVENT_ASYNC_BEGIN2,
52 TT_TRACE_EVENT_COPY_ASYNC_BEGIN0,
53 TT_TRACE_EVENT_COPY_ASYNC_BEGIN1,
54 TT_TRACE_EVENT_COPY_ASYNC_BEGIN2,
55 TT_TRACE_EVENT_ASYNC_STEP_INTO0,
56 TT_TRACE_EVENT_ASYNC_STEP_INTO1,
57 TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO0,
58 TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO1,
59 TT_TRACE_EVENT_ASYNC_STEP_PAST0,
60 TT_TRACE_EVENT_ASYNC_STEP_PAST1,
61 TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST0,
62 TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST1,
63 TT_TRACE_EVENT_ASYNC_END0,
64 TT_TRACE_EVENT_ASYNC_END1,
65 TT_TRACE_EVENT_ASYNC_END2,
66 TT_TRACE_EVENT_COPY_ASYNC_END0,
67 TT_TRACE_EVENT_COPY_ASYNC_END1,
68 TT_TRACE_EVENT_COPY_ASYNC_END2
69 };
70
71 const char kTraceTestCategory[] = "cef.client";
72
73 class TracingTestHandler : public CefEndTracingCallback,
74 public CefCompletionCallback {
75 public:
TracingTestHandler(TracingTestType type,const char * trace_type)76 TracingTestHandler(TracingTestType type, const char* trace_type)
77 : trace_type_(trace_type), type_(type) {
78 completion_event_ = CefWaitableEvent::CreateWaitableEvent(true, false);
79 }
80
ExecuteTest()81 void ExecuteTest() {
82 // Run the test.
83 CefPostTask(TID_UI,
84 base::BindOnce(&TracingTestHandler::BeginTracing, this));
85
86 // Wait for the test to complete.
87 completion_event_->Wait();
88
89 // Verify the results.
90 EXPECT_TRUE(!trace_data_.empty());
91 EXPECT_TRUE(trace_type_ != nullptr);
92 EXPECT_TRUE(strstr(trace_data_.c_str(), trace_type_) != nullptr);
93 }
94
BeginTracing()95 void BeginTracing() {
96 EXPECT_UI_THREAD();
97
98 // Results in a call to OnComplete.
99 CefBeginTracing(kTraceTestCategory, this);
100 }
101
OnComplete()102 void OnComplete() override {
103 EXPECT_UI_THREAD();
104
105 // Add some delay to avoid timing-related test failures.
106 CefPostDelayedTask(
107 TID_UI, base::BindOnce(&TracingTestHandler::TestTracing, this), 50);
108 }
109
TestTracing()110 void TestTracing() {
111 EXPECT_UI_THREAD();
112
113 switch (type_) {
114 case TT_TRACE_EVENT0: {
115 TRACE_EVENT0(kTraceTestCategory, "TT_TRACE_EVENT0");
116 } break;
117 case TT_TRACE_EVENT1: {
118 TRACE_EVENT1(kTraceTestCategory, "TT_TRACE_EVENT1", "arg1", 1);
119 } break;
120 case TT_TRACE_EVENT2: {
121 TRACE_EVENT2(kTraceTestCategory, "TT_TRACE_EVENT2", "arg1", 1, "arg2",
122 2);
123 } break;
124 case TT_TRACE_EVENT_INSTANT0:
125 TRACE_EVENT_INSTANT0(kTraceTestCategory, "TT_TRACE_EVENT_INSTANT0");
126 break;
127 case TT_TRACE_EVENT_INSTANT1:
128 TRACE_EVENT_INSTANT1(kTraceTestCategory, "TT_TRACE_EVENT_INSTANT1",
129 "arg1", 1);
130 break;
131 case TT_TRACE_EVENT_INSTANT2:
132 TRACE_EVENT_INSTANT2(kTraceTestCategory, "TT_TRACE_EVENT_INSTANT2",
133 "arg1", 1, "arg2", 2);
134 break;
135 case TT_TRACE_EVENT_COPY_INSTANT0:
136 TRACE_EVENT_COPY_INSTANT0(kTraceTestCategory,
137 "TT_TRACE_EVENT_COPY_INSTANT0");
138 break;
139 case TT_TRACE_EVENT_COPY_INSTANT1:
140 TRACE_EVENT_COPY_INSTANT1(kTraceTestCategory,
141 "TT_TRACE_EVENT_COPY_INSTANT1", "arg1", 1);
142 break;
143 case TT_TRACE_EVENT_COPY_INSTANT2:
144 TRACE_EVENT_COPY_INSTANT2(kTraceTestCategory,
145 "TT_TRACE_EVENT_COPY_INSTANT2", "arg1", 1,
146 "arg2", 2);
147 break;
148 case TT_TRACE_EVENT_BEGIN0:
149 TRACE_EVENT_BEGIN0(kTraceTestCategory, "TT_TRACE_EVENT_BEGIN0");
150 break;
151 case TT_TRACE_EVENT_BEGIN1:
152 TRACE_EVENT_BEGIN1(kTraceTestCategory, "TT_TRACE_EVENT_BEGIN1", "arg1",
153 1);
154 break;
155 case TT_TRACE_EVENT_BEGIN2:
156 TRACE_EVENT_BEGIN2(kTraceTestCategory, "TT_TRACE_EVENT_BEGIN2", "arg1",
157 1, "arg2", 2);
158 break;
159 case TT_TRACE_EVENT_COPY_BEGIN0:
160 TRACE_EVENT_COPY_BEGIN0(kTraceTestCategory,
161 "TT_TRACE_EVENT_COPY_BEGIN0");
162 break;
163 case TT_TRACE_EVENT_COPY_BEGIN1:
164 TRACE_EVENT_COPY_BEGIN1(kTraceTestCategory,
165 "TT_TRACE_EVENT_COPY_BEGIN1", "arg1", 1);
166 break;
167 case TT_TRACE_EVENT_COPY_BEGIN2:
168 TRACE_EVENT_COPY_BEGIN2(kTraceTestCategory,
169 "TT_TRACE_EVENT_COPY_BEGIN2", "arg1", 1, "arg2",
170 2);
171 break;
172 case TT_TRACE_EVENT_END0:
173 TRACE_EVENT_BEGIN0(kTraceTestCategory, "TT_TRACE_EVENT_END0");
174 TRACE_EVENT_END0(kTraceTestCategory, "TT_TRACE_EVENT_END0");
175 break;
176 case TT_TRACE_EVENT_END1:
177 TRACE_EVENT_BEGIN1(kTraceTestCategory, "TT_TRACE_EVENT_END1", "arg1",
178 1);
179 TRACE_EVENT_END1(kTraceTestCategory, "TT_TRACE_EVENT_END1", "arg1", 1);
180 break;
181 case TT_TRACE_EVENT_END2:
182 TRACE_EVENT_BEGIN2(kTraceTestCategory, "TT_TRACE_EVENT_END2", "arg1", 1,
183 "arg2", 2);
184 TRACE_EVENT_END2(kTraceTestCategory, "TT_TRACE_EVENT_END2", "arg1", 1,
185 "arg2", 2);
186 break;
187 case TT_TRACE_EVENT_COPY_END0:
188 TRACE_EVENT_COPY_BEGIN0(kTraceTestCategory, "TT_TRACE_EVENT_COPY_END0");
189 TRACE_EVENT_COPY_END0(kTraceTestCategory, "TT_TRACE_EVENT_COPY_END0");
190 break;
191 case TT_TRACE_EVENT_COPY_END1:
192 TRACE_EVENT_COPY_BEGIN1(kTraceTestCategory, "TT_TRACE_EVENT_COPY_END1",
193 "arg1", 1);
194 TRACE_EVENT_COPY_END1(kTraceTestCategory, "TT_TRACE_EVENT_COPY_END1",
195 "arg1", 1);
196 break;
197 case TT_TRACE_EVENT_COPY_END2:
198 TRACE_EVENT_COPY_BEGIN2(kTraceTestCategory, "TT_TRACE_EVENT_COPY_END2",
199 "arg1", 1, "arg2", 2);
200 TRACE_EVENT_COPY_END2(kTraceTestCategory, "TT_TRACE_EVENT_COPY_END2",
201 "arg1", 1, "arg2", 2);
202 break;
203 case TT_TRACE_COUNTER1:
204 TRACE_COUNTER1(kTraceTestCategory, "TT_TRACE_COUNTER1", 5);
205 break;
206 case TT_TRACE_COPY_COUNTER1:
207 TRACE_COPY_COUNTER1(kTraceTestCategory, "TT_TRACE_COPY_COUNTER1", 5);
208 break;
209 case TT_TRACE_COUNTER2:
210 TRACE_COUNTER2(kTraceTestCategory, "TT_TRACE_COUNTER2", "val1", 5,
211 "val2", 10);
212 break;
213 case TT_TRACE_COPY_COUNTER2:
214 TRACE_COPY_COUNTER2(kTraceTestCategory, "TT_TRACE_COPY_COUNTER2",
215 "val1", 5, "val2", 10);
216 break;
217 case TT_TRACE_COUNTER_ID1:
218 TRACE_COUNTER_ID1(kTraceTestCategory, "TT_TRACE_COUNTER_ID1", 100, 5);
219 break;
220 case TT_TRACE_COPY_COUNTER_ID1:
221 TRACE_COPY_COUNTER_ID1(kTraceTestCategory, "TT_TRACE_COPY_COUNTER_ID1",
222 100, 5);
223 break;
224 case TT_TRACE_COUNTER_ID2:
225 TRACE_COUNTER_ID2(kTraceTestCategory, "TT_TRACE_COUNTER_ID2", 100,
226 "val1", 5, "val2", 10);
227 break;
228 case TT_TRACE_COPY_COUNTER_ID2:
229 TRACE_COPY_COUNTER_ID2(kTraceTestCategory, "TT_TRACE_COPY_COUNTER_ID2",
230 100, "val1", 5, "val2", 10);
231 break;
232 case TT_TRACE_EVENT_ASYNC_BEGIN0:
233 TRACE_EVENT_ASYNC_BEGIN0(kTraceTestCategory,
234 "TT_TRACE_EVENT_ASYNC_BEGIN0", 100);
235 break;
236 case TT_TRACE_EVENT_ASYNC_BEGIN1:
237 TRACE_EVENT_ASYNC_BEGIN1(kTraceTestCategory,
238 "TT_TRACE_EVENT_ASYNC_BEGIN1", 100, "arg1", 1);
239 break;
240 case TT_TRACE_EVENT_ASYNC_BEGIN2:
241 TRACE_EVENT_ASYNC_BEGIN2(kTraceTestCategory,
242 "TT_TRACE_EVENT_ASYNC_BEGIN2", 100, "arg1", 1,
243 "arg2", 2);
244 break;
245 case TT_TRACE_EVENT_COPY_ASYNC_BEGIN0:
246 TRACE_EVENT_COPY_ASYNC_BEGIN0(kTraceTestCategory,
247 "TT_TRACE_EVENT_COPY_ASYNC_BEGIN0", 100);
248 break;
249 case TT_TRACE_EVENT_COPY_ASYNC_BEGIN1:
250 TRACE_EVENT_COPY_ASYNC_BEGIN1(kTraceTestCategory,
251 "TT_TRACE_EVENT_COPY_ASYNC_BEGIN1", 100,
252 "arg1", 1);
253 break;
254 case TT_TRACE_EVENT_COPY_ASYNC_BEGIN2:
255 TRACE_EVENT_COPY_ASYNC_BEGIN2(kTraceTestCategory,
256 "TT_TRACE_EVENT_COPY_ASYNC_BEGIN2", 100,
257 "arg1", 1, "arg2", 2);
258 break;
259 case TT_TRACE_EVENT_ASYNC_STEP_INTO0:
260 TRACE_EVENT_ASYNC_STEP_INTO0(
261 kTraceTestCategory, "TT_TRACE_EVENT_ASYNC_STEP_INTO0", 100, 1000);
262 break;
263 case TT_TRACE_EVENT_ASYNC_STEP_INTO1:
264 TRACE_EVENT_ASYNC_STEP_INTO1(kTraceTestCategory,
265 "TT_TRACE_EVENT_ASYNC_STEP_INTO1", 100,
266 1000, "arg1", 1);
267 break;
268 case TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO0:
269 TRACE_EVENT_COPY_ASYNC_STEP_INTO0(
270 kTraceTestCategory, "TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO0", 100,
271 1000);
272 break;
273 case TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO1:
274 TRACE_EVENT_COPY_ASYNC_STEP_INTO1(
275 kTraceTestCategory, "TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO1", 100,
276 1000, "arg1", 1);
277 break;
278 case TT_TRACE_EVENT_ASYNC_STEP_PAST0:
279 TRACE_EVENT_ASYNC_STEP_PAST0(
280 kTraceTestCategory, "TT_TRACE_EVENT_ASYNC_STEP_PAST0", 100, 1000);
281 break;
282 case TT_TRACE_EVENT_ASYNC_STEP_PAST1:
283 TRACE_EVENT_ASYNC_STEP_PAST1(kTraceTestCategory,
284 "TT_TRACE_EVENT_ASYNC_STEP_PAST1", 100,
285 1000, "arg1", 1);
286 break;
287 case TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST0:
288 TRACE_EVENT_COPY_ASYNC_STEP_PAST0(
289 kTraceTestCategory, "TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST0", 100,
290 1000);
291 break;
292 case TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST1:
293 TRACE_EVENT_COPY_ASYNC_STEP_PAST1(
294 kTraceTestCategory, "TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST1", 100,
295 1000, "arg1", 1);
296 break;
297 case TT_TRACE_EVENT_ASYNC_END0:
298 TRACE_EVENT_ASYNC_BEGIN0(kTraceTestCategory,
299 "TT_TRACE_EVENT_ASYNC_END0", 100);
300 TRACE_EVENT_ASYNC_END0(kTraceTestCategory, "TT_TRACE_EVENT_ASYNC_END0",
301 100);
302 break;
303 case TT_TRACE_EVENT_ASYNC_END1:
304 TRACE_EVENT_ASYNC_BEGIN1(kTraceTestCategory,
305 "TT_TRACE_EVENT_ASYNC_END1", 100, "arg1", 1);
306 TRACE_EVENT_ASYNC_END1(kTraceTestCategory, "TT_TRACE_EVENT_ASYNC_END1",
307 100, "arg1", 1);
308 break;
309 case TT_TRACE_EVENT_ASYNC_END2:
310 TRACE_EVENT_ASYNC_BEGIN2(kTraceTestCategory,
311 "TT_TRACE_EVENT_ASYNC_END2", 100, "arg1", 1,
312 "arg2", 2);
313 TRACE_EVENT_ASYNC_END2(kTraceTestCategory, "TT_TRACE_EVENT_ASYNC_END2",
314 100, "arg1", 1, "arg2", 2);
315 break;
316 case TT_TRACE_EVENT_COPY_ASYNC_END0:
317 TRACE_EVENT_COPY_ASYNC_BEGIN0(kTraceTestCategory,
318 "TT_TRACE_EVENT_COPY_ASYNC_END0", 100);
319 TRACE_EVENT_COPY_ASYNC_END0(kTraceTestCategory,
320 "TT_TRACE_EVENT_COPY_ASYNC_END0", 100);
321 break;
322 case TT_TRACE_EVENT_COPY_ASYNC_END1:
323 TRACE_EVENT_COPY_ASYNC_BEGIN1(kTraceTestCategory,
324 "TT_TRACE_EVENT_COPY_ASYNC_END1", 100,
325 "arg1", 1);
326 TRACE_EVENT_COPY_ASYNC_END1(kTraceTestCategory,
327 "TT_TRACE_EVENT_COPY_ASYNC_END1", 100,
328 "arg1", 1);
329 break;
330 case TT_TRACE_EVENT_COPY_ASYNC_END2:
331 TRACE_EVENT_COPY_ASYNC_BEGIN2(kTraceTestCategory,
332 "TT_TRACE_EVENT_COPY_ASYNC_END2", 100,
333 "arg1", 1, "arg2", 2);
334 TRACE_EVENT_COPY_ASYNC_END2(kTraceTestCategory,
335 "TT_TRACE_EVENT_COPY_ASYNC_END2", 100,
336 "arg1", 1, "arg2", 2);
337 break;
338 }
339
340 // Results in a call to OnEndTracingComplete.
341 CefEndTracing(CefString(), this);
342 }
343
OnEndTracingComplete(const CefString & tracing_file)344 void OnEndTracingComplete(const CefString& tracing_file) override {
345 EXPECT_UI_THREAD();
346
347 CefPostTask(TID_FILE_USER_VISIBLE,
348 base::BindOnce(&TracingTestHandler::ReadTracingFile, this,
349 tracing_file));
350 }
351
ReadTracingFile(const std::string & file_path)352 void ReadTracingFile(const std::string& file_path) {
353 EXPECT_FILE_THREAD();
354
355 EXPECT_TRUE(client::file_util::ReadFileToString(file_path, &trace_data_));
356 EXPECT_TRUE(CefDeleteFile(file_path, false));
357
358 completion_event_->Signal();
359 }
360
361 private:
~TracingTestHandler()362 ~TracingTestHandler() override {}
363
364 // Handle used to notify when the test is complete.
365 CefRefPtr<CefWaitableEvent> completion_event_;
366
367 const char* trace_type_;
368 TracingTestType type_;
369 std::string trace_data_;
370
371 IMPLEMENT_REFCOUNTING(TracingTestHandler);
372 };
373
374 // Helper for defining tracing tests.
375 #define TRACING_TEST(name, test_type) \
376 TEST(TracingTest, name) { \
377 CefRefPtr<TracingTestHandler> handler = \
378 new TracingTestHandler(test_type, #test_type); \
379 handler->ExecuteTest(); \
380 }
381
382 // Define the tests.
TRACING_TEST(TraceEvent0,TT_TRACE_EVENT0)383 TRACING_TEST(TraceEvent0, TT_TRACE_EVENT0)
384 TRACING_TEST(TraceEvent1, TT_TRACE_EVENT1)
385 TRACING_TEST(TraceEvent2, TT_TRACE_EVENT2)
386 TRACING_TEST(TraceEventInstant0, TT_TRACE_EVENT_INSTANT0)
387 TRACING_TEST(TraceEventInstant1, TT_TRACE_EVENT_INSTANT1)
388 TRACING_TEST(TraceEventInstant2, TT_TRACE_EVENT_INSTANT2)
389 TRACING_TEST(TraceEventCopyInstant0, TT_TRACE_EVENT_COPY_INSTANT0)
390 TRACING_TEST(TraceEventCopyInstant1, TT_TRACE_EVENT_COPY_INSTANT1)
391 TRACING_TEST(TraceEventCopyInstant2, TT_TRACE_EVENT_COPY_INSTANT2)
392 TRACING_TEST(TraceEventBegin0, TT_TRACE_EVENT_BEGIN0)
393 TRACING_TEST(TraceEventBegin1, TT_TRACE_EVENT_BEGIN1)
394 TRACING_TEST(TraceEventBegin2, TT_TRACE_EVENT_BEGIN2)
395 TRACING_TEST(TraceEventCopyBegin0, TT_TRACE_EVENT_COPY_BEGIN0)
396 TRACING_TEST(TraceEventCopyBegin1, TT_TRACE_EVENT_COPY_BEGIN1)
397 TRACING_TEST(TraceEventCopyBegin2, TT_TRACE_EVENT_COPY_BEGIN2)
398 TRACING_TEST(TraceEventEnd0, TT_TRACE_EVENT_END0)
399 TRACING_TEST(TraceEventEnd1, TT_TRACE_EVENT_END1)
400 TRACING_TEST(TraceEventEnd2, TT_TRACE_EVENT_END2)
401 TRACING_TEST(TraceEventCopyEnd0, TT_TRACE_EVENT_COPY_END0)
402 TRACING_TEST(TraceEventCopyEnd1, TT_TRACE_EVENT_COPY_END1)
403 TRACING_TEST(TraceEventCopyEnd2, TT_TRACE_EVENT_COPY_END1)
404 TRACING_TEST(TraceCounter1, TT_TRACE_COUNTER1)
405 TRACING_TEST(TraceCopyCounter1, TT_TRACE_COPY_COUNTER1)
406 TRACING_TEST(TraceCounter2, TT_TRACE_COUNTER2)
407 TRACING_TEST(TraceCopyCounter2, TT_TRACE_COPY_COUNTER2)
408 TRACING_TEST(TraceCounterId1, TT_TRACE_COUNTER_ID1)
409 TRACING_TEST(TraceCopyCounterId1, TT_TRACE_COPY_COUNTER_ID1)
410 TRACING_TEST(TraceCounterId2, TT_TRACE_COUNTER_ID2)
411 TRACING_TEST(TraceCopyCounterId2, TT_TRACE_COPY_COUNTER_ID1)
412 TRACING_TEST(TraceEventAsyncBegin0, TT_TRACE_EVENT_ASYNC_BEGIN0)
413 TRACING_TEST(TraceEventAsyncBegin1, TT_TRACE_EVENT_ASYNC_BEGIN1)
414 TRACING_TEST(TraceEventAsyncBegin2, TT_TRACE_EVENT_ASYNC_BEGIN2)
415 TRACING_TEST(TraceEventCopyAsyncBegin0, TT_TRACE_EVENT_COPY_ASYNC_BEGIN0)
416 TRACING_TEST(TraceEventCopyAsyncBegin1, TT_TRACE_EVENT_COPY_ASYNC_BEGIN1)
417 TRACING_TEST(TraceEventCopyAsyncBegin2, TT_TRACE_EVENT_COPY_ASYNC_BEGIN2)
418 TRACING_TEST(TraceEventAsyncStepInto0, TT_TRACE_EVENT_ASYNC_STEP_INTO0)
419 TRACING_TEST(TraceEventAsyncStepInto1, TT_TRACE_EVENT_ASYNC_STEP_INTO1)
420 TRACING_TEST(TraceEventCopyAsyncStepInto0, TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO0)
421 TRACING_TEST(TraceEventCopyAsyncStepInto1, TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO1)
422 TRACING_TEST(TraceEventAsyncStepPast0, TT_TRACE_EVENT_ASYNC_STEP_PAST0)
423 TRACING_TEST(TraceEventAsyncStepPast1, TT_TRACE_EVENT_ASYNC_STEP_PAST1)
424 TRACING_TEST(TraceEventCopyAsyncStepPast0, TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST0)
425 TRACING_TEST(TraceEventCopyAsyncStepPast1, TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST1)
426 TRACING_TEST(TraceEventAsyncEnd0, TT_TRACE_EVENT_ASYNC_END0)
427 TRACING_TEST(TraceEventAsyncEnd1, TT_TRACE_EVENT_ASYNC_END1)
428 TRACING_TEST(TraceEventAsyncEnd2, TT_TRACE_EVENT_ASYNC_END2)
429 TRACING_TEST(TraceEventCopyAsyncEnd0, TT_TRACE_EVENT_COPY_ASYNC_END0)
430 TRACING_TEST(TraceEventCopyAsyncEnd1, TT_TRACE_EVENT_COPY_ASYNC_END1)
431 TRACING_TEST(TraceEventCopyAsyncEnd2, TT_TRACE_EVENT_COPY_ASYNC_END2)
432
433 TEST(TracingTest, NowFromSystemTraceTime) {
434 int64 val = CefNowFromSystemTraceTime();
435 EXPECT_NE(val, 0);
436 }
437