Bug 647080 - Give the reftest analyzer the ability to load a log from the hash. r=dbaron
authorCameron McCormack <cam@mcc.id.au>
Sat, 30 Apr 2011 17:33:15 +1200
changeset 68806 aee45fbc65dc395bbf043da41bae5a9c8ddfc2fa
parent 68805 c7da6b9d83d2b118516241c90f3825e99cf9a84b
child 68807 7162a399c3345cc9b7554d7c18347386586d31b3
push id19756
push usercmccormack@mozilla.com
push dateSat, 30 Apr 2011 05:36:21 +0000
treeherdermozilla-central@7162a399c334 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs647080
milestone6.0a1
first release with
nightly win64
aee45fbc65dc / 6.0a1 / 20110430030220 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
Bug 647080 - Give the reftest analyzer the ability to load a log from the hash. r=dbaron
layout/tools/reftest/reftest-analyzer.xhtml
--- a/layout/tools/reftest/reftest-analyzer.xhtml
+++ b/layout/tools/reftest/reftest-analyzer.xhtml
@@ -112,19 +112,34 @@ var gImage2Data;           // ImageData 
 var gFlashingPixels = [];  // array of <path> objects that should be flashed due to pixel color mismatch
 
 function ID(id) {
   if (!(id in gIDCache))
     gIDCache[id] = document.getElementById(id);
   return gIDCache[id];
 }
 
+function hash_parameters() {
+  var result = { };
+  var params = window.location.hash.substr(1).split(/[&;]/);
+  for (var i = 0; i < params.length; i++) {
+    var parts = params[i].split("=");
+    result[parts[0]] = unescape(unescape(parts[1]));
+  }
+  return result;
+}
+
 function load() {
   gPhases = [ ID("entry"), ID("loading"), ID("viewer") ];
   build_mag();
+  var params = hash_parameters();
+  if (params.log) {
+    ID("logentry").value = params.log;
+    log_pasted();
+  }
 }
 
 function build_mag() {
   var mag = ID("mag");
 
   var r = document.createElementNS(SVG_NS, "rect");
   r.setAttribute("x", gMagZoom * -gMagWidth / 2);
   r.setAttribute("y", gMagZoom * -gMagHeight / 2);