lhopps / grit-i18n

Automatically exported from code.google.com/p/grit-i18n
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

chrome_html_unittests failing on Windows #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
======================================================================
FAIL: Tests removing an unsupported scale factor from an explicit image-set.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "S:\src\grit-i18n\grit\gather\chrome_html_unittest.py", line 345, in testRemoveUnsupportedScale
    '''))
AssertionError: "\n      <!DOCTYPE HTML>\n      <html>\n        <head>\n        
  <style>\n      .image {\n        background: -webk
it-image-set(url('data:image/png;base64,UE5HIERBVEE=') 1x,\n                    
                  url('data:image/png;base64,MS40eCB
QTkcgREFUQQ==') 1.4x,\n                                      
url('data:image/png;base64,MS44eCBQTkcgREFUQQ==') 1.8x);\n      }\n
  </style>\n        </head>\n        <body>\n          <!-- Don't need a body. -->\n        </body>\n      </html>\n      " != "\n
    <!DOCTYPE HTML>\n      <html>\n        <head>\n          <style>\n      .image {\n        background: -webkit-image-set(url('dat
a:image/png;base64,UE5HIERBVEE=') 1x,\n                                      
url('data:image/png;base64,MS44eCBQTkcgREFUQQ==') 1.8x)
;\n      }\n      </style>\n        </head>\n        <body>\n          <!-- 
Don't need a body. -->\n        </body>\n      </html>\n
      "

Original issue reported on code.google.com by joi@chromium.org on 10 Apr 2013 at 11:18

GoogleCodeExporter commented 9 years ago
In case it matters: This is with Python 2.6.2

Original comment by joi@chromium.org on 10 Apr 2013 at 11:19

GoogleCodeExporter commented 9 years ago

Original comment by flackr@chromium.org on 16 May 2013 at 2:25

GoogleCodeExporter commented 9 years ago
Looks like the _CSS_IMAGE_SETS regular expression is failing to match the image 
set in the unit test on Windows, but works on Linux...

Regular expression:
https://code.google.com/p/chromium/codesearch#chromium/src/tools/grit/grit/gathe
r/chrome_html.py&q=_CSS_IMAGE_SETS&sq=package:chromium&l=38

Fails to match:
https://code.google.com/p/chromium/codesearch#chromium/src/tools/grit/grit/gathe
r/chrome_html_unittest.py&sq=package:chromium&l=312

Original comment by flackr@chromium.org on 16 May 2013 at 3:31

GoogleCodeExporter commented 9 years ago
Looks like it was just a difference in newline:
https://codereview.chromium.org/15132011/

Original comment by flackr@chromium.org on 16 May 2013 at 3:55

GoogleCodeExporter commented 9 years ago
Fixed with https://code.google.com/p/grit-i18n/source/detail?r=122

Original comment by flackr@chromium.org on 16 May 2013 at 5:28