OLD | NEW |
1 #!/usr/bin/python | |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 3 # found in the LICENSE file. |
5 | 4 |
6 """Layout tests module that is necessary for the layout analyzer. | 5 """Layout tests module that is necessary for the layout analyzer. |
7 | 6 |
8 Layout tests are stored in Webkit SVN and LayoutTestCaseManager collects these | 7 Layout tests are stored in Webkit SVN and LayoutTestCaseManager collects these |
9 layout test cases (including description). | 8 layout test cases (including description). |
10 """ | 9 """ |
11 | 10 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 try: | 255 try: |
257 resp = urllib2.urlopen(url) | 256 resp = urllib2.urlopen(url) |
258 except urllib2.HTTPError: | 257 except urllib2.HTTPError: |
259 # Some files with different languages cause this exception. | 258 # Some files with different languages cause this exception. |
260 # Return an empty description in this case. | 259 # Return an empty description in this case. |
261 return '' | 260 return '' |
262 if resp.code == 200: | 261 if resp.code == 200: |
263 return LayoutTests.ExtractTestDescription(resp.read()) | 262 return LayoutTests.ExtractTestDescription(resp.read()) |
264 raise urllib2.URLError( | 263 raise urllib2.URLError( |
265 'Fail to get layout test HTML file from %s.' % url) | 264 'Fail to get layout test HTML file from %s.' % url) |
OLD | NEW |