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

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

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 idl_partial_interface_compiler = None 304 idl_partial_interface_compiler = None
305 305
306 dictionary_impl_compiler = IdlCompilerDictionaryImpl( 306 dictionary_impl_compiler = IdlCompilerDictionaryImpl(
307 output_dir, info_provider=component_info_providers[component], 307 output_dir, info_provider=component_info_providers[component],
308 only_if_changed=True) 308 only_if_changed=True)
309 309
310 idl_filenames = [] 310 idl_filenames = []
311 input_directory = os.path.join(test_input_directory, component) 311 input_directory = os.path.join(test_input_directory, component)
312 for filename in os.listdir(input_directory): 312 for filename in os.listdir(input_directory):
313 if (filename.endswith('.idl') and 313 if (filename.endswith('.idl') and
314 # Dependencies aren't built 314 # Dependencies aren't built
315 # (they are used by the dependent) 315 # (they are used by the dependent)
316 filename not in DEPENDENCY_IDL_FILES): 316 filename not in DEPENDENCY_IDL_FILES):
317 idl_filenames.append( 317 idl_filenames.append(
318 os.path.realpath( 318 os.path.realpath(
319 os.path.join(input_directory, filename))) 319 os.path.join(input_directory, filename)))
320 for idl_path in idl_filenames: 320 for idl_path in idl_filenames:
321 idl_basename = os.path.basename(idl_path) 321 idl_basename = os.path.basename(idl_path)
322 idl_compiler.compile_file(idl_path) 322 idl_compiler.compile_file(idl_path)
323 definition_name, _ = os.path.splitext(idl_basename) 323 definition_name, _ = os.path.splitext(idl_basename)
324 if definition_name in interfaces_info: 324 if definition_name in interfaces_info:
325 interface_info = interfaces_info[definition_name] 325 interface_info = interfaces_info[definition_name]
326 if interface_info['is_dictionary']: 326 if interface_info['is_dictionary']:
(...skipping 21 matching lines...) Expand all
348 348
349 349
350 def run_bindings_tests(reset_results, verbose): 350 def run_bindings_tests(reset_results, verbose):
351 # Generate output into the reference directory if resetting results, or 351 # Generate output into the reference directory if resetting results, or
352 # a temp directory if not. 352 # a temp directory if not.
353 if reset_results: 353 if reset_results:
354 print 'Resetting results' 354 print 'Resetting results'
355 return bindings_tests(reference_directory, verbose) 355 return bindings_tests(reference_directory, verbose)
356 with TemporaryDirectory() as temp_dir: 356 with TemporaryDirectory() as temp_dir:
357 return bindings_tests(temp_dir, verbose) 357 return bindings_tests(temp_dir, verbose)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698