Simplify the test harness
[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
11 var Suites = [];
12
13 Suites.push(new Suite("Animometer",
14     [
15         {
16             url: "master/canvas-stage.html?pathType=arcs",
17             name: "Canvas arcs"
18         },
19         {
20             url: "master/canvas-stage.html?pathType=linePath&lineJoin=round&lineCap=round",
21             name: "Canvas line path, round join"
22         },
23         {
24             url: "master/canvas-stage.html?pathType=line&lineCap=square",
25             name: "Canvas line segments"
26         },
27     ]
28 ));
29
30 function suiteFromName(name)
31 {
32     return Suites.find(function(suite) { return suite.name == name; });
33 }
34
35 function testFromName(suite, name)
36 {
37     return suite.tests.find(function(test) { return test.name == name; });
38 }