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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Helper functions for use in tracing tests. 6 * @fileoverview Helper functions for use in tracing tests.
7 */ 7 */
8 8
9 9
10 /** 10 /**
(...skipping 20 matching lines...) Expand all
31 if (req.status == 200) { 31 if (req.status == 200) {
32 cb(req.responseText); 32 cb(req.responseText);
33 } else { 33 } else {
34 console.log('Failed to load ' + url); 34 console.log('Failed to load ' + url);
35 } 35 }
36 }, 0); 36 }, 0);
37 } 37 }
38 }; 38 };
39 req.send(null); 39 req.send(null);
40 } 40 }
41
42 function newAsyncSlice(start, duration, startThread, endThread) {
43 return newAsyncSliceNamed('a', start, duration, startThread, endThread);
44 }
45
46 function newAsyncSliceNamed(name, start, duration, startThread, endThread) {
47 var s = new tracing.TimelineAsyncSlice(name, 0, start);
48 s.duration = duration;
49 s.startThread = startThread;
50 s.endThread = endThread;
51 var subSlice = new tracing.TimelineAsyncSlice(name, 0, start);
52 subSlice.duration = duration;
53 subSlice.startThread = startThread;
54 subSlice.endThread = endThread;
55 s.subSlices = [subSlice];
56 return s;
57 }
58
41 return { 59 return {
42 getAsync: getAsync 60 getAsync: getAsync,
61 newAsyncSlice: newAsyncSlice,
62 newAsyncSliceNamed: newAsyncSliceNamed
43 }; 63 };
44 }); 64 });
OLDNEW
« 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