| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 """LayoutTests/ presubmit script for Blink. | 5 """LayoutTests/ presubmit script for Blink. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 return [] | 29 return [] |
| 30 | 30 |
| 31 | 31 |
| 32 def _CheckIdenticalFiles(input_api, output_api): | 32 def _CheckIdenticalFiles(input_api, output_api): |
| 33 """Verifies that certain files are identical in various locations. | 33 """Verifies that certain files are identical in various locations. |
| 34 These files should always be updated together.""" | 34 These files should always be updated together.""" |
| 35 | 35 |
| 36 dirty_files = set(input_api.LocalPaths()) | 36 dirty_files = set(input_api.LocalPaths()) |
| 37 | 37 |
| 38 groups = [[ | 38 groups = [[ |
| 39 'imported/web-platform-tests/resources/testharness.js', |
| 39 'resources/testharness.js', | 40 'resources/testharness.js', |
| 40 'http/tests/resources/testharness.js', | |
| 41 'http/tests/w3c/resources/testharness.js', | |
| 42 ], [ | 41 ], [ |
| 42 'imported/web-platform-tests/resources/testharnessreport.js', |
| 43 'resources/testharnessreport.js', | 43 'resources/testharnessreport.js', |
| 44 'http/tests/resources/testharnessreport.js', | |
| 45 'http/tests/w3c/resources/testharnessreport.js', | |
| 46 ], [ | 44 ], [ |
| 45 'imported/web-platform-tests/resources/idlharness.js', |
| 47 'resources/idlharness.js', | 46 'resources/idlharness.js', |
| 48 'http/tests/w3c/resources/idlharness.js', | |
| 49 ], [ | |
| 50 'resources/WebIDLParser.js', | |
| 51 'http/tests/w3c/resources/WebIDLParser.js', | |
| 52 ], [ | 47 ], [ |
| 53 'resources/testharness-helpers.js', | 48 'resources/testharness-helpers.js', |
| 54 'http/tests/resources/testharness-helpers.js', | 49 'http/tests/resources/testharness-helpers.js', |
| 55 ]] | 50 ]] |
| 56 | 51 |
| 57 def _absolute_path(s): | 52 def _absolute_path(s): |
| 58 return input_api.os_path.join(input_api.PresubmitLocalPath(), *s.split('
/')) | 53 return input_api.os_path.join(input_api.PresubmitLocalPath(), *s.split('
/')) |
| 59 | 54 |
| 60 def _local_path(s): | 55 def _local_path(s): |
| 61 return input_api.os_path.join('third_party', 'WebKit', 'LayoutTests', *s
.split('/')) | 56 return input_api.os_path.join('third_party', 'WebKit', 'LayoutTests', *s
.split('/')) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 77 results.extend(_CheckTestharnessResults(input_api, output_api)) | 72 results.extend(_CheckTestharnessResults(input_api, output_api)) |
| 78 results.extend(_CheckIdenticalFiles(input_api, output_api)) | 73 results.extend(_CheckIdenticalFiles(input_api, output_api)) |
| 79 return results | 74 return results |
| 80 | 75 |
| 81 | 76 |
| 82 def CheckChangeOnCommit(input_api, output_api): | 77 def CheckChangeOnCommit(input_api, output_api): |
| 83 results = [] | 78 results = [] |
| 84 results.extend(_CheckTestharnessResults(input_api, output_api)) | 79 results.extend(_CheckTestharnessResults(input_api, output_api)) |
| 85 results.extend(_CheckIdenticalFiles(input_api, output_api)) | 80 results.extend(_CheckIdenticalFiles(input_api, output_api)) |
| 86 return results | 81 return results |
| OLD | NEW |