Make hitting "Enter" submit the add/change profile dialog.
[chromium-blink-merge.git] / chrome / test / perf / v8_benchmark_uitest.js
blob4f7cbf924c63ea2c8014ec9492409b146f5b60fd
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 */
7 // Automation utilities for running the V8 Benchmark as a UI test.
9 function Automation() {
10 this.score = '';
11 this.results = {};
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]);
20 document.cookie = '__done=1; path=/';
23 Automation.prototype.SetScore = function (score) {
24 this.score = score;
27 Automation.prototype.GetScore = function() {
28 return this.score;
31 Automation.prototype.AddResult = function(name, result) {
32 this.results[name] = result;
35 Automation.prototype.GetResults = function() {
36 return this.results;
39 automation = new Automation();