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

Unified Diff: chrome/browser/resources/tracing/test_utils.js

Issue 10170001: Find feature for tracing, at long last. (Closed) Base URL: git://localhost/home/nduca/Local/chrome/src@master
Patch Set: patch for landing Created 8 years, 8 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
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
};
});
« no previous file with comments | « chrome/browser/resources/tracing/profiling_view_test.html ('k') | chrome/browser/resources/tracing/tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698