| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # 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 |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Layout tests module that is necessary for the layout analyzer. | 5 """Layout tests module that is necessary for the layout analyzer. |
| 6 | 6 |
| 7 Layout tests are stored in an SVN repository and LayoutTestCaseManager collects | 7 Layout tests are stored in an SVN repository and LayoutTestCaseManager collects |
| 8 these layout test cases (including description). | 8 these layout test cases (including description). |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import copy | 11 import copy |
| 12 import csv | 12 import csv |
| 13 import locale | 13 import locale |
| 14 import re | 14 import re |
| 15 import sys | 15 import sys |
| 16 import urllib2 | 16 import urllib2 |
| 17 | 17 |
| 18 import pysvn | 18 import pysvn |
| 19 | 19 |
| 20 # LayoutTests SVN root location. | |
| 21 DEFAULT_LAYOUTTEST_LOCATION = ( | 20 DEFAULT_LAYOUTTEST_LOCATION = ( |
| 22 'http://src.chromium.org/blink/trunk/LayoutTests/') | 21 'https://chromium.googlesource.com/chromium/src/' |
| 23 # LayoutTests SVN view link | 22 '+/master/third_party/WebKit/LayoutTests/') |
| 24 DEFAULT_LAYOUTTEST_SVN_VIEW_LOCATION = ( | |
| 25 'http://src.chromium.org/viewvc/blink/trunk/LayoutTests/') | |
| 26 | 23 |
| 27 | 24 |
| 28 # When parsing the test HTML file and finding the test description, | 25 # When parsing the test HTML file and finding the test description, |
| 29 # this script tries to find the test description using sentences | 26 # this script tries to find the test description using sentences |
| 30 # starting with these keywords. This is adhoc but it is the only way | 27 # starting with these keywords. This is adhoc but it is the only way |
| 31 # since there is no standard for writing test description. | 28 # since there is no standard for writing test description. |
| 32 KEYWORDS_FOR_TEST_DESCRIPTION = ['This test', 'Tests that', 'Test '] | 29 KEYWORDS_FOR_TEST_DESCRIPTION = ['This test', 'Tests that', 'Test '] |
| 33 | 30 |
| 34 # If cannot find the keywords, this script tries to find test case | 31 # If cannot find the keywords, this script tries to find test case |
| 35 # description by the following tags. | 32 # description by the following tags. |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 test_info_map[lt_name] = {} | 232 test_info_map[lt_name] = {} |
| 236 test_info_map[lt_name]['desc'] = desc | 233 test_info_map[lt_name]['desc'] = desc |
| 237 for (te_name, te_info) in ( | 234 for (te_name, te_info) in ( |
| 238 test_expectations.all_test_expectation_info.items()): | 235 test_expectations.all_test_expectation_info.items()): |
| 239 if te_name == lt_name or ( | 236 if te_name == lt_name or ( |
| 240 te_name in lt_name and te_name.endswith('/')): | 237 te_name in lt_name and te_name.endswith('/')): |
| 241 # Only keep the first match when found. | 238 # Only keep the first match when found. |
| 242 test_info_map[lt_name]['te_info'] = te_info | 239 test_info_map[lt_name]['te_info'] = te_info |
| 243 break | 240 break |
| 244 return test_info_map | 241 return test_info_map |
| OLD | NEW |