bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def Analyze(self, check_sanity=False): filenames = glob.glob(self.temp_dir + "/tsan.*") analyzer = tsan_analyze.TsanAnalyzer(self._source_dir) ret = analyzer.Report(filenames, check_sanity) if ret != 0: logging.info(self.INFO_MESSAGE) return ret
def Analyze(self, check_sanity=False): filenames = glob.glob(self.temp_dir + "/tsan.*") analyzer = tsan_analyze.TsanAnalyzer(self._source_dir) ret = analyzer.Report(filenames, check_sanity) if ret != 0: logging.info(self.INFO_MESSAGE) return ret
475,700
def __init__(self, options): self._options = options
def __init__(self, options): self._options = options
475,701
def get(self): path = self.request.path # special path to invoke the unit tests # TODO(nickbaum): is there a less ghetto way to invoke the unit test? if path == "/test/": self.unitTest() return # if root, redirect to index.html # TODO(nickbaum): this doesn't handle /chrome/extensions/trunk, etc if (path == "/chrome/ext...
def get(self): path = os.path.realpath(os.path.join('/', self.request.path)) # special path to invoke the unit tests # TODO(nickbaum): is there a less ghetto way to invoke the unit test? if path == "/test/": self.unitTest() return # if root, redirect to index.html # TODO(nickbaum): this doesn't handle /chrome/extension...
475,702
def get(self): path = self.request.path # special path to invoke the unit tests # TODO(nickbaum): is there a less ghetto way to invoke the unit test? if path == "/test/": self.unitTest() return # if root, redirect to index.html # TODO(nickbaum): this doesn't handle /chrome/extensions/trunk, etc if (path == "/chrome/ext...
def get(self): path = self.request.path # special path to invoke the unit tests # TODO(nickbaum): is there a less ghetto way to invoke the unit test? if path == "/test": self.unitTest() return # if root, redirect to index.html # TODO(nickbaum): this doesn't handle /chrome/extensions/trunk, etc if (path == "/chrome/exte...
475,703
def testRedirectHistory(self): """HTTP meta-refresh redirects should have separate history entries.""" assert not self.GetHistoryInfo().History(), 'Expecting clean history.' test_dir = os.path.join(os.path.abspath(self.DataDir()), 'history') file_url = self.GetFileURLForPath(os.path.join(test_dir, 'redirector.html')) l...
def testRedirectHistory(self): """HTTP meta-refresh redirects should have separate history entries.""" assert not self.GetHistoryInfo().History(), 'Expecting clean history.' test_dir = os.path.join(os.path.abspath(self.DataDir()), 'History') file_url = self.GetFileURLForPath(os.path.join(test_dir, 'redirector.html')) l...
475,704
def __init__(self, request, client_address, socket_server): connect_handlers = [ self.RedirectConnectHandler, self.ServerAuthConnectHandler, self.DefaultConnectResponseHandler] get_handlers = [ self.NoCacheMaxAgeTimeHandler, self.NoCacheTimeHandler, self.CacheTimeHandler, self.CacheExpiresHandler, self.CacheProxyRevali...
def __init__(self, request, client_address, socket_server): connect_handlers = [ self.RedirectConnectHandler, self.ServerAuthConnectHandler, self.DefaultConnectResponseHandler] get_handlers = [ self.NoCacheMaxAgeTimeHandler, self.NoCacheTimeHandler, self.CacheTimeHandler, self.CacheExpiresHandler, self.CacheProxyRevali...
475,705
def GenerateLcovPosix(self): """Convert profile data to lcov on Mac or Linux.""" start_dir = os.getcwd() if self.IsLinux(): # With Linux/make (e.g. the coverage_run target), the current # directory for this command is .../build/src/chrome but we need # to be in .../build/src for the relative path of source files # to b...
def GenerateLcovPosix(self): """Convert profile data to lcov on Mac or Linux.""" start_dir = os.getcwd() if self.IsLinux(): # With Linux/make (e.g. the coverage_run target), the current # directory for this command is .../build/src/chrome but we need # to be in .../build/src for the relative path of source files # to b...
475,706
def __init__(self, filename, file_comment = None): CWriter.__init__(self, filename)
def__init__(self,filename,file_comment=None):CWriter.__init__(self,filename)
475,707
def AssignFirstIds(self, filename_or_stream, first_id_filename): '''Assign first ids to each grouping node based on values from tools/grit/resource_ids.''' # If the input is a stream, then we're probably in a unit test and # should skip this step. if type(filename_or_stream) not in (str, unicode): return
def AssignFirstIds(self, filename_or_stream, first_id_filename): '''Assign first ids to each grouping node based on values from tools/grit/resource_ids.''' # If the input is a stream, then we're probably in a unit test and # should skip this step. if type(filename_or_stream) not in (str, unicode): return
475,708
def setup(top_dir): if 'CHROME_ORIGIN' not in os.environ.keys() or \ (os.environ['CHROME_ORIGIN'] != 'LOCAL_SOURCE' and os.environ['CHROME_ORIGIN'] != 'SERVER_SOURCE'): logging.info('Skipping Chrome test resource setup for non-local builds') return chrome_test_files = os.environ['SYSROOT'] + '/usr/local/autotest-chrom...
def setup(top_dir): if 'CHROME_ORIGIN' not in os.environ.keys() or \ (os.environ['CHROME_ORIGIN'] != 'LOCAL_SOURCE' and os.environ['CHROME_ORIGIN'] != 'SERVER_SOURCE'): logging.info('Skipping Chrome test resource setup for non-local builds') return chrome_test_files = os.environ['SYSROOT'] + '/usr/local/autotest-chrom...
475,709
def setup(top_dir): if 'CHROME_ORIGIN' not in os.environ.keys() or \ (os.environ['CHROME_ORIGIN'] != 'LOCAL_SOURCE' and os.environ['CHROME_ORIGIN'] != 'SERVER_SOURCE'): logging.info('Skipping Chrome test resource setup for non-local builds') return chrome_test_files = os.environ['SYSROOT'] + '/usr/local/autotest-chrom...
def setup(top_dir): if 'CHROME_ORIGIN' not in os.environ.keys() or \ (os.environ['CHROME_ORIGIN'] != 'LOCAL_SOURCE' and os.environ['CHROME_ORIGIN'] != 'SERVER_SOURCE'): logging.info('Skipping Chrome test resource setup for non-local builds') return chrome_test_files = os.environ['SYSROOT'] + '/usr/local/autotest-chrom...
475,710
def CallJavascriptFunc(self, function, args=[], tab_index=0, windex=0): """Executes a script which calls a given javascript function.
def CallJavascriptFunc(self, function, args=[], tab_index=0, windex=0): """Executes a script which calls a given javascript function.
475,711
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Try to find README.chromium. readme_path = os.path.join(path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium") # Parse metadata fields out of README.chromium. # We provide a de...
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Try to find README.chromium. readme_path = os.path.join(path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium") # Parse metadata fields out of README.chromium. # We provide a de...
475,712
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Try to find README.chromium. readme_path = os.path.join(path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium") # Parse metadata fields out of README.chromium. # We provide a de...
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Try to find README.chromium. readme_path = os.path.join(path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium") # Parse metadata fields out of README.chromium. # We provide a de...
475,713
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
475,714
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
475,715
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
475,716
def WriteLines(filename, lines): outfile = open(filename, 'w') for line in lines: outfile.write(line) outfile.write('\n')
def WriteLines(filename, lines): outfile = open(filename, 'w') for line in lines: outfile.write(line) outfile.write('\n')
475,717
def WriteLines(filename, lines): outfile = open(filename, 'w') for line in lines: outfile.write(line) outfile.write('\n')
def WriteLines(filename, lines): outfile = open(filename, 'w') for line in lines: outfile.write(line) outfile.write('\n')
475,718
def GetSourcesForTarget(target_name, gyp_file_data): for target in gyp_file_data[GYP_TARGETS_KEY]: if target[GYP_TARGET_NAME_KEY] == target_name: sources = target[GYP_SOURCES_KEY] sources.sort() return sources print 'Warning: no target named ', target, ' found.' return []
def GetSourcesForTarget(target_name, gyp_file_data): for target in gyp_file_data[GYP_TARGETS_KEY]: if target[GYP_TARGET_NAME_KEY] == target_name: sources = target[GYP_SOURCES_KEY] sources.sort() return sources print 'Warning: no target named ', target, ' found.' return []
475,719
def GenerateCIncludeTest(gyp_file_data): c_sources = GetSourcesForTarget('ppapi_c', gyp_file_data) lines = [COPYRIGHT_STRING_C] for source in c_sources: lines.append('#include "ppapi/' + source + '"\n') WriteLines('tests/test_c_includes.c', lines)
def GenerateCIncludeTest(gyp_file_data): c_sources = GetSourcesForTarget('ppapi_c', gyp_file_data) lines = [COPYRIGHT_STRING_C] for source in c_sources: lines.append('#include "ppapi/' + source + '"\n') lines.append('\n WriteLines('tests/all_c_includes.h', lines)
475,720
def GenerateCIncludeTest(gyp_file_data): c_sources = GetSourcesForTarget('ppapi_c', gyp_file_data) lines = [COPYRIGHT_STRING_C] for source in c_sources: lines.append('#include "ppapi/' + source + '"\n') WriteLines('tests/test_c_includes.c', lines)
def GenerateCIncludeTest(gyp_file_data): c_sources = GetSourcesForTarget('ppapi_c', gyp_file_data) lines = [COPYRIGHT_STRING_C] for source in c_sources: lines.append('#include "ppapi/' + source + '"\n') WriteLines('tests/test_c_includes.c', lines)
475,721
def GenerateCCIncludeTest(gyp_file_data): cc_sources = GetSourcesForTarget('ppapi_cpp_objects', gyp_file_data) header_re = re.compile('.+\.h$') lines = [COPYRIGHT_STRING_CC] for source in cc_sources: if header_re.match(source): lines.append('#include "ppapi/' + source + '"\n') WriteLines('tests/test_cc_includes.cc', li...
def GenerateCCIncludeTest(gyp_file_data): cc_sources = GetSourcesForTarget('ppapi_cpp_objects', gyp_file_data) header_re = re.compile('.+\.h$') lines = [COPYRIGHT_STRING_CC] for source in cc_sources: if header_re.match(source): lines.append('#include "ppapi/' + source + '"\n') lines.append('\n WriteLines('tests/all_cpp...
475,722
def __init__(self, tag, name, parent_tag, sync_type): self.tag = tag self.name = name self.parent_tag = parent_tag self.sync_type = sync_type
def __init__(self, tag, name, parent_tag, sync_type): self.tag = tag self.name = name self.parent_tag = parent_tag self.sync_type = sync_type
475,723
def _LocateBinDirs(): script_dir = os.path.dirname(__file__) chrome_src = os.path.join(script_dir, os.pardir, os.pardir, os.pardir) bin_dirs = { 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), os.path.join(chrome_src, 'sconsbuild', 'Debug'), os.path.join(chrome_src, 'out', 'Release'), os.path.join(chrome_src, 's...
def _LocateBinDirs(): script_dir = os.path.dirname(__file__) chrome_src = os.path.join(script_dir, os.pardir, os.pardir, os.pardir) bin_dirs = { 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), os.path.join(chrome_src, 'sconsbuild', 'Debug'), os.path.join(chrome_src, 'out', 'Release'), os.path.join(chrome_src, 's...
475,724
def _LocateBinDirs(): script_dir = os.path.dirname(__file__) chrome_src = os.path.join(script_dir, os.pardir, os.pardir, os.pardir) bin_dirs = { 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), os.path.join(chrome_src, 'sconsbuild', 'Debug'), os.path.join(chrome_src, 'out', 'Release'), os.path.join(chrome_src, 's...
def _LocateBinDirs(): script_dir = os.path.dirname(__file__) chrome_src = os.path.join(script_dir, os.pardir, os.pardir, os.pardir) bin_dirs = { 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), os.path.join(chrome_src, 'sconsbuild', 'Debug'), os.path.join(chrome_src, 'out', 'Release'), os.path.join(chrome_src, 's...
475,725
def __init__(self, methodName='runTest'): PyUITestSuite.__init__(self, sys.argv) unittest.TestCase.__init__(self, methodName)
def __init__(self, methodName='runTest'): pyautolib.PyUITestSuite.__init__(self, sys.argv) browser_dir = os.path.normpath(os.path.dirname(pyautolib.__file__)) os.environ['PATH'] = browser_dir + os.pathsep + os.environ['PATH'] self.Initialize(pyautolib.FilePath(browser_dir)) unittest.TestCase.__init__(self, methodName)
475,726
def __del__(self): PyUITestSuite.__del__(self)
def __del__(self): PyUITestSuite.__del__(self)
475,727
def CompareOutput(self, filename, proc, output, test_args, target): """Implementation of CompareOutput that checks the output image and checksum against the expected files from the LayoutTest directory. """ failures = []
def CompareOutput(self, filename, proc, output, test_args, target): """Implementation of CompareOutput that checks the output image and checksum against the expected files from the LayoutTest directory. """ failures = []
475,728
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
def __init__(self, methodName='runTest', **kwargs): """Initialize PyUITest.
475,729
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
475,730
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
475,731
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
475,732
def GenerateHeader(file, functions, setName): """Generates gl_binding_autogen_x.h""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\...
def GenerateHeader(file, functions, set_name): """Generates gl_binding_autogen_x.h""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file....
475,733
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
475,734
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
475,735
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
475,736
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
475,737
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
475,738
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
475,739
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
475,740
def GenerateSource(file, functions, setName): """Generates gl_binding_autogen_x.cc""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file....
def GenerateSource(file, functions, setName): """Generates gl_binding_autogen_x.cc""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file....
475,741
def GenerateSource(file, functions, setName): """Generates gl_binding_autogen_x.cc""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file....
def GenerateSource(file, functions, setName): """Generates gl_binding_autogen_x.cc""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file....
475,742
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
475,743
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
475,744
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
475,745
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
475,746
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
475,747
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
475,748
def main(argv): """This is the main function.""" if len(argv) >= 1: dir = argv[0] else: dir = '.' for [functions, setName] in FUNCTION_SETS: headerFile = open( os.path.join(dir, 'gl_bindings_autogen_%s.h' % setName), 'wb') GenerateHeader(headerFile, functions, setName) headerFile.close() sourceFile = open( os.path.j...
def main(argv): """This is the main function.""" if len(argv) >= 1: dir = argv[0] else: dir = '.' for [functions, set_name] in FUNCTION_SETS: header_file = open( os.path.join(dir, 'gl_bindings_autogen_%s.h' % set_name), 'wb') GenerateHeader(header_file, functions, set_name) header_file.close() source_file = open( os...
475,749
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" count = 0 for arg in func.GetOrigina...
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" count = 0 for arg in func.GetOrigina...
475,750
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,751
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
475,752
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
475,753
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,754
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,755
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,756
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,757
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,758
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,759
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,760
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,761
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,762
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,763
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,764
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,765
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,766
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,767
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,768
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,769
def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s;\n" % (self.type, self.name)) file.Write(" if (!id_manager_->GetServiceId(c.%s, &%s)) {\n" % (self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s;\n" % (self.type, self.name)) file.Write(" if (!id_manager()->GetServiceId(c.%s, &%s)) {\n" % (self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
475,770
def __init__(self, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_args = num_pointer_args s...
def __init__(self, original_name, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_args = num...
475,771
def __init__(self, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_args = num_pointer_args s...
def __init__(self, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = original_name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_args = num_point...
475,772
def GetGLFunctionName(self): """Gets the function to call to execute GL for this command.""" if self.GetInfo('DecoderFunc'): return self.GetInfo('DecoderFunc') return "gl%s" % self.original_name
def GetGLFunctionName(self): """Gets the function to call to execute GL for this command.""" if self.GetInfo('decoder_func'): return self.GetInfo('decoder_func') return "gl%s" % self.original_name
475,773
def GetGLTestFunctionName(self): gl_func_name = self.GetInfo('gl_test_func') if gl_func_name == None: gl_func_name = self.GetGLFunctionName() if gl_func_name.startswith("gl"): gl_func_name = gl_func_name[2:] else: gl_func_name = self.name return gl_func_name
def GetGLTestFunctionName(self): gl_func_name = self.GetInfo('gl_test_func') if gl_func_name == None: gl_func_name = self.GetGLFunctionName() if gl_func_name.startswith("gl"): gl_func_name = gl_func_name[2:] else: gl_func_name = self.original_name return gl_func_name
475,774
def __init__(self, func): new_args = [] for arg in func.GetOriginalArgs(): new_arg = arg.GetImmediateVersion() if new_arg: new_args.append(new_arg)
def __init__(self, func): new_args = [] for arg in func.GetOriginalArgs(): new_arg = arg.GetImmediateVersion() if new_arg: new_args.append(new_arg)
475,775
def ParseGLH(self, filename): """Parses the GL2.h file and extracts the functions""" for line in _GL_FUNCTIONS.splitlines(): match = self._function_re.match(line) if match: func_name = match.group(2)[2:] func_info = self.GetFunctionInfo(func_name) if func_info.type != 'Noop': return_type = match.group(1).strip() arg_st...
def ParseGLH(self, filename): """Parses the GL2.h file and extracts the functions""" for line in _GL_FUNCTIONS.splitlines(): match = self._function_re.match(line) if match: func_name = match.group(2)[2:] func_info = self.GetFunctionInfo(func_name) if func_info.type != 'Noop': return_type = match.group(1).strip() arg_st...
475,776
def WriteServiceUnitTests(self, filename): """Writes the service decorder unit tests.""" file = CHeaderWriter( filename, "// It is included by gles2_cmd_decoder_unittest.cc\n")
def WriteServiceUnitTests(self, filename): """Writes the service decorder unit tests.""" file = CHeaderWriter( filename, "// It is included by gles2_cmd_decoder_unittest.cc\n")
475,777
def main(argv): """This is the main function.""" parser = OptionParser() parser.add_option( "-g", "--generate-implementation-templates", action="store_true", help="generates files that are generally hand edited..") parser.add_option( "--generate-command-id-tests", action="store_true", help="generate tests for commands ...
def main(argv): """This is the main function.""" parser = OptionParser() parser.add_option( "-g", "--generate-implementation-templates", action="store_true", help="generates files that are generally hand edited..") parser.add_option( "--generate-command-id-tests", action="store_true", help="generate tests for commands ...
475,778
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
def UpdateGClientBranch(webkit_rev, magic_gclient_branch): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os....
475,779
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
475,780
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
475,781
def UpdateCurrentCheckoutIfAppropriate(): """Reset the current gclient branch if that's what we have checked out.""" branch = RunGit(['symbolic-ref', '-q', 'HEAD']) if branch != MAGIC_GCLIENT_BRANCH: print "We have now updated the 'gclient' branch, but third_party/WebKit" print "has some other branch ('%s') checked out...
def UpdateCurrentCheckoutIfAppropriate(magic_gclient_branch): """Reset the current gclient branch if that's what we have checked out.""" branch = RunGit(['symbolic-ref', '-q', 'HEAD']) if branch != MAGIC_GCLIENT_BRANCH: print "We have now updated the 'gclient' branch, but third_party/WebKit" print "has some other branc...
475,782
def UpdateCurrentCheckoutIfAppropriate(): """Reset the current gclient branch if that's what we have checked out.""" branch = RunGit(['symbolic-ref', '-q', 'HEAD']) if branch != MAGIC_GCLIENT_BRANCH: print "We have now updated the 'gclient' branch, but third_party/WebKit" print "has some other branch ('%s') checked out...
def UpdateCurrentCheckoutIfAppropriate(): """Reset the current gclient branch if that's what we have checked out.""" branch = RunGit(['symbolic-ref', '-q', 'HEAD']) if branch != magic_gclient_branch: print "We have now updated the 'gclient' branch, but third_party/WebKit" print "has some other branch ('%s') checked out...
475,783
def main(): if not os.path.exists('third_party/WebKit/.git'): if os.path.exists('third_party/WebKit'): print "ERROR: third_party/WebKit appears to not be under git control." else: print "ERROR: third_party/WebKit could not be found." print "Did you run this script from the right directory?" print "See http://code.goog...
def main(): if not os.path.exists('third_party/WebKit/.git'): if os.path.exists('third_party/WebKit'): print "ERROR: third_party/WebKit appears to not be under git control." else: print "ERROR: third_party/WebKit could not be found." print "Did you run this script from the right directory?" print "See http://code.goog...
475,784
def main(): if not os.path.exists('third_party/WebKit/.git'): if os.path.exists('third_party/WebKit'): print "ERROR: third_party/WebKit appears to not be under git control." else: print "ERROR: third_party/WebKit could not be found." print "Did you run this script from the right directory?" print "See http://code.goog...
def main(): if not os.path.exists('third_party/WebKit/.git'): if os.path.exists('third_party/WebKit'): print "ERROR: third_party/WebKit appears to not be under git control." else: print "ERROR: third_party/WebKit could not be found." print "Did you run this script from the right directory?" print "See http://code.goog...
475,785
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
def RenderPages(names, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" ...
475,786
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" ...
475,787
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
475,788
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
475,789
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,790
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,791
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,792
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,793
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script.") parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if ...
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script.") parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if ...
475,794
def testFillProfileCrazyCharacters(self): """Test filling profiles with unicode strings and crazy characters.""" # Adding autofill profiles. file_path = os.path.join(self.DataDir(), 'autofill', 'crazy_autofill.txt') profiles = self.EvalDataFrom(file_path) self.FillAutoFillProfile(profiles=profiles)
def testFillProfileCrazyCharacters(self): """Test filling profiles with unicode strings and crazy characters.""" # Adding autofill profiles. file_path = os.path.join(self.DataDir(), 'autofill', 'crazy_autofill.txt') profiles = self.EvalDataFrom(file_path) self.FillAutoFillProfile(profiles=profiles)
475,795
def testAutofillInvalid(self): """Test filling in invalid values for profiles and credit cards.""" # First try profiles with invalid input. without_invalid = {'NAME_FIRST': u'Will', 'ADDRESS_HOME_CITY': 'Sunnyvale', 'ADDRESS_HOME_STATE': 'CA', 'ADDRESS_HOME_ZIP': 'my_zip', 'ADDRESS_HOME_COUNTRY': 'USA'} # Add some inva...
def testAutofillInvalid(self): """Test filling in invalid values for profiles and credit cards.""" # First try profiles with invalid input. without_invalid = {'NAME_FIRST': u'Will', 'ADDRESS_HOME_CITY': 'Sunnyvale', 'ADDRESS_HOME_STATE': 'CA', 'ADDRESS_HOME_ZIP': 'my_zip', 'ADDRESS_HOME_COUNTRY': 'USA'} # Add some inva...
475,796
def testAutofillInvalid(self): """Test filling in invalid values for profiles and credit cards.""" # First try profiles with invalid input. without_invalid = {'NAME_FIRST': u'Will', 'ADDRESS_HOME_CITY': 'Sunnyvale', 'ADDRESS_HOME_STATE': 'CA', 'ADDRESS_HOME_ZIP': 'my_zip', 'ADDRESS_HOME_COUNTRY': 'USA'} # Add some inva...
def testAutofillInvalid(self): """Test filling in invalid values for profiles and credit cards.""" # First try profiles with invalid input. without_invalid = {'NAME_FIRST': u'Will', 'ADDRESS_HOME_CITY': 'Sunnyvale', 'ADDRESS_HOME_STATE': 'CA', 'ADDRESS_HOME_ZIP': 'my_zip', 'ADDRESS_HOME_COUNTRY': 'USA'} # Add some inva...
475,797
def Lookup(self, var_name): """Implements the Var syntax.""" if var_name in self._local_scope.get("vars", {}): return self._local_scope["vars"][var_name] raise Error("Var is not defined: %s" % var_name)
def Lookup(self, var_name): """Implements the Var syntax.""" if var_name in self._local_scope.get("vars", {}): return self._local_scope["vars"][var_name] raise Error("Var is not defined: %s" % var_name)
475,798
def TestRemoting(self): return self.SimpleTest("chrome", "remoting_unittests", cmd_args=[ "--ui-test-timeout=240000", "--ui-test-action-timeout=120000", "--ui-test-action-max-timeout=280000"])
def TestRemoting(self): return self.SimpleTest("chrome", "remoting_unittests", cmd_args=[ "--ui-test-timeout=240000", "--ui-test-action-timeout=120000", "--ui-test-action-max-timeout=280000"])
475,799