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

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 13:56:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 8439d21377d7d44dc5221bc8650e6f979edc6357
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 30 04:14:42 2010 +0000

    2010-09-29  Simon Fraser  <simon.fraser at apple.com>
    
            Add a warning when a test requires special steps.
            Add a Print Preview button for 'paged' tests that
            brings up the print dialog, allowing the user to
            judge paged media tests.
    
            * CSSTestSuiteHarness/harness/harness.css:
            * CSSTestSuiteHarness/harness/harness.html:
            * CSSTestSuiteHarness/harness/harness.js:
            (TestSuite.prototype.loadTest):
            (TestSuite.prototype.processFlags):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68748 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/CSSTestSuiteHarness/harness/harness.css b/WebKitTools/CSSTestSuiteHarness/harness/harness.css
index 8c0e7d1..c6571e4 100644
--- a/WebKitTools/CSSTestSuiteHarness/harness/harness.css
+++ b/WebKitTools/CSSTestSuiteHarness/harness/harness.css
@@ -64,7 +64,9 @@ body {
 }
 
 .note {
+  display: inline-block;
   font-size: 10px;
+  margin-left: 5px;
   color: gray;
 }
 .action-buttons {
@@ -96,6 +98,28 @@ body {
   font-size: smaller;
 }
 
+#warning {
+  padding-left: 1em;
+  color: red;
+  display: none;
+}
+
+#print-button {
+  float: right;
+  display: none;
+}
+
+#test-content.print {
+}
+
+#test-content.print #print-button {
+  display: inline;
+}
+
+#test-content.warn #warning {
+  display: inline;
+}
+
 #test-content iframe {
   border: 1px solid gray;
   margin: 2px;
diff --git a/WebKitTools/CSSTestSuiteHarness/harness/harness.html b/WebKitTools/CSSTestSuiteHarness/harness/harness.html
index 6bd47e5..24f256e 100644
--- a/WebKitTools/CSSTestSuiteHarness/harness/harness.html
+++ b/WebKitTools/CSSTestSuiteHarness/harness/harness.html
@@ -92,6 +92,12 @@
     {
       gTestSuite.exportResults(document.getElementById('results-popup').selectedIndex);
     }
+    
+    function printTestIframe()
+    {
+      var testFrame = document.getElementById('test-frame');
+      testFrame.contentWindow.print();
+    }
 
     /*
     This conflicts badly with key handling in selects.
@@ -153,12 +159,12 @@
   
   <div class="actions">
     <span>Skip reason:</span> <input type="text" id="skip-reason" size="50">
-    <button onclick="skipTest()" accesskey="s">Skip</button>
-    <span class="note">Use <i>Control-Option-letter</i> to trigger buttons via the keyboard.</span>
+    <button onclick="skipTest()" accesskey="s"><strong>S</strong>kip</button>
+    <div class="note">Use <i>Control-Option-letter</i> to<br> trigger buttons via the keyboard.</div>
     <div class="action-buttons">
       <button onclick="invalidTest()" accesskey="i">Invalid</button>
-      <button onclick="failTest()" accesskey="f">Fail</button>
-      <button onclick="passTest()" accesskey="p">Pass</button>
+      <button onclick="failTest()" accesskey="f"><strong>F</strong>ail</button>
+      <button onclick="passTest()" accesskey="p"><strong>P</strong>ass</button>
     </div>
   </div>
   <div id="test-content">
@@ -166,7 +172,10 @@
       <div class="title">Title: <span id="test-title"></span></div>
       <div class="url">URL: <span id="test-url"></span></div>
       <div class="assertion">Assertion: <span id="test-assertion"></span></div>
-      <div class="flags">Flags: <span id="test-flags"></span></div>
+      <div class="flags">Flags: <span id="test-flags"></span>
+        <span id="warning">This test must be run over HTTP.</span>
+        <button id="print-button" onclick="printTestIframe()">Print Preview</button>
+      </div>
     </div>
     
     <div id="test-wrapper" class="frame-wrapper">
diff --git a/WebKitTools/CSSTestSuiteHarness/harness/harness.js b/WebKitTools/CSSTestSuiteHarness/harness/harness.js
index 12f24a1..70b27d9 100644
--- a/WebKitTools/CSSTestSuiteHarness/harness/harness.js
+++ b/WebKitTools/CSSTestSuiteHarness/harness/harness.js
@@ -582,6 +582,42 @@ TestSuite.prototype.loadTest = function(test)
   document.getElementById('test-url').innerText = this.pathForTest(test.id);
   document.getElementById('test-assertion').innerText = test.assertion;
   document.getElementById('test-flags').innerText = test.flags;
+  
+  this.processFlags(test);
+}
+
+TestSuite.prototype.processFlags = function(test)
+{ 
+  var isPaged = test.flags.indexOf('paged') != -1;
+  if (isPaged)
+    $('#test-content').addClass('print');
+  else
+    $('#test-content').removeClass('print');
+
+  var showWarning = false;
+  var warning = '';
+  if (test.flags.indexOf('font') != -1)
+    warning = 'Requires a specific font to be installed.';
+  
+  if (test.flags.indexOf('http') != -1) {
+    if (warning != '')
+      warning += ' ';
+    warning += 'Must be tested over HTTP, with custom HTTP headers.';
+  }
+  
+  if (isPaged) {
+    if (warning != '')
+      warning += ' ';
+    warning += 'Test via the browser\'s Print Preview.';
+  }
+
+  document.getElementById('warning').innerText = warning;
+
+  if (warning.length > 0)
+    $('#test-content').addClass('warn');
+  else
+    $('#test-content').removeClass('warn');
+
 }
 
 TestSuite.prototype.clearTest = function()
@@ -593,6 +629,10 @@ TestSuite.prototype.clearTest = function()
   document.getElementById('test-url').innerText = '';
   document.getElementById('test-assertion').innerText = '';
   document.getElementById('test-flags').innerText = '';
+
+  $('#test-content').removeClass('print');
+  $('#test-content').removeClass('warn');
+  document.getElementById('warning').innerText = '';
 }
 
 TestSuite.prototype.loadRef = function(test)
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 6823524..aa73133 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-29  Simon Fraser  <simon.fraser at apple.com>
+
+        Add a warning when a test requires special steps.
+        Add a Print Preview button for 'paged' tests that
+        brings up the print dialog, allowing the user to 
+        judge paged media tests.
+
+        * CSSTestSuiteHarness/harness/harness.css:
+        * CSSTestSuiteHarness/harness/harness.html:
+        * CSSTestSuiteHarness/harness/harness.js:
+        (TestSuite.prototype.loadTest):
+        (TestSuite.prototype.processFlags):
+
 2010-09-29  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list