Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: ui/accessibility/PRESUBMIT.py

Issue 2601333002: Update json_schema_compiler to handle the Automation extension API (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/json_schema_compiler/model.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 """Presubmit script for ui/accessibility.""" 5 """Presubmit script for ui/accessibility."""
6 6
7 import os, re 7 import os, re
8 8
9 AX_IDL = 'ui/accessibility/ax_enums.idl' 9 AX_IDL = 'ui/accessibility/ax_enums.idl'
10 AUTOMATION_IDL = 'chrome/common/extensions/api/automation.idl' 10 AUTOMATION_IDL = 'chrome/common/extensions/api/automation.idl'
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 repo_root = input_api.change.RepositoryRoot() 75 repo_root = input_api.change.RepositoryRoot()
76 ax_enums = GetEnumsFromFile(os.path.join(repo_root, AX_IDL)) 76 ax_enums = GetEnumsFromFile(os.path.join(repo_root, AX_IDL))
77 automation_enums = GetEnumsFromFile(os.path.join(repo_root, AUTOMATION_IDL)) 77 automation_enums = GetEnumsFromFile(os.path.join(repo_root, AUTOMATION_IDL))
78 errs = [] 78 errs = []
79 CheckMatchingEnum(ax_enums, 'AXRole', automation_enums, 'RoleType', errs, 79 CheckMatchingEnum(ax_enums, 'AXRole', automation_enums, 'RoleType', errs,
80 output_api) 80 output_api)
81 CheckMatchingEnum(ax_enums, 'AXState', automation_enums, 'StateType', errs, 81 CheckMatchingEnum(ax_enums, 'AXState', automation_enums, 'StateType', errs,
82 output_api) 82 output_api)
83 CheckMatchingEnum(ax_enums, 'AXEvent', automation_enums, 'EventType', errs, 83 CheckMatchingEnum(ax_enums, 'AXEvent', automation_enums, 'EventType', errs,
84 output_api) 84 output_api)
85 CheckMatchingEnum(ax_enums, 'AXNameFrom', automation_enums, 'NameFromType',
86 errs, output_api)
85 return errs 87 return errs
86 88
87 def CheckChangeOnUpload(input_api, output_api): 89 def CheckChangeOnUpload(input_api, output_api):
88 if AX_IDL not in input_api.LocalPaths(): 90 if AX_IDL not in input_api.LocalPaths():
89 return [] 91 return []
90 return CheckEnumsMatch(input_api, output_api) 92 return CheckEnumsMatch(input_api, output_api)
91 93
92 def CheckChangeOnCommit(input_api, output_api): 94 def CheckChangeOnCommit(input_api, output_api):
93 if AX_IDL not in input_api.LocalPaths(): 95 if AX_IDL not in input_api.LocalPaths():
94 return [] 96 return []
95 return CheckEnumsMatch(input_api, output_api) 97 return CheckEnumsMatch(input_api, output_api)
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/model.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698