OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import copy | 6 import copy |
7 from datetime import datetime | 7 from datetime import datetime |
8 import os | 8 import os |
9 import pickle | 9 import pickle |
10 import time | 10 import time |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 def testFindLatestResultWithNoData(self): | 182 def testFindLatestResultWithNoData(self): |
183 self.assertFalse( | 183 self.assertFalse( |
184 layouttest_analyzer_helpers.FindLatestResult('test_data')) | 184 layouttest_analyzer_helpers.FindLatestResult('test_data')) |
185 | 185 |
186 def testConvertToCSVText(self): | 186 def testConvertToCSVText(self): |
187 file_path = os.path.join('test_data', 'base') | 187 file_path = os.path.join('test_data', 'base') |
188 analyzerResultMapBase = ( | 188 analyzerResultMapBase = ( |
189 layouttest_analyzer_helpers.AnalyzerResultMap.Load(file_path)) | 189 layouttest_analyzer_helpers.AnalyzerResultMap.Load(file_path)) |
190 data, issues_txt = analyzerResultMapBase.ConvertToCSVText('11-10-10-2011') | 190 data, issues_txt = analyzerResultMapBase.ConvertToCSVText('11-10-10-2011') |
191 self.assertEquals(data, '11-10-10-2011,204,36,10') | 191 self.assertEquals(data, '11-10-10-2011,204,36,10,95') |
192 expected_issues_txt = """\ | 192 expected_issues_txt = """\ |
193 BUGWK,66310,TEXT PASS,media/media-blocked-by-beforeload.html,DEBUG TEXT PASS,\ | 193 BUGWK,66310,TEXT PASS,media/media-blocked-by-beforeload.html,DEBUG TEXT PASS,\ |
194 media/video-source-error.html, | 194 media/video-source-error.html, |
195 BUGCR,86714,GPU IMAGE CRASH MAC,media/video-zoom.html,GPU IMAGE CRASH MAC,\ | 195 BUGCR,86714,GPU IMAGE CRASH MAC,media/video-zoom.html,GPU IMAGE CRASH MAC,\ |
196 media/video-controls-rendering.html, | 196 media/video-controls-rendering.html, |
197 BUGCR,74102,GPU IMAGE PASS LINUX,media/video-controls-rendering.html, | 197 BUGCR,74102,GPU IMAGE PASS LINUX,media/video-controls-rendering.html, |
198 BUGWK,55718,TEXT IMAGE IMAGE+TEXT,media/media-document-audio-repaint.html, | 198 BUGWK,55718,TEXT IMAGE IMAGE+TEXT,media/media-document-audio-repaint.html, |
199 BUGCR,78376,TIMEOUT,http/tests/media/video-play-stall-seek.html, | 199 BUGCR,78376,TIMEOUT,http/tests/media/video-play-stall-seek.html, |
200 BUGCR,59415,WIN TEXT TIMEOUT PASS,media/video-loop.html, | 200 BUGCR,59415,WIN TEXT TIMEOUT PASS,media/video-loop.html, |
201 BUGCR,72223,IMAGE PASS,media/video-frame-accurate-seek.html, | 201 BUGCR,72223,IMAGE PASS,media/video-frame-accurate-seek.html, |
202 BUGCR,75354,TEXT IMAGE IMAGE+TEXT,media/media-document-audio-repaint.html, | 202 BUGCR,75354,TEXT IMAGE IMAGE+TEXT,media/media-document-audio-repaint.html, |
203 BUGCR,73609,TEXT,http/tests/media/video-play-stall.html, | 203 BUGCR,73609,TEXT,http/tests/media/video-play-stall.html, |
204 BUGWK,64003,DEBUG TEXT MAC PASS,media/video-delay-load-event.html, | 204 BUGWK,64003,DEBUG TEXT MAC PASS,media/video-delay-load-event.html, |
205 """ | 205 """ |
206 self.assertEquals(issues_txt, expected_issues_txt) | 206 self.assertEquals(issues_txt, expected_issues_txt) |
207 | 207 |
208 | 208 |
209 if __name__ == '__main__': | 209 if __name__ == '__main__': |
210 unittest.main() | 210 unittest.main() |
OLD | NEW |