1 function TemplateCssStage(element, options)
3 Stage.call(this, element, options);
6 TemplateCssStage.prototype = Object.create(Stage.prototype);
7 TemplateCssStage.prototype.constructor = TemplateCssStage;
9 TemplateCssStage.prototype.tune = function(count)
11 // If count is -ve, -count elements need to be removed form the
12 // stage. If count is +ve, +count elements need to be added to
15 // Change objects in the stage.
17 // Return the number of all the elements in the stage.
18 // This number is recorded in the sampled data.
20 // Return the count of the objects in the stage.
24 TemplateCssStage.prototype.animate = function(timeDelta)
26 // Animate the elements such that all of them are redrawn. You
27 // may need to define your object so it keeps its animation data.
28 // This object should encapsulate a corrosponding HTMLElement.
29 // You may also define a method called animate() in this object
30 // and just call this function here for all the elements.
32 // Loop through all your objects and ask them to animate.
35 function TemplateCssBenchmark(suite, test, options, recordTable, progressBar)
37 StageBenchmark.call(this, suite, test, options, recordTable, progressBar);
40 TemplateCssBenchmark.prototype = Object.create(StageBenchmark.prototype);
41 TemplateCssBenchmark.prototype.constructor = TemplateCssBenchmark;
43 TemplateCssBenchmark.prototype.createStage = function(element)
45 // You need to override this method such that your stage is hooked
46 // up to the benchmark.
47 return new TemplateCssStage(element, this._options);
50 window.benchmarkClient.create = function(suite, test, options, recordTable, progressBar)
52 // This function is called from the test harness which starts the
53 // test by creating your benchmark object.
54 return new TemplateCssBenchmark(suite, test, options, recordTable, progressBar);