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

Side by Side Diff: chrome/browser/resources/tracing/test_utils.js

Issue 10161025: Allow about:tracing Counters to be selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixen. 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 | Annotate | Revision Log
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 s.startThread = startThread; 49 s.startThread = startThread;
50 s.endThread = endThread; 50 s.endThread = endThread;
51 var subSlice = new tracing.TimelineAsyncSlice(name, 0, start); 51 var subSlice = new tracing.TimelineAsyncSlice(name, 0, start);
52 subSlice.duration = duration; 52 subSlice.duration = duration;
53 subSlice.startThread = startThread; 53 subSlice.startThread = startThread;
54 subSlice.endThread = endThread; 54 subSlice.endThread = endThread;
55 s.subSlices = [subSlice]; 55 s.subSlices = [subSlice];
56 return s; 56 return s;
57 } 57 }
58 58
59 function assertArrayishEquals(ref, val) {
60 assertEquals(ref.length, val.length);
61 for (var i = 0; i < ref.length; i++)
62 assertEquals(ref[i], val[i]);
63 }
64
65
59 return { 66 return {
60 getAsync: getAsync, 67 getAsync: getAsync,
61 newAsyncSlice: newAsyncSlice, 68 newAsyncSlice: newAsyncSlice,
62 newAsyncSliceNamed: newAsyncSliceNamed 69 newAsyncSliceNamed: newAsyncSliceNamed,
70 assertArrayishEquals: assertArrayishEquals
63 }; 71 };
64 }); 72 });
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