| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Rebase DumpAccessibilityTree Tests. | 6 """Rebase DumpAccessibilityTree Tests. |
| 7 | 7 |
| 8 This script is intended to be run when you make a change that could affect the | 8 This script is intended to be run when you make a change that could affect the |
| 9 expected results of tests in: | 9 expected results of tests in: |
| 10 | 10 |
| 11 content/test/data/accessibility | 11 content/test/data/accessibility |
| 12 | 12 |
| 13 It assumes that you've already uploaded a change and the try jobs have finished. | 13 It assumes that you've already uploaded a change and the try jobs have finished. |
| 14 It collects all of the results from try jobs on all platforms and updates the | 14 It collects all of the results from try jobs on all platforms and updates the |
| 15 expectation files locally. From there you can run 'git diff' to make sure all | 15 expectation files locally. From there you can run 'git diff' to make sure all |
| 16 of the changes look reasonable, then upload the change for code review. | 16 of the changes look reasonable, then upload the change for code review. |
| 17 """ | 17 """ |
| 18 | 18 |
| 19 import json | 19 import json |
| 20 import os | 20 import os |
| 21 import re | 21 import re |
| 22 import sys | 22 import sys |
| 23 import time | 23 import time |
| 24 import urllib | 24 import urllib |
| 25 | 25 |
| 26 # Load BeautifulSoup. It's checked into two places in the Chromium tree. | 26 # Load BeautifulSoup. It's checked into two places in the Chromium tree. |
| 27 sys.path.append( | 27 sys.path.append('third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/') |
| 28 'third_party/trace-viewer/third_party/tvcm/third_party/beautifulsoup') | |
| 29 from BeautifulSoup import BeautifulSoup | 28 from BeautifulSoup import BeautifulSoup |
| 30 | 29 |
| 31 # The location of the DumpAccessibilityTree html test files and expectations. | 30 # The location of the DumpAccessibilityTree html test files and expectations. |
| 32 TEST_DATA_PATH = os.path.join(os.getcwd(), 'content/test/data/accessibility') | 31 TEST_DATA_PATH = os.path.join(os.getcwd(), 'content/test/data/accessibility') |
| 33 | 32 |
| 34 # A global that keeps track of files we've already updated, so we don't | 33 # A global that keeps track of files we've already updated, so we don't |
| 35 # bother to update the same file twice. | 34 # bother to update the same file twice. |
| 36 completed_files = set() | 35 completed_files = set() |
| 37 | 36 |
| 38 def GitClIssue(): | 37 def GitClIssue(): |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 return | 155 return |
| 157 else: | 156 else: |
| 158 print "Summary: modified the following files:" | 157 print "Summary: modified the following files:" |
| 159 all_files = list(completed_files) | 158 all_files = list(completed_files) |
| 160 all_files.sort() | 159 all_files.sort() |
| 161 for f in all_files: | 160 for f in all_files: |
| 162 print "* %s" % os.path.relpath(f) | 161 print "* %s" % os.path.relpath(f) |
| 163 | 162 |
| 164 if __name__ == '__main__': | 163 if __name__ == '__main__': |
| 165 sys.exit(Run()) | 164 sys.exit(Run()) |
| OLD | NEW |