OLD | NEW |
| (Empty) |
1 /* | |
2 Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
3 Use of this source code is governed by a BSD-style license that can be | |
4 found in the LICENSE file. | |
5 */ | |
6 | |
7 // Automation utilities for running the V8 Benchmark as a UI test. | |
8 | |
9 function Automation() { | |
10 this.score = ''; | |
11 this.results = {}; | |
12 } | |
13 | |
14 Automation.prototype.SetDone = function() { | |
15 console.log("score: " + this.GetScore()); | |
16 for (var result in this.results) { | |
17 if (this.results.hasOwnProperty(result)) | |
18 console.log(result + ": " + this.results[result]); | |
19 } | |
20 document.cookie = '__done=1; path=/'; | |
21 }; | |
22 | |
23 Automation.prototype.SetScore = function (score) { | |
24 this.score = score; | |
25 }; | |
26 | |
27 Automation.prototype.GetScore = function() { | |
28 return this.score; | |
29 }; | |
30 | |
31 Automation.prototype.AddResult = function(name, result) { | |
32 this.results[name] = result; | |
33 }; | |
34 | |
35 Automation.prototype.GetResults = function() { | |
36 return this.results; | |
37 }; | |
38 | |
39 automation = new Automation(); | |
OLD | NEW |