summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui/v8_benchmark_uitest.js
diff options
context:
space:
mode:
authorpatrick@chromium.org <patrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-30 23:28:32 +0000
committerpatrick@chromium.org <patrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-30 23:28:32 +0000
commit70e0acd2223d7a2f36aa0552112ed7f80ca32b87 (patch)
tree9cd51e69703410c5ed905fd7af4f825692cde3d3 /chrome/test/ui/v8_benchmark_uitest.js
parent2da8d317072968241f986ffed0be477900831889 (diff)
downloadchromium_src-70e0acd2223d7a2f36aa0552112ed7f80ca32b87.zip
chromium_src-70e0acd2223d7a2f36aa0552112ed7f80ca32b87.tar.gz
chromium_src-70e0acd2223d7a2f36aa0552112ed7f80ca32b87.tar.bz2
- Add UI test for the V8 Benchmark Suite.
- Modify the V8 Benchmark Suite to work with the UI test framework. - Add utils for JavaScript UI tests. - Move automation.js files for SunSpider and V8 Benchmark to the src/chrome/test/ui directory. - Overload UITest::PrintResult for convenience. BUG=9255 Review URL: http://codereview.chromium.org/42628 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/v8_benchmark_uitest.js')
-rw-r--r--chrome/test/ui/v8_benchmark_uitest.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/test/ui/v8_benchmark_uitest.js b/chrome/test/ui/v8_benchmark_uitest.js
new file mode 100644
index 0000000..9950c5a
--- /dev/null
+++ b/chrome/test/ui/v8_benchmark_uitest.js
@@ -0,0 +1,34 @@
+/*
+ Copyright (c) 2009 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+*/
+
+// Automation utilities for running the V8 Benchmark as a UI test.
+
+function Automation() {
+ this.score = '';
+ this.results = {};
+}
+
+Automation.prototype.SetDone = function() {
+ document.cookie = '__done=1; path=/';
+}
+
+Automation.prototype.SetScore = function (score) {
+ this.score = score;
+}
+
+Automation.prototype.GetScore = function() {
+ return this.score;
+}
+
+Automation.prototype.AddResult = function(name, result) {
+ this.results[name] = result;
+}
+
+Automation.prototype.GetResults = function() {
+ return this.results;
+}
+
+automation = new Automation();