[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mihaip at chromium.org mihaip at chromium.org
Wed Dec 22 16:15:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 66651c12d4694164c1095318036122db7e724e99
Author: mihaip at chromium.org <mihaip at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Nov 20 02:12:00 2010 +0000

    2010-11-19  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Tony Chang.
    
            Rebaseline server: checksum-only differences and prefetching
            https://bugs.webkit.org/show_bug.cgi?id=49841
    
            Add support for image test results where the only difference is in the
            checksum.
    
            Add prefetching of the image results from the next test.
    
            * Scripts/webkitpy/tool/commands/data/rebaselineserver/index.html:
            * Scripts/webkitpy/tool/commands/data/rebaselineserver/main.css:
            * Scripts/webkitpy/tool/commands/data/rebaselineserver/main.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72460 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7e64793..d597cf6 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-19  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Rebaseline server: checksum-only differences and prefetching
+        https://bugs.webkit.org/show_bug.cgi?id=49841
+        
+        Add support for image test results where the only difference is in the
+        checksum.
+        
+        Add prefetching of the image results from the next test.
+        
+        * Scripts/webkitpy/tool/commands/data/rebaselineserver/index.html:
+        * Scripts/webkitpy/tool/commands/data/rebaselineserver/main.css:
+        * Scripts/webkitpy/tool/commands/data/rebaselineserver/main.js:
+
 2010-11-19  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/index.html b/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/index.html
index e333e43..5133ddb 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/index.html
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/index.html
@@ -52,7 +52,7 @@
     <!-- Add a dummy <select> node so that this lines up with the text on the left -->
     <select style="visibility: hidden"></select>
     <span id="toggle-log" class="link">Log</span>
-    <span class="divider">|</span>    
+    <span class="divider">|</span>
     <a href="/quitquitquit">Exit</a>
   </div>
 
@@ -97,7 +97,14 @@
     <tr>
       <td><img id="expected-image"></td>
       <td><img id="actual-image"></td>
-      <td><canvas id="diff-canvas" width="800" height="600"></canvas></td>
+      <td>
+        <canvas id="diff-canvas" width="800" height="600"></canvas>
+        <div id="diff-checksum" style="display: none">
+          <h3>Checksum mismatch</h3>
+          Expected: <span id="expected-checksum"></span><br>
+          Actual: <span id="actual-checksum"></span>
+        </div>
+      </td>
     </tr>
   </tbody>
   <tbody id="text-outputs" style="display: none">
@@ -117,7 +124,7 @@
 
   <!-- Add a dummy <button> node so that this lines up with the text on the left -->
   <button style="visibility: hidden"></button>
-  
+
   <div id="action-buttons">
     <span id="toggle-queue" class="link">Queue</span>
     <button id="add-to-rebaseline-queue">Add to rebaseline queue</button>
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.css b/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.css
index 1ad47ef..81983ab 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.css
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.css
@@ -151,13 +151,18 @@ a, .link {
 }
 
 #image-outputs img,
-#image-outputs canvas {
+#image-outputs canvas,
+#image-outputs #diff-checksum {
   width: 800px;
   height: 600px;
   border: solid 1px #ddd;
   -webkit-user-select: none;
   -webkit-user-drag: none;
-  cursor: crosshair;  
+}
+
+#image-outputs img,
+#image-outputs canvas {
+  cursor: crosshair;
 }
 
 #image-outputs img.loading,
@@ -238,7 +243,7 @@ a, .link {
 
 #loupe td {
   padding: 0;
-  border: solid 1px #ccc;     
+  border: solid 1px #ccc;
 }
 
 #loupe label {
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.js b/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.js
index 4119b0b..c5dcb36 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.js
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/data/rebaselineserver/main.js
@@ -237,6 +237,21 @@ function selectTest()
 
     updateState();
     loupe.hide();
+
+    prefetchNextImageTest();
+}
+
+function prefetchNextImageTest()
+{
+    var testSelector = $('test-selector');
+    if (testSelector.selectedIndex == testSelector.options.length - 1) {
+        return;
+    }
+    var nextTest = testSelector.options[testSelector.selectedIndex + 1].value;
+    if (results.tests[nextTest].actual.indexOf('IMAGE') != -1) {
+        new Image().src = getTestResultUrl(nextTest, 'expected-image');
+        new Image().src = getTestResultUrl(nextTest, 'actual-image');
+    }
 }
 
 function updateState()
@@ -295,6 +310,7 @@ function displayImageResults(testName)
 
     $('diff-canvas').className = 'loading';
     $('diff-canvas').style.display = '';
+    $('diff-checksum').style.display = 'none';
 }
 
 /**
@@ -346,6 +362,7 @@ function updateImageDiff() {
     var diffWidth = diffImageData.width;
     var diff = diffImageData.data;
 
+    var hadDiff = false;
     for (var x = 0; x < expectedWidth; x++) {
         for (var y = 0; y < expectedHeight; y++) {
             var expectedOffset = (y * expectedWidth + x) * 4;
@@ -355,6 +372,7 @@ function updateImageDiff() {
                 expected[expectedOffset + 1] != actual[actualOffset + 1] ||
                 expected[expectedOffset + 2] != actual[actualOffset + 2] ||
                 expected[expectedOffset + 3] != actual[actualOffset + 3]) {
+                hadDiff = true;
                 diff[diffOffset] = 255;
                 diff[diffOffset + 1] = 0;
                 diff[diffOffset + 2] = 0;
@@ -374,19 +392,27 @@ function updateImageDiff() {
         0, 0,
         diffImageData.width, diffImageData.height);
     diffCanvas.className = '';
+
+    if (!hadDiff) {
+        diffCanvas.style.display = 'none';
+        $('diff-checksum').style.display = '';
+        loadTextResult(currentExpectedImageTest, 'expected-checksum');
+        loadTextResult(currentExpectedImageTest, 'actual-checksum');
+    }
 }
 
-function displayTextResults(testName)
+function loadTextResult(testName, mode)
 {
-    function loadTextResult(mode) {
-        loadText(getTestResultUrl(testName, mode), function(text) {
-            $(mode).textContent = text;
-        });
-    }
+    loadText(getTestResultUrl(testName, mode), function(text) {
+        $(mode).textContent = text;
+    });
+}
 
-    loadTextResult('expected-text');
-    loadTextResult('actual-text');
-    loadTextResult('diff-text');
+function displayTextResults(testName)
+{
+    loadTextResult(testName, 'expected-text');
+    loadTextResult(testName, 'actual-text');
+    loadTextResult(testName, 'diff-text');
 }
 
 function nextTest()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list