| From ea268329149aea6e21c2c0a571eafa0abd7ab9ea Mon Sep 17 00:00:00 2001 |
| From: "Ilja H. Friedel" <ihf@chromium.org> |
| Date: Wed, 5 Feb 2014 22:05:22 -0800 |
| Subject: [PATCH] Patch webgl-performance-tests.html |
| |
| so it works with autotest graphics_WebGLPerformance. |
| |
| BUG=chromium:341333 |
| --- |
| webgl-performance-tests.html | 18 +++++++++++++----- |
| 1 file changed, 13 insertions(+), 5 deletions(-) |
| |
| diff --git a/webgl-performance-tests.html b/webgl-performance-tests.html |
| index a3533e7..026490e 100644 |
| --- a/webgl-performance-tests.html |
| +++ b/webgl-performance-tests.html |
| @@ -2,6 +2,7 @@ |
| <head> |
| <meta charset="utf-8"> |
| </head> |
| + |
| <script> |
| var testPageURLs = []; |
| var testsRun = []; |
| @@ -11,7 +12,10 @@ |
| var sumOfResults = 0; |
| var sumOfLogResults = 0; |
| var numberOfResults = 0; |
| - |
| + // These variables are used to communicate with autotests. |
| + var test_report = "Tests did not complete."; |
| + var time_ms_geom_mean = -1.0; |
| + var test_completed = false; |
| |
| function startCurrentTestPage() { |
| if (currentPageIndex < testPageURLs.length) { |
| @@ -22,7 +26,7 @@ |
| testframe.src = testPageURLs[currentPageIndex]; |
| } else { |
| testframe.parentNode.removeChild(testframe); |
| - var t = "<b>WebGL Performance Regression Test Results</b><br/><br/>" + |
| + var msg = "<b>WebGL Performance Regression Test Results</b><br/><br/>" + |
| "Keep in mind that these tests are not realistic workloads. These are not " + |
| "benchmarks aiming to compare browser or GPU performance. These are only useful " + |
| "to catch performance regressions in a given browser and system.<br/><br/>" + |
| @@ -41,10 +45,14 @@ |
| result = "<font color='blue'>Skipped</font>"; |
| else |
| result = testsRun[i].testResult + " ms"; |
| - t += "<tr style='background-color:" + color + "'><td><a href='" + testPageURLs[i] + "'>" + testPageURLs[i] + "</a></td><td>" + result + "</td><td><i>" + testsRun[i].testDescription + "</i></td></tr>"; |
| + msg += "<tr style='background-color:" + color + "'><td><a href='" + testPageURLs[i] + "'>" + testPageURLs[i] + "</a></td><td>" + result + "</td><td><i>" + testsRun[i].testDescription + "</i></td></tr>"; |
| } |
| - t += "</table>"; |
| - resultsDiv.innerHTML = t; |
| + msg += "</table>"; |
| + resultsDiv.innerHTML = msg; |
| + // Fill out copy of results for autotest harness. |
| + time_ms_geom_mean = Math.round(100 * Math.exp(sumOfLogResults / numberOfResults)) / 100; |
| + test_report = msg; |
| + test_completed = true; |
| } |
| } |
| |
| -- |
| 1.9.0.rc1.175.g0b1dcb5 |
| |