| Index: chrome/browser/resources/tracing/test_utils.js
|
| diff --git a/chrome/browser/resources/tracing/test_utils.js b/chrome/browser/resources/tracing/test_utils.js
|
| index a8800f1238ec5de3bf8fe96f14c62e8285036ce5..30dd5e6556e4b8da7bc2ddcd61e0fa6f122bc6f9 100644
|
| --- a/chrome/browser/resources/tracing/test_utils.js
|
| +++ b/chrome/browser/resources/tracing/test_utils.js
|
| @@ -38,7 +38,27 @@ cr.define('test_utils', function() {
|
| };
|
| req.send(null);
|
| }
|
| +
|
| + function newAsyncSlice(start, duration, startThread, endThread) {
|
| + return newAsyncSliceNamed('a', start, duration, startThread, endThread);
|
| + }
|
| +
|
| + function newAsyncSliceNamed(name, start, duration, startThread, endThread) {
|
| + var s = new tracing.TimelineAsyncSlice(name, 0, start);
|
| + s.duration = duration;
|
| + s.startThread = startThread;
|
| + s.endThread = endThread;
|
| + var subSlice = new tracing.TimelineAsyncSlice(name, 0, start);
|
| + subSlice.duration = duration;
|
| + subSlice.startThread = startThread;
|
| + subSlice.endThread = endThread;
|
| + s.subSlices = [subSlice];
|
| + return s;
|
| + }
|
| +
|
| return {
|
| - getAsync: getAsync
|
| + getAsync: getAsync,
|
| + newAsyncSlice: newAsyncSlice,
|
| + newAsyncSliceNamed: newAsyncSliceNamed
|
| };
|
| });
|
|
|