Revision: adfc27346611
Author:   Janne Härkönen <j...@reaktor.fi>
Date:     Wed Feb 15 02:48:45 2012
Log:      htmlformatter: remove `border` and `style` in favor of `class`
http://code.google.com/p/robotframework/source/detail?r=adfc27346611

Modified:
 /src/robot/utils/htmlformatters.py
 /src/robot/webcontent/common.css
 /src/robot/webcontent/libdoc.css
 /src/robot/webcontent/testdata/data.js
 /utest/utils/test_htmlutils.py

=======================================
--- /src/robot/utils/htmlformatters.py  Thu Dec  8 04:17:48 2011
+++ /src/robot/utils/htmlformatters.py  Wed Feb 15 02:48:45 2012
@@ -33,7 +33,7 @@
         pre = match.group(1)
         url = match.group(3).replace('"', '&quot;')
         if self._format_as_image(url):
- tmpl = '<img src="%s" title="%s" style="border: 1px solid gray">'
+            tmpl = '<img src="%s" title="%s" class="robotdoc">'
         else:
             tmpl = '<a href="%s">%s</a>'
         return pre + tmpl % (url, url)
@@ -155,7 +155,7 @@

     def _format_table(self, rows):
         maxlen = max(len(row) for row in rows)
-        table = ['<table border="1" class="doc">']
+        table = ['<table class="robotdoc">']
         for row in rows:
             row += [''] * (maxlen - len(row))  # fix ragged tables
             table.append('<tr>')
=======================================
--- /src/robot/webcontent/common.css    Tue Dec 20 04:56:22 2011
+++ /src/robot/webcontent/common.css    Wed Feb 15 02:48:45 2012
@@ -154,17 +154,21 @@
     height: 100%;
 }
 /* HTML in users' suite documentation etc. */
-table.doc {
+table.robotdoc {
+    border: 1px solid gray;
     background: transparent;
     border-collapse: collapse;
     empty-cells: show;
     font-size: 0.9em;
 }
-table.doc td {
+table.robotdoc td {
     border: 1px solid gray;
     padding: 0.1em 0.3em;
     height: 1.2em;
 }
+img.robotdoc {
+    border: 1px solid gray;
+}
 hr {
     margin-right: 10em;
 }
=======================================
--- /src/robot/webcontent/libdoc.css    Fri Feb 10 03:49:14 2012
+++ /src/robot/webcontent/libdoc.css    Wed Feb 15 02:48:45 2012
@@ -58,19 +58,22 @@
     width: 300px;
     font-style: italic;
 }
-table.doc {
-    border: 1px solid black;
+table.robotdoc {
+    border: 1px solid gray;
     background: transparent;
     border-collapse: collapse;
     empty-cells: show;
     font-size: 0.85em;
 }
-table.doc td {
-    border: 1px solid black;
+table.robotdoc td {
+    border: 1px solid gray;
     padding: 0.1em 0.3em;
     height: 1.2em;

 }
+img.robotdoc {
+    border: 1px solid gray;
+}
 .footer {
     font-size: 0.9em;
 }
=======================================
--- /src/robot/webcontent/testdata/data.js      Wed Jan  4 15:44:12 2012
+++ /src/robot/webcontent/testdata/data.js      Wed Feb 15 02:48:45 2012
@@ -1,10 +1,10 @@
 window.output = {};
-window.output["suite"] = [1,2,3,4,[5,6,7,8,9,10,11,12],[0,0,140],[[13,14,15,0,[],[1,50,19],[],[[16,0,1,0,[17,18,19],[1,64,5],[[0,20,0,21,22,[1,65,1],[],[[67,2,23]]],[0,24,0,25,26,[1,67,1],[],[[68,2,27]]]]]],[],[1,1,1,1]],[28,29,30,0,[],[1,70,10],[],[[31,0,1,0,[17,18,19],[1,75,4],[[0,32,0,33,34,[1,76,1],[],[[77,2,35]]],[0,24,0,25,36,[1,78,1],[],[[79,2,37]]]]]],[],[1,1,1,1]],[38,39,40,41,[42,43,44,12],[0,81,58,45],[],[[46,0,1,0,[42,47,48,18,19,49],[0,89,6,50],[[1,24,0,25,51,[1,90,1],[],[[91,2,51]]],[0,24,0,25,52,[1,92,1],[],[[93,2,52]]],[2,24,0,25,53,[1,93,1],[],[[94,2,53]]]]],[54,0,1,0,[55,42,48,18,19,49],[0,96,13,56],[[1,24,0,25,51,[1,97,1],[],[[98,2,51]]],[0,24,0,25,57,[1,99,1],[],[[99,2,58]]],[0,24,0,25,59,[1,100,1],[],[[101,2,60]]],[0,61,0,62,59,[0,102,5],[],[[106,4,60]]],[2,24,0,25,53,[1,107,1],[],[[108,2,53]]]]],[63,0,1,0,[42,48,18,19,49,64],[0,110,6,50],[[1,24,0,25,51,[1,111,1],[],[[112,2,51]]],[0,24,0,25,65,[1,113,1],[],[[113,2,65]]],[2,24,0,25,53,[1,114,1],[],[[115,2,53]]]]],[66,0,0,67,[42,48,18,19,68,69,49],[0,117,19,50],[[1,24,0,25,70,[1,118,1],[],[[119,2,70]]],[0,24,0,25,71,[1,119,1],[],[[120,2,71]]],[0,72,0,0,0,[1,121,3],[[0,24,0,25,73,[1,122,1],[],[[123,2,73]]]],[]],[3,74,0,0,0,[1,124,10],[[4,75,0,0,0,[1,125,2],[[0,24,0,25,76,[1,125,2],[],[[126,2,77]]]],[]],[4,78,0,0,0,[1,127,2],[[0,24,0,25,76,[1,128,1],[],[[129,2,79]]]],[]],[4,80,0,0,0,[1,130,2],[[0,24,0,25,76,[1,130,1],[],[[131,2,81]]]],[]],[4,82,0,0,0,[1,132,2],[[0,24,0,25,76,[1,132,1],[],[[133,2,83]]]],[]]],[]],[2,24,0,25,84,[1,135,1],[],[[135,2,84]]]]]],[[1,24,0,25,85,[1,88,1],[],[[88,2,85]]],[2,61,0,62,0,[0,138,1],[],[[138,4,86]]]],[4,0,3,0]]],[],[[1,24,0,25,87,[1,48,1],[],[[49,2,87]]]],[6,2,5,2]]; +window.output["suite"] = [1,2,3,4,[5,6,7,8,9,10,11,12],[0,0,155],[[13,14,15,0,[],[1,57,22],[],[[16,0,1,0,[17,18,19],[1,73,5],[[0,20,0,21,22,[1,75,1],[],[[76,2,23]]],[0,24,0,25,26,[1,77,1],[],[[77,2,27]]]]]],[],[1,1,1,1]],[28,29,30,0,[],[1,80,12],[],[[31,0,1,0,[17,18,19],[1,85,6],[[0,32,0,33,34,[1,87,1],[],[[88,2,35]]],[0,24,0,25,36,[1,89,1],[],[[90,2,37]]]]]],[],[1,1,1,1]],[38,39,40,41,[42,43,44,12],[0,93,60,45],[],[[46,0,1,0,[42,47,48,18,19,49],[0,102,6,50],[[1,24,0,25,51,[1,103,1],[],[[104,2,51]]],[0,24,0,25,52,[1,105,1],[],[[106,2,52]]],[2,24,0,25,53,[1,107,1],[],[[107,2,53]]]]],[54,0,1,0,[55,42,48,18,19,49],[0,109,12,56],[[1,24,0,25,51,[1,111,1],[],[[112,2,51]]],[0,24,0,25,57,[1,113,1],[],[[113,2,58]]],[0,24,0,25,59,[1,114,1],[],[[115,2,60]]],[0,61,0,62,59,[0,116,2],[],[[118,4,60]]],[2,24,0,25,53,[1,119,2],[],[[120,2,53]]]]],[63,0,1,0,[42,48,18,19,49,64],[0,122,6,50],[[1,24,0,25,51,[1,124,1],[],[[124,2,51]]],[0,24,0,25,65,[1,125,1],[],[[126,2,65]]],[2,24,0,25,53,[1,127,1],[],[[128,2,53]]]]],[66,0,0,67,[42,48,18,19,68,69,49],[0,130,20,50],[[1,24,0,25,70,[1,131,1],[],[[132,2,70]]],[0,24,0,25,71,[1,133,1],[],[[134,2,71]]],[0,72,0,0,0,[1,135,2],[[0,24,0,25,73,[1,136,1],[],[[136,2,73]]]],[]],[3,74,0,0,0,[1,138,10],[[4,75,0,0,0,[1,138,3],[[0,24,0,25,76,[1,139,1],[],[[140,2,77]]]],[]],[4,78,0,0,0,[1,141,2],[[0,24,0,25,76,[1,141,1],[],[[142,2,79]]]],[]],[4,80,0,0,0,[1,143,2],[[0,24,0,25,76,[1,144,1],[],[[145,2,81]]]],[]],[4,82,0,0,0,[1,146,2],[[0,24,0,25,76,[1,146,1],[],[[147,2,83]]]],[]]],[]],[2,24,0,25,84,[1,149,1],[],[[149,2,84]]]]]],[[1,24,0,25,85,[1,100,1],[],[[101,2,85]]],[2,61,0,62,0,[0,152,1],[],[[152,4,86]]]],[4,0,3,0]]],[],[[1,24,0,25,87,[1,55,1],[],[[56,2,87]]]],[6,2,5,2]];
 window.output["strings"] = [];
-window.output["strings"] = window.output["strings"].concat(["*","*Dir.Suite","*/home/peke/Devel/robotframework/src/robot/webcontent/testdata/dir.suite","*src/robot/webcontent/testdata/dir.suite","eNqdkEtOxDAMhvecwsoBapVllYY1EmwQHCCvphEprhxLTG8/zQyPCsGGjSXb3//Jsnbm5elh0OgMaAszx2lUs8g6IDI5kontEt+JXzvipMyfK43W3Ohs7heb4u7Luy8vCSr7L6GnELtElErsPC24/vBgoUR38STd+pYUSJYS/xuusrWwIw6RB+jXE1QqOUBiu6n91JmNFutKhCszql6BL7bWUQXyDRFuJRjtzOPWXqRx7z5Hzy18mOIV/8j03+ztr8BEdNAdCbycZc59kYfm","*Escape","*&lt; &amp;lt;","*Formatting","*<b>Bold</b> and <i>italics</i>","*Image","eNqdy8ENgzAMBdBVrAwQiyui7SyQGDdq0h85loDtK1bou7+lNKVh6RHe7n1mTsgSFdAqMaFxZ8MG321tcsA+XKF4yemxfzWQF6/ybx5+3XmDZbGZpn7SQC2Z1NYrPH9nfDiV","*URL","*<a href=\"http://robotframework.org\";>http://robotframework.org</a>","*Test.Suite.1","*/home/peke/Devel/robotframework/src/robot/webcontent/testdata/dir.suite/test.suite.1.txt","*src/robot/webcontent/testdata/dir.suite/test.suite.1.txt","*list test","*collections","*i1","*i2","*${list} = BuiltIn.Create List","*Returns a list containing given items.","*foo, bar, quux","*${list} = [u'foo', u'bar', u'quux']","*BuiltIn.Log","*Logs the given message with the given level.","*${list}","*[u'foo', u'bar', u'quux']","*Test.Suite.2","*/home/peke/Devel/robotframework/src/robot/webcontent/testdata/dir.suite/test.suite.2.txt","*src/robot/webcontent/testdata/dir.suite/test.suite.2.txt","*Dictionary test","*${dict} = Collections.Create Dictionary","*Creates and returns a dictionary from the given `key_value_pairs`.","*key, value","*${dict} = {u'key': u'value'}","*${dict}","*{u'key': u'value'}","*Tests","*/home/peke/Devel/robotframework/src/robot/webcontent/testdata/dir.suite/tests.txt","*src/robot/webcontent/testdata/dir.suite/tests.txt","*Some suite <i>docs</i> with links: <a href=\"http://robotframework.org\";>http://robotframework.org</a>","*< &lt; \u00e4","*&lt; &amp;lt; \u00e4","*home *page*","*Suite teardown failed:\nAssertionError","*Simple","*default with percent %","*force","*with space","*Teardown of the parent suite failed.","*Test Setup","*do nothing","*Test Teardown","*Log HTML","*!\"#%&/()=","*escape < &lt; <b>no bold</b>\n\nAlso teardown of the parent suite failed.","*<blink><b><font face=\"comic sans ms\" size=\"42\" color=\"red\">CAN HAZ HMTL & NO CSS?!?!??!!?</font></b></blink>, HTML","*<blink><b><font face=\"comic sans ms\" size=\"42\" color=\"red\">CAN HAZ HMTL & NO CSS?!?!??!!?</font></b></blink>","*escape < &lt; <b>no bold</b>","*escape &lt; &amp;lt; &lt;b&gt;no bold&lt;/b&gt;","*BuiltIn.Fail","*Fails the test immediately with the given (optional) message.","*Unicode","*with unicode \u5b98\u8bdd","*hyv\u00e4\u00e4 joulua","*Complex","*Test doc","*owner-kekkonen","*t1","*in own setup","*in test","*User Kw","*in User Kw","*${i} IN [ @{list} ]","*${i} = 1","*Got ${i}","*Got 1","*${i} = 2","*Got 2","*${i} = 3","*Got 3","*${i} = 4","*Got 4","*in own teardown","*Suite setup","*AssertionError","*higher level suite setup","*Error in file '/home/peke/Devel/robotframework/src/robot/webcontent/testdata/dir.suite/tests.txt' in table 'Settings': Test library 'p\u00f6lk\u00fc/myLib.py' does not exist."]);
-window.output["generatedTimestamp"] = "20120105 01:39:28 GMT +03:00";
-window.output["errors"] = [[86,5,88]];
+window.output["strings"] = window.output["strings"].concat(["*","*Dir.Suite","*/home/janne/work/robotframework/src/robot/webcontent/testdata/dir.suite","*src/robot/webcontent/testdata/dir.suite","eNqdkM8KwjAMh+8+RekDNOhxdPEs6EX0Adqu64qdGV1BfXu7+W/IvHgJJPl+HyFS43G/LSRoZFKxJtq65E1KXQEQSVOqo2rtheJJUHQcf64kKFxIj5tWOZt9Pvt861gfzVtoqLLCEblghaEWui8PBHK0ttckurPjLPkU7L9hE1Tfl3xkKjI8H9dElEnpYOeWKQ6lQqlxdxveISF3r9FhiE2m8MCfmeWHXc0CNdFENyVgPAjvCuyB/g==","*Escape","*&lt; &amp;lt;","*Formatting","*<b>Bold</b> and <i>italics</i>","*Image","eNqdy9ENgCAMBcBVCAPQfyM6i9ZaieAj0ETHN3EE/+/GVNT1xtEfZnUgYmwSFNAsgVGoUsMK29tS5EY7KUMxy2OhXuqdJcvyN3Neeo/+MxvYTy9tVDPX","*URL","*<a href=\"http://robotframework.org\";>http://robotframework.org</a>","*Test.Suite.1","*/home/janne/work/robotframework/src/robot/webcontent/testdata/dir.suite/test.suite.1.txt","*src/robot/webcontent/testdata/dir.suite/test.suite.1.txt","*list test","*collections","*i1","*i2","*${list} = BuiltIn.Create List","*Returns a list containing given items.","*foo, bar, quux","*${list} = [u'foo', u'bar', u'quux']","*BuiltIn.Log","*Logs the given message with the given level.","*${list}","*[u'foo', u'bar', u'quux']","*Test.Suite.2","*/home/janne/work/robotframework/src/robot/webcontent/testdata/dir.suite/test.suite.2.txt","*src/robot/webcontent/testdata/dir.suite/test.suite.2.txt","*Dictionary test","*${dict} = Collections.Create Dictionary","*Creates and returns a dictionary from the given `key_value_pairs`.","*key, value","*${dict} = {u'key': u'value'}","*${dict}","*{u'key': u'value'}","*Tests","*/home/janne/work/robotframework/src/robot/webcontent/testdata/dir.suite/tests.txt","*src/robot/webcontent/testdata/dir.suite/tests.txt","*Some suite <i>docs</i> with links: <a href=\"http://robotframework.org\";>http://robotframework.org</a>","*< &lt; \u00e4","*&lt; &amp;lt; \u00e4","*home *page*","*Suite teardown failed:\nAssertionError","*Simple","*default with percent %","*force","*with space","*Teardown of the parent suite failed.","*Test Setup","*do nothing","*Test Teardown","*Log HTML","*!\"#%&/()=","*escape < &lt; <b>no bold</b>\n\nAlso teardown of the parent suite failed.","*<blink><b><font face=\"comic sans ms\" size=\"42\" color=\"red\">CAN HAZ HMTL & NO CSS?!?!??!!?</font></b></blink>, HTML","*<blink><b><font face=\"comic sans ms\" size=\"42\" color=\"red\">CAN HAZ HMTL & NO CSS?!?!??!!?</font></b></blink>","*escape < &lt; <b>no bold</b>","*escape &lt; &amp;lt; &lt;b&gt;no bold&lt;/b&gt;","*BuiltIn.Fail","*Fails the test immediately with the given (optional) message.","*Unicode","*with unicode \u5b98\u8bdd","*hyv\u00e4\u00e4 joulua","*Complex","*Test doc","*owner-kekkonen","*t1","*in own setup","*in test","*User Kw","*in User Kw","*${i} IN [ @{list} ]","*${i} = 1","*Got ${i}","*Got 1","*${i} = 2","*Got 2","*${i} = 3","*Got 3","*${i} = 4","*Got 4","*in own teardown","*Suite setup","*AssertionError","*higher level suite setup","*Error in file '/home/janne/work/robotframework/src/robot/webcontent/testdata/dir.suite/tests.txt' in table 'Settings': Test library 'p\u00f6lk\u00fc/myLib.py' does not exist."]);
+window.output["generatedTimestamp"] = "20120215 12:47:10 GMT +03:00";
+window.output["errors"] = [[99,5,88]];
window.output["stats"] = [[{"fail":3,"label":"Critical Tests","pass":2},{"fail":4,"label":"All Tests","pass":2}],[{"fail":4,"info":"critical","label":"i1","links":"Title of i1:http://1/","pass":2},{"fail":4,"info":"critical","label":"i2","links":"Title of i2:http://2/","pass":2},{"fail":1,"info":"non-critical","label":"owner-kekkonen","pass":0},{"combined":"i?","doc":"*Combined* & escaped <&lt; tag doc","fail":4,"info":"combined","label":"IX","links":"Title of iX:http://X/","pass":2},{"combined":"foo & i*","fail":0,"info":"combined","label":"No Match","pass":0},{"fail":1,"label":"!\"#%&/()=","pass":0},{"fail":4,"label":"< &lt; \u00e4","pass":0},{"fail":0,"label":"collections","pass":2},{"fail":1,"label":"default with percent %","pass":0},{"fail":4,"label":"force","links":"<kuukkeli&gt;:http://google.com","pass":0},{"fail":1,"label":"t1","pass":0},{"fail":4,"label":"with space","pass":0},{"fail":1,"label":"with unicode \u5b98\u8bdd","pass":0}],[{"fail":4,"id":"s1","label":"Dir.Suite","name":"Dir.Suite","pass":2},{"fail":0,"id":"s1-s1","label":"Dir.Suite.Test.Suite.1","name":"Test.Suite.1","pass":1},{"fail":0,"id":"s1-s2","label":"Dir.Suite.Test.Suite.2","name":"Test.Suite.2","pass":1},{"fail":4,"id":"s1-s3","label":"Dir.Suite.Tests","name":"Tests","pass":0}]];
-window.output["generatedMillis"] = 28;
-window.output["baseMillis"] = 1325720367972;
+window.output["generatedMillis"] = -332;
+window.output["baseMillis"] = 1329302830332;
window.settings = {"background":{"fail":"DeepPink"},"logURL":"log.html","reportURL":"report.html"};
=======================================
--- /utest/utils/test_htmlutils.py      Thu Dec  8 04:17:48 2011
+++ /utest/utils/test_htmlutils.py      Wed Feb 15 02:48:45 2012
@@ -83,7 +83,7 @@

     def test_image_links(self):
         link = '(<a href="%s">%s</a>)'
-        img = '(<img src="%s" title="%s" style="border: 1px solid gray">)'
+        img = '(<img src="%s" title="%s" class="robotdoc">)'
         for ext in ['jpg', 'jpeg', 'png', 'gif', 'bmp']:
             url = 'foo://bar/zap.%s' % ext
             uprl = url.upper()
@@ -408,7 +408,7 @@


 class TestFormatTable(unittest.TestCase):
-    _table_start = '<table border="1" class="doc">'
+    _table_start = '<table class="robotdoc">'

     def test_one_row_table(self):
         inp = [['1','2','3']]

Reply via email to