OLD | NEW |
1 /* | 1 /* |
2 Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 // Automation utilities for running SunSpider as a UI test. | 7 // Automation utilities for running SunSpider as a UI test. |
8 | 8 |
9 function Automation() { | 9 function Automation() { |
10 } | 10 } |
11 | 11 |
12 Automation.prototype.SetDone = function() { | 12 Automation.prototype.SetDone = function() { |
13 document.cookie = '__done=1; path=/'; | 13 document.cookie = '__done=1; path=/'; |
14 } | 14 } |
15 | 15 |
16 Automation.prototype.GetTotal = function() { | 16 Automation.prototype.GetTotal = function() { |
17 // Calculated in sunspider-analyze-results.js. | 17 // Calculated in sunspider-analyze-results.js. |
18 return mean + ',' + stdDev; | 18 return mean + ',' + stdDev; |
19 } | 19 } |
20 | 20 |
21 Automation.prototype.GetResults = function() { | 21 Automation.prototype.GetResults = function() { |
22 var results = {}; | 22 var results = {}; |
23 | 23 |
24 var input = eval("(" + decodeURI(location.search.substring(1)) + ")"); | 24 var input = eval("(" + decodeURI(location.search.substring(1)) + ")"); |
25 for (test in input) | 25 for (test in input) |
26 results[test] = input[test].toString(); | 26 results[test] = input[test].toString(); |
27 | 27 |
28 return results; | 28 return results; |
29 } | 29 } |
30 | 30 |
31 automation = new Automation(); | 31 automation = new Automation(); |
OLD | NEW |