|
Lines 235-249
class MockChromiumDRTTest(MockDRTTest):
a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py_sec1
|
| 235 |
'#EOF\n'] |
235 |
'#EOF\n'] |
| 236 |
|
236 |
|
| 237 |
def test_pixeltest__fails(self): |
237 |
def test_pixeltest__fails(self): |
|
|
238 |
# We need to mess with LAYOUT_TEST_DIR here because path.abspath_to_uri() |
| 239 |
# isn't aware of MockFileSystems and will treat the path as a windows |
| 240 |
# path name (which should contain a drive letter). |
| 241 |
# We don't change LAYOUT_TEST_DIR everywhere when running on Windows |
| 242 |
# because we'd have to update lots of tests. |
| 243 |
orig_dir = test.LAYOUT_TEST_DIR |
| 244 |
if sys.platform == 'win32': |
| 245 |
test.LAYOUT_TEST_DIR = 'c:/test.checkout/LayoutTests' |
| 246 |
url = '#URL:file:///c:/test.checkout/LayoutTests/failures/expected/checksum.html' |
| 247 |
else: |
| 248 |
url = '#URL:file:///test.checkout/LayoutTests/failures/expected/checksum.html' |
| 238 |
host = MockHost() |
249 |
host = MockHost() |
| 239 |
self.assertTest('failures/expected/checksum.html', pixel_tests=True, |
250 |
try: |
| 240 |
expected_checksum='wrong-checksum', |
251 |
self.assertTest('failures/expected/checksum.html', pixel_tests=True, |
| 241 |
drt_output=['#URL:file:///test.checkout/LayoutTests/failures/expected/checksum.html\n', |
252 |
expected_checksum='wrong-checksum', |
| 242 |
'#MD5:checksum-checksum\n', |
253 |
|
| 243 |
'checksum-txt', |
254 |
drt_output=[url + '\n', |
| 244 |
'\n', |
255 |
'#MD5:checksum-checksum\n', |
| 245 |
'#EOF\n'], |
256 |
'checksum-txt', |
| 246 |
host=host) |
257 |
'\n', |
|
|
258 |
'#EOF\n'], |
| 259 |
host=host) |
| 260 |
finally: |
| 261 |
test.LAYOUT_TEST_DIR = orig_dir |
| 247 |
self.assertEquals(host.filesystem.written_files, |
262 |
self.assertEquals(host.filesystem.written_files, |
| 248 |
{'/tmp/png_result0.png': 'checksum\x8a-pngtEXtchecksum\x00checksum-checksum'}) |
263 |
{'/tmp/png_result0.png': 'checksum\x8a-pngtEXtchecksum\x00checksum-checksum'}) |
| 249 |
|
264 |
|