Home | History | Annotate | Download | only in files
      1 From 0e9cf719da76a6da8dd8b67517198490a9b9b271 Mon Sep 17 00:00:00 2001
      2 From: "Ilja H. Friedel" <ihf (a] chromium.org>
      3 Date: Tue, 27 Oct 2015 21:59:58 -0700
      4 Subject: [PATCH 1/2] Patch index.html
      5 
      6 so it works with autotest graphics_WebGLPerformance.
      7 
      8 BUG=chromium:341333
      9 ---
     10  index.html | 9 ++++++++-
     11  1 file changed, 8 insertions(+), 1 deletion(-)
     12 
     13 diff --git a/index.html b/index.html
     14 index 66b498b..0d0891b 100644
     15 --- a/index.html
     16 +++ b/index.html
     17 @@ -13,6 +13,10 @@
     18    var sumOfResults = 0;
     19    var sumOfLogResults = 0;
     20    var numberOfResults = 0;
     21 +  // These variables are used to communicate with autotest.
     22 +  var test_report = "Tests did not complete.";
     23 +  var time_ms_geom_mean = -1.0;
     24 +  var test_completed = false;
     25    var rawResults = {};
     26    var useiframe = document.location.hash.indexOf("useWindow") == -1;
     27    var testwindow;
     28 @@ -67,7 +71,10 @@
     29      }
     30      t += "</table>";
     31      resultsDiv.innerHTML = t;
     32 -
     33 +    // Fill out copy of results for autotest harness.
     34 +    time_ms_geom_mean = Math.round(100 * Math.exp(sumOfLogResults / numberOfResults)) / 100;
     35 +    test_report = t;
     36 +    test_completed = true;
     37      if (window.SpeedTests) {
     38        // we loaded the speedtest framework, so send the results
     39        var sr = { value: Math.exp(sumOfLogResults / numberOfResults),
     40 -- 
     41 2.1.2
     42 
     43