Split benchmark into two different pages
[WebKit-https.git] / PerformanceTests / Animometer / resources / runner / tests.js
1 var Headers = {
2     testName: [{ title: Strings.text.testName }],
3     score: [{ title: Strings.text.score, text: Strings.json.score }]
4 };
5
6 var Suite = function(name, tests) {
7     this.name = name;
8     this.tests = tests;
9 };
10 Suite.prototype.prepare = function(runner, contentWindow, contentDocument)
11 {
12     return runner.waitForElement("#stage").then(function (element) {
13         return element;
14     });
15 };
16 Suite.prototype.run = function(contentWindow, test, options, progressBar)
17 {
18     return contentWindow.runBenchmark(this, test, options, progressBar);
19 };
20
21 var Suites = [];
22
23 Suites.push(new Suite("Animometer",
24     [
25     ]
26 ));
27
28 function suiteFromName(name)
29 {
30     return Suites.find(function(suite) { return suite.name == name; });
31 }
32
33 function testFromName(suite, name)
34 {
35     return suite.tests.find(function(test) { return test.name == name; });
36 }