Add new benchmark tests.
[WebKit-https.git] / PerformanceTests / Animometer / resources / runner / benchmark-runner.js
index b6a82be..a2ac7b2 100644 (file)
@@ -94,6 +94,7 @@ BenchmarkRunner = Utilities.createClass(
         Utilities.extendObject(options, contentWindow.Utilities.parseParameters());
 
         var benchmark = new contentWindow.benchmarkClass(options);
         Utilities.extendObject(options, contentWindow.Utilities.parseParameters());
 
         var benchmark = new contentWindow.benchmarkClass(options);
+        document.body.style.backgroundColor = benchmark.backgroundColor();
         benchmark.run().then(function(results) {
             var suiteResults = self._suitesResults[suite.name] || {};
             suiteResults[test.name] = results;
         benchmark.run().then(function(results) {
             var suiteResults = self._suitesResults[suite.name] || {};
             suiteResults[test.name] = results;
@@ -153,8 +154,10 @@ BenchmarkRunner = Utilities.createClass(
             currentIteration++;
             if (currentIteration < self._client.iterationCount)
                 self.runAllSteps();
             currentIteration++;
             if (currentIteration < self._client.iterationCount)
                 self.runAllSteps();
-            else if (this._client && this._client.didFinishLastIteration)
+            else if (this._client && this._client.didFinishLastIteration) {
+                document.body.style.backgroundColor = "";
                 self._client.didFinishLastIteration();
                 self._client.didFinishLastIteration();
+            }
         }
 
         if (this._client && this._client.willStartFirstIteration)
         }
 
         if (this._client && this._client.willStartFirstIteration)