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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py

Issue 2772613002: [instrumentation] Rename InspectorInstrumentation into CoreProbes (Closed)
Patch Set: fix typo Created 3 years, 8 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 | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('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 (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 'TestImplements3.idl', 68 'TestImplements3.idl',
69 'TestInterfacePartial.idl', 69 'TestInterfacePartial.idl',
70 'TestInterfacePartial2.idl', 70 'TestInterfacePartial2.idl',
71 'TestInterfacePartial3.idl', 71 'TestInterfacePartial3.idl',
72 'TestInterfacePartial4.idl', 72 'TestInterfacePartial4.idl',
73 'TestInterfacePartialSecureContext.idl', 73 'TestInterfacePartialSecureContext.idl',
74 'TestInterface2Partial.idl', 74 'TestInterface2Partial.idl',
75 'TestInterface2Partial2.idl', 75 'TestInterface2Partial2.idl',
76 ]) 76 ])
77 77
78 # core/inspector/InspectorInstrumentation.idl is not a valid Blink IDL.
79 NON_BLINK_IDL_FILES = frozenset([
80 'InspectorInstrumentation.idl',
81 ])
82
83 COMPONENT_DIRECTORY = frozenset(['core', 'modules']) 78 COMPONENT_DIRECTORY = frozenset(['core', 'modules'])
84 79
85 SOURCE_PATH = webkit_finder.get_source_dir() 80 SOURCE_PATH = webkit_finder.get_source_dir()
86 TEST_INPUT_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'idls') 81 TEST_INPUT_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'idls')
87 REFERENCE_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'results') 82 REFERENCE_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'results')
88 83
89 # component -> ComponentInfoProvider. 84 # component -> ComponentInfoProvider.
90 # Note that this dict contains information about testing idl files, which live 85 # Note that this dict contains information about testing idl files, which live
91 # in Source/bindings/tests/idls/{core,modules}, not in Source/{core,modules}. 86 # in Source/bindings/tests/idls/{core,modules}, not in Source/{core,modules}.
92 component_info_providers = {} 87 component_info_providers = {}
(...skipping 29 matching lines...) Expand all
122 """Returns IDL file paths which blink actually uses.""" 117 """Returns IDL file paths which blink actually uses."""
123 idl_paths = [] 118 idl_paths = []
124 for component in COMPONENT_DIRECTORY: 119 for component in COMPONENT_DIRECTORY:
125 directory = os.path.join(SOURCE_PATH, component) 120 directory = os.path.join(SOURCE_PATH, component)
126 idl_paths.extend(idl_paths_recursive(directory)) 121 idl_paths.extend(idl_paths_recursive(directory))
127 return idl_paths 122 return idl_paths
128 123
129 def collect_interfaces_info(idl_path_list): 124 def collect_interfaces_info(idl_path_list):
130 info_collector = InterfaceInfoCollector() 125 info_collector = InterfaceInfoCollector()
131 for idl_path in idl_path_list: 126 for idl_path in idl_path_list:
132 if os.path.basename(idl_path) in NON_BLINK_IDL_FILES:
133 continue
134 info_collector.collect_info(idl_path) 127 info_collector.collect_info(idl_path)
135 info = info_collector.get_info_as_dict() 128 info = info_collector.get_info_as_dict()
136 # TestDictionary.{h,cpp} are placed under 129 # TestDictionary.{h,cpp} are placed under
137 # Source/bindings/tests/idls/core. However, IdlCompiler generates 130 # Source/bindings/tests/idls/core. However, IdlCompiler generates
138 # TestDictionary.{h,cpp} by using relative_dir. 131 # TestDictionary.{h,cpp} by using relative_dir.
139 # So the files will be generated under 132 # So the files will be generated under
140 # output_dir/core/bindings/tests/idls/core. 133 # output_dir/core/bindings/tests/idls/core.
141 # To avoid this issue, we need to clear relative_dir here. 134 # To avoid this issue, we need to clear relative_dir here.
142 for value in info['interfaces_info'].itervalues(): 135 for value in info['interfaces_info'].itervalues():
143 value['relative_dir'] = '' 136 value['relative_dir'] = ''
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 365
373 366
374 def run_bindings_tests(reset_results, verbose): 367 def run_bindings_tests(reset_results, verbose):
375 # Generate output into the reference directory if resetting results, or 368 # Generate output into the reference directory if resetting results, or
376 # a temp directory if not. 369 # a temp directory if not.
377 if reset_results: 370 if reset_results:
378 print 'Resetting results' 371 print 'Resetting results'
379 return bindings_tests(REFERENCE_DIRECTORY, verbose) 372 return bindings_tests(REFERENCE_DIRECTORY, verbose)
380 with TemporaryDirectory() as temp_dir: 373 with TemporaryDirectory() as temp_dir:
381 return bindings_tests(temp_dir, verbose) 374 return bindings_tests(temp_dir, verbose)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698