Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 (function() { | 5 (function() { |
| 6 window.testRunner = {}; | 6 window.testRunner = {}; |
| 7 window.testRunner.isDone = false; | 7 window.testRunner.isDone = false; |
| 8 | 8 |
| 9 testRunner.waitUntilDone = function() {}; | 9 testRunner.waitUntilDone = function() {}; |
| 10 testRunner.dumpAsText = function() {}; | 10 testRunner.dumpAsText = function() {}; |
| 11 testRunner.notifyDone = function() { | 11 testRunner.notifyDone = function() { |
| 12 this.isDone = true; | 12 this.isDone = true; |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 testRunner.supportTracing = true; | |
| 16 | |
| 17 // If this is true, blink_perf tests is put on paused waiting for tracing to | |
| 18 // be started. |scheduleTestRun| should be invoked after tracing is started | |
| 19 // to continue blink perf test. | |
| 20 testRunner.isWaitingForTracingStart = false; | |
| 21 | |
| 22 testRunner.traceEventsToMeasure = undefined; | |
| 23 | |
| 24 testRunner.startTracing = function(tracingCategories, scheduleTestRun) { | |
|
Xianzhu
2017/04/21 01:31:51
Why traceEventsToMeasure is set as a variable whil
nednguyen
2017/04/24 20:55:21
I want to keep startTracing to be focused on setti
Xianzhu
2017/04/24 21:03:07
SGTM.
nednguyen
2017/04/24 22:31:41
Done.
| |
| 25 this.tracingCategories = tracingCategories; | |
| 26 this.scheduleTestRun = scheduleTestRun; | |
| 27 this.isWaitingForTracingStart = true; | |
| 28 } | |
| 29 | |
| 30 testRunner.stopTracing = function() { | |
| 31 } | |
| 32 | |
| 15 window.GCController = {}; | 33 window.GCController = {}; |
| 16 | 34 |
| 17 GCController.collect = function() { | 35 GCController.collect = function() { |
| 18 gc(); | 36 gc(); |
| 19 }; | 37 }; |
| 20 GCController.collectAll = function() { | 38 GCController.collectAll = function() { |
| 21 for (var i = 0; i < 7; ++i) | 39 for (var i = 0; i < 7; ++i) |
| 22 gc(); | 40 gc(); |
| 23 }; | 41 }; |
| 24 })(); | 42 })(); |
| OLD | NEW |