rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
feature_defines = ['ENABLE_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER', 'ENABLE_SVG', 'ENABLE_SVG_USE', 'ENABLE_FILTERS', 'ENABLE_SVG_FONTS', 'ENABLE_SVG_ANIMATION', 'ENABLE_SVG_AS_IMAGE', 'ENABLE_SVG_FOREIGN_OBJECT'] | feature_defines = ['ENABLE_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER', 'ENABLE_SVG', 'ENABLE_SVG_USE', 'ENABLE_FILTERS', 'ENABLE_SVG_FONTS', 'ENABLE_SVG_ANIMATION', 'ENABLE_SVG_AS_IMAGE', 'ENABLE_SVG_FOREIGN_OBJECT', 'EXECUTABLE_ALLOCATOR_DEMAND'] | def get_config(): waf_configname = config.upper().strip() if building_on_win32: isReleaseCRT = (config == 'Release') if build_port == 'wx': if Options.options.wxpython: isReleaseCRT = True if isReleaseCRT: waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL' else: waf_configname = waf_configname + ' CRT_MULTITHR... |
"""Download a file from downloads data directory. | """Download a file from downloads data directory, in first tab first window. | def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') downloaded_pkg = os.path.joi... |
download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') | file_url = test.GetFileURLForDataPath(os.path.join('downloads', file_name)) | def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') downloaded_pkg = os.path.joi... |
os.putenv("LD_LIBRARY_PATH", self._options.build_dir) | if (os.getenv("LD_LIBRARY_PATH")): os.putenv("LD_LIBRARY_PATH", "%s:%s" % (os.getenv("LD_LIBRARY_PATH"), self._options.build_dir)) else: os.putenv("LD_LIBRARY_PATH", self._options.build_dir) | def SimpleTest(self, module, name, valgrind_test_args=None, cmd_args=None): cmd = self._DefaultCommand(module, name, valgrind_test_args) self._ReadGtestFilterFile(name, cmd) if cmd_args: cmd.extend(["--"]) cmd.extend(cmd_args) |
else: self.error(404) | def get(self): master = self.request.get(PARAM_MASTER) builder = self.request.get(PARAM_BUILDER) test_type = self.request.get(PARAM_TEST_TYPE) name = self.request.get(PARAM_NAME) dir = self.request.get(PARAM_DIR) test_list_json = self.request.get(PARAM_TEST_LIST_JSON) | |
impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n") | file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n") | def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n") |
impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): | if func.can_auto_generate and (impl_func == None or impl_func == True): | def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func... |
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func... | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | |
impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOriginalArgString("")) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func.MakeOri... | file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOriginalArgString("")) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func.MakeOriginalArgString(""))) file.Write("}\n") file.Write("\n") | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOri... |
impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:-1] arg_string = ( ", ".join(["%s" % arg.name for arg in all_but_last_args])) code = """ ... | file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:-1] arg_string = ( ", ".join(["%s" % arg.name for arg in all_but_last_args])) code = """ typedef %(func_name)s::Result Result; | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:... |
def GenerateHeader(file, functions, setName): | def GenerateHeader(file, functions, set_name): | 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.\... |
file.write('void InitializeGLBindings%s();\n' % setName.upper()) | file.write('void InitializeGLBindings%s();\n' % set_name.upper()) file.write('void InitializeDebugGLBindings%s();\n' % set_name.upper()) | file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper()) |
for [returnType, names, arguments] in functions: | for [return_type, names, arguments] in functions: | file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper()) |
(returnType, names[0], arguments)) | (return_type, names[0], arguments)) | file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments)) |
for [returnType, names, arguments] in functions: | for [return_type, names, arguments] in functions: | file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments)) |
setName.upper()) def GenerateSource(file, functions, setName): | set_name.upper()) def GenerateSource(file, functions, set_name): | file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments)) |
for [returnType, names, arguments] in functions: | for [return_type, names, arguments] in functions: | 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.... |
file.write('void InitializeGLBindings%s() {\n' % setName.upper()) for [returnType, names, arguments] in functions: | file.write('void InitializeGLBindings%s() {\n' % set_name.upper()) for [return_type, names, arguments] in functions: | 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.... |
for [returnType, names, arguments] in functions: | for [return_type, names, arguments] in functions: | 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... |
(returnType, names[0], arguments)) argumentNames = re.sub(r'(const )?[a-zA-Z0-9]+\** ([a-zA-Z0-9]+)', r'\2', | (return_type, names[0], arguments)) argument_names = re.sub(r'(const )?[a-zA-Z0-9]+\** ([a-zA-Z0-9]+)', r'\2', | 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... |
if argumentNames == 'void': argumentNames = '' functionName = names[0][2:] if returnType == 'void': | if argument_names == 'void': argument_names = '' function_name = names[0][2:] if return_type == 'void': | 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... |
(functionName, argumentNames)) | (function_name, argument_names)) | 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... |
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.join(dir, 'gl_bindings_autogen_%s.cc' % setName), 'wb') GenerateSource(sourceFile, functions, setName... | 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.path.join(dir, 'gl_bindings_autogen_%s.cc' % set_name), 'wb') GenerateSource(source_file, functions... | 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... |
'<a href="/echo">back to referring page</a></div>' | '<a href="http://localhost:8888/echo">back to referring page</a></div>' | def EchoAllHandler(self): """This handler yields a (more) human-readable page listing information about the request header & contents.""" |
print 'HTTPS server started on port %d...' % server.server_port | print 'HTTPS server started on port %d...' % port | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr... |
print 'HTTP server started on port %d...' % server.server_port | print 'HTTP server started on port %d...' % port | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr... |
listen_port = server.server_port | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr... | |
listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port | print 'FTP server started on port %d...' % port | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr... |
startup_pipe.write(struct.pack('@H', listen_port)) | startup_pipe.write("READY") | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr... |
option_parser.add_option('', '--port', default='0', type='int', help='Port used by the server. If unspecified, the ' 'server will listen on an ephemeral port.') | option_parser.add_option('', '--port', default='8888', type='int', help='Port used by the server.') | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr... |
return "%s.log" % self.name | return os.path.join(self._log_directory(), "%s.log" % self.name) | def queue_log_path(self): return "%s.log" % self.name |
return os.path.join("%s-logs" % self.name, "%s.log" % patch.bug_id()) | return os.path.join(self._log_directory(), "%s.log" % patch.bug_id()) | def work_item_log_path(self, patch): return os.path.join("%s-logs" % self.name, "%s.log" % patch.bug_id()) |
def get_mime_type(filename): return mimetypes.guess_type(filename)[0] or "text/plain" | def _encode_multipart_form_data(fields, files): """Encode form fields for multipart/form-data. Args: fields: A sequence of (name, value) elements for regular form fields. files: A sequence of (name, filename, value) elements for data to be uploaded as files. Returns: (content_type, body) ready for httplib.HTTP instanc... | def get_mime_type(filename): return mimetypes.guess_type(filename)[0] or "text/plain" |
self._browser = Browser() | def __init__(self, host): self._host = host self._browser = Browser() | |
self._browser.open("http://%s/testfile/uploadform" % self._host) self._browser.select_form("test_result_upload") for (name, data) in attrs: self._browser[name] = str(data) for (filename, handle) in file_objs: self._browser.add_file(handle, get_mime_type(filename), filename, "file") self._browser.submit() | url = "http://%s/testfile/upload" % self._host content_type, data = _encode_multipart_form_data(attrs, file_objs) headers = {"Content-Type": content_type} request = urllib2.Request(url, data, headers) urllib2.urlopen(request, timeout=60) | def _upload_files(self, attrs, file_objs): self._browser.open("http://%s/testfile/uploadform" % self._host) self._browser.select_form("test_result_upload") for (name, data) in attrs: self._browser[name] = str(data) |
file_objs = [] | def upload(self, params, files, timeout_seconds): orig_timeout = socket.getdefaulttimeout() file_objs = [] try: file_objs = [(filename, open(path, "rb")) for (filename, path) in files] | |
file_objs = [(filename, open(path, "rb")) for (filename, path) in files] | def upload(self, params, files, timeout_seconds): orig_timeout = socket.getdefaulttimeout() file_objs = [] try: file_objs = [(filename, open(path, "rb")) for (filename, path) in files] | |
for (filename, handle) in file_objs: handle.close() | def upload(self, params, files, timeout_seconds): orig_timeout = socket.getdefaulttimeout() file_objs = [] try: file_objs = [(filename, open(path, "rb")) for (filename, path) in files] | |
self._two_local_commits() | self._three_local_commits() | def test_commit_with_message_git_commit_range(self): self._two_local_commits() |
self._two_local_commits() | self._three_local_commits() | def test_create_patch_git_commit_range(self): self._two_local_commits() scm = detect_scm_system(self.git_checkout_path) patch = scm.create_patch(git_commit="HEAD~2..HEAD") self.assertTrue(re.search(r'test_file_commit2', patch)) self.assertTrue(re.search(r'test_file_commit1', patch)) |
self._two_local_commits() | self._three_local_commits() | def test_changed_files_git_commit_range(self): self._two_local_commits() scm = detect_scm_system(self.git_checkout_path) files = scm.changed_files(git_commit="HEAD~2..HEAD") self.assertTrue('test_file_commit1' in files) self.assertTrue('test_file_commit2' in files) |
if self._options.indirect: return self.GetAnalyzeResultsIndirect() | def Analyze(self, check_sanity=False): if self._options.indirect: return self.GetAnalyzeResultsIndirect() filenames = glob.glob(self.TMP_DIR + "/tsan.*") use_gdb = common.IsMac() analyzer = tsan_analyze.TsanAnalyze(self._source_dir, filenames, use_gdb=use_gdb) ret = analyzer.Report(check_sanity) if ret != 0: logging.in... | |
def _post_to_server(self, queue_name, status, patch, results_file): | def _post_status_to_server(self, queue_name, status, patch, results_file): | def _post_to_server(self, queue_name, status, patch, results_file): if results_file: # We might need to re-wind the file if we've already tried to post it. results_file.seek(0) |
self.browser['queue_name'] = queue_name | self.browser["queue_name"] = queue_name | def _post_to_server(self, queue_name, status, patch, results_file): if results_file: # We might need to re-wind the file if we've already tried to post it. results_file.seek(0) |
self.browser['status'] = status | self.browser["status"] = status | def _post_to_server(self, queue_name, status, patch, results_file): if results_file: # We might need to re-wind the file if we've already tried to post it. results_file.seek(0) |
if not self.host: return | log(status) return NetworkTransaction().run(lambda: self._post_status_to_server(queue_name, status, patch, results_file)) | def update_status(self, queue_name, status, patch=None, results_file=None): # During unit testing, host is None if not self.host: return |
log(status) return NetworkTransaction().run(lambda: self._post_to_server(queue_name, status, patch, results_file)) | def update_svn_revision(self, svn_revision_number, broken_bot): log("SVN revision: %s broke %s" % (svn_revision_number, broken_bot)) return NetworkTransaction().run(lambda: self._post_svn_revision_to_server(svn_revision_number, broken_bot)) | def update_status(self, queue_name, status, patch=None, results_file=None): # During unit testing, host is None if not self.host: return |
slash_chars = "/\\" | def _rel_path(path, start_path, os_path_abspath=None): """Return a path relative to the given start path, or None. Returns None if the path is not contained in the directory start_path. Args: path: An absolute or relative path to convert to a relative path. start_path: The path relative to which the given path should... | |
if rel_path and rel_path[0] not in slash_chars: | if not rel_path: pass elif rel_path[0] == os.sep: rel_path = rel_path.lstrip(os.sep) else: | def _rel_path(path, start_path, os_path_abspath=None): """Return a path relative to the given start path, or None. Returns None if the path is not contained in the directory start_path. Args: path: An absolute or relative path to convert to a relative path. start_path: The path relative to which the given path should... |
rel_path = rel_path.lstrip(slash_chars) | def _rel_path(path, start_path, os_path_abspath=None): """Return a path relative to the given start path, or None. Returns None if the path is not contained in the directory start_path. Args: path: An absolute or relative path to convert to a relative path. start_path: The path relative to which the given path should... | |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(true); | def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """ |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(false); | def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """ |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(true); | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(false); | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(true); | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(false); | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ |
GLsizei num_values = GetNumValuesReturnedForGLGet(pname, &num_values); | GLsizei num_values = 0; GetNumValuesReturnedForGLGet(pname, &num_values); | code = """ typedef %(func_name)s::Result Result; |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(false); | typedef %(name)s::Result Result; |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(true); | def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """ |
SpecializedSetup<%(name)s, 0>(); | SpecializedSetup<%(name)s, 0>(false); | def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """ |
filename = os.path.join(output_dir, test_info.filename) | filename = os.path.join(output_dir, port.relative_test_filename( test_info.filename)) | def process_output(port, test_info, test_types, test_args, target, output_dir, crash, timeout, test_run_time, actual_checksum, output, error): """Receives the output from a test_shell process, subjects it to a number of tests, and returns a list of failure types the test produced. Args: port: port-specific hooks proc:... |
WriteLines('tests/test_c_includes.c', lines) | lines.append('\n WriteLines('tests/all_c_includes.h', 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) |
WriteLines('tests/test_cc_includes.cc', lines) | lines.append('\n WriteLines('tests/all_cpp_includes.h', lines) | 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... |
log("Failed to CC watchers: %s." % e) | traceback.print_exc() log("Failed to CC watchers.") | def _cc_watchers(self, bug_id): try: self.tool.bugs.add_cc_to_bug(bug_id, self.watchers) except Exception, e: log("Failed to CC watchers: %s." % e) |
def should_proceed_with_work_item(self, patch): | def _can_build_and_test(self): try: self.run_bugzilla_tool(["build-and-test", "--force-clean", "--non-interactive", "--build-style=both", "--quiet"]) except ScriptError, e: self._update_status("Unabled to successfully build and test", None) return False return True def _builders_are_green(self): | def should_proceed_with_work_item(self, patch): red_builders_names = self.tool.buildbot.red_core_builders_names() if red_builders_names: red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names. self._update_status("Builders [%s] are red. See http://build.webkit.org" % ",... |
self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch["id"]]) | self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--no-update", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch["id"]]) | def process_work_item(self, patch): try: self._cc_watchers(patch["bug_id"]) self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch["id"]]) self._did_pass(patch) except ScriptError, e: self._did_fail(patch) raise e |
last_hash = line[25:33] if last_hash[0] == '-': last_hash = line[26:34] | last_hash = line[25:41] | def ReadReportsFromFile(filename): """ Returns a list of (report_hash, report) and the URL of the report on the waterfall. """ input_file = file(filename, 'r') # reports is a list of (error hash, report) pairs. reports = [] in_suppression = False cur_supp = [] # This stores the last error hash found while reading the f... |
if self._image_path: driver_args.append('--pixel-tests') | def _driver_args(self): driver_args = [] if self._image_path: driver_args.append('--pixel-tests') | |
if not component or component not in component_names: | if not component: component = "New Bugs" if component not in component_names: | def create_bug(self, bug_title, bug_description, component=None, patch_file_object=None, patch_description=None, cc=None, mark_for_review=False, mark_for_commit_queue=False): self.authenticate() |
proc = subprocess.Popen(['git'] + command, stdout=subprocess.PIPE) | shell = (os.name == 'nt') proc = subprocess.Popen(['git'] + command, shell=shell, stdout=subprocess.PIPE) | def RunGit(command): """Run a git subcommand, returning its output.""" proc = subprocess.Popen(['git'] + command, stdout=subprocess.PIPE) return proc.communicate()[0].strip() |
'--pretty=medium', 'origin'], | '--pretty=medium', 'origin'], shell=shell, | def FindSVNRev(target_rev): """Map an SVN revision to a git hash. Like 'git svn find-rev' but without the git-svn bits.""" # We iterate through the commit log looking for "git-svn-id" lines, # which contain the SVN revision of that commit. We can stop once # we've found our target (or hit a revision number lower than... |
def RenderPages(names, test_shell): | def RenderPage(name, test_shell): | def RenderPages(names, test_shell): """ Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html """ if not names: raise Exception("RenderPage called with empty names param") generator_url = "file:" + urllib.pathname2url(_generator_html) generator_url += "?" + ",".join(... |
Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html | Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html | def RenderPages(names, test_shell): """ Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html """ if not names: raise Exception("RenderPage called with empty names param") generator_url = "file:" + urllib.pathname2url(_generator_html) generator_url += "?" + ",".join(... |
if not names: raise Exception("RenderPage called with empty names param") generator_url = "file:" + urllib.pathname2url(_generator_html) generator_url += "?" + ",".join(names) originals = {} for name in names: input_file = _base_dir + "/" + name + ".html" if (os.path.isfile(input_file)): originals[name] = open(inp... | if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + name + ".html" original = None if (os.path.isfile(input_file)): original = open(input_file, 'rb').read() os.remove(input_file) shutil.copy(_pag... | def RenderPages(names, test_shell): """ Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html """ if not names: raise Exception("RenderPage called with empty names param") generator_url = "file:" + urllib.pathname2url(_generator_html) generator_url += "?" + ",".join(... |
p = Popen( [test_shell, "--layout-tests", "--time-out-ms=30000", generator_url], | p = Popen([test_shell, "--layout-tests", generator_url], | def RenderPages(names, test_shell): """ Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html """ if not names: raise Exception("RenderPage called with empty names param") generator_url = "file:" + urllib.pathname2url(_generator_html) generator_url += "?" + ",".join(... |
output = p.stdout.read() begin = output.find(_expected_output_preamble) end = output.rfind(_expected_output_postamble) if (begin < 0 or end < 0): raise Exception ("test_shell returned invalid output:\n\n" + output) begin += len(_expected_output_preamble) try: output_parsed = json.loads(output[begin:end]) except Va... | result = p.stdout.read() content_start = result.find(_expected_output_preamble) content_end = result.find(_expected_output_postamble) if (content_start < 0): if (result.startswith(" raise Exception("test_shell returned TEST_TIMED_OUT.\n" + "Their was probably a problem with generating the " + "page\n" + "Try copying t... | def RenderPages(names, test_shell): """ Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html """ if not names: raise Exception("RenderPage called with empty names param") generator_url = "file:" + urllib.pathname2url(_generator_html) generator_url += "?" + ",".join(... |
search_locations.append(chrome_dir + "/Debug/test_shell.exe") | 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... | |
search_locations.append(src_dir + "/sconsbuild/Debug/test_shell") search_locations.append(src_dir + "/out/Debug/test_shell") | 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... | |
search_locations.append(src_dir + "/xcodebuild/Debug/TestShell.app/Contents/MacOS/TestShell") | 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... | |
modified_files = RenderPages(page_names, test_shell) | modified_files = [] for page in page_names: modified_file = RenderPage(page, test_shell) if (modified_file): modified_files.append(modified_file) | 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 ... |
A notification can be canceled even if it has not been shown yet. | This function should NOT be called until |WaitForNotificationCount| has been used to verify the notification is showing. This function cannot be used to cancel a notification that is in the display queue. | def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id. |
self._CallJavascriptFunc( | msg = self._CallJavascriptFunc( | def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id. |
self.assertEquals(len(self.GetActiveNotifications()), 1) | self.assertEquals(1, len(self.GetActiveNotifications())) | def testCreateSimpleNotification(self): """Creates a simple notification.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateSimpleNotification('no_such_file.png', 'My Title', 'My Body') self.assertEquals(len(self.GetActiveNotifications()), 1) notification = self.GetActiveNotifications()[0] h... |
self.assertEquals(len(self.GetActiveNotifications()), 1) | self.assertEquals(1, len(self.GetActiveNotifications())) | def testCreateHTMLNotification(self): """Creates an HTML notification using a fake url.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(len(self.GetActiveNotifications()), 1) notification = self.GetActiveNotifications()[0] self.assertEqu... |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testCloseNotification(self): """Creates a notification and closes it.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.CloseNotification(0) self.assertEquals(len(self.GetActiveNotifications()), 0) |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testCancelNotification(self): """Creates a notification and cancels it in the origin page.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) note_id = self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertNotEquals(-1, note_id) self._CancelNotification(note_id) self.assertEquals(len(self.GetActi... |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testPermissionInfobarAppears(self): """Requests notification privileges and verifies the infobar appears.""" self.NavigateToURL(self.TEST_PAGE_URL) self._RequestPermission() self.assertTrue(self.WaitForInfobarCount(1)) self.assertEquals(len(self.GetActiveNotifications()), 0) self._VerifyInfobar('') # file:/// orig... |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testAllowOnPermissionInfobar(self): """Tries to create a notification and clicks allow on the infobar.""" self.NavigateToURL(self.TEST_PAGE_URL) # This notification should not be shown because we don't have permission. self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(len(self.GetActiveNotifications(... |
(len(parts[ii]) > 0 and not parts[ii][0] == ")") | (len(parts[ii]) > 0 and not parts[ii][0] == ")" and not fptr.match(parts[ii])) | def __FindSplit(self, string): """Finds a place to split a string.""" splitter = string.find('=') if splitter >= 0 and not string[splitter + 1] == '=' and splitter < 80: return splitter parts = string.split('(') if len(parts) > 1: splitter = len(parts[0]) for ii in range(1, len(parts)): if (not parts[ii - 1][-3:] == "i... |
def __init__(self, filename, file_comment = None): | def __init__(self, filename, file_comment = None, guard_depth = None): | def __init__(self, filename, file_comment = None): CWriter.__init__(self, filename) |
base = os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) hpath = os.path.abspath(filename)[len(base) + 1:] | if guard_depth == None: hpath = os.path.relpath(filename) else: base = os.path.abspath(filename) for i in xrange(0, guard_depth): base = os.path.dirname(base) hpath = os.path.relpath(base) | def __init__(self, filename, file_comment = None): CWriter.__init__(self, filename) |
file.Write("}\n"); | file.Write("}\n\n"); | def WriteServiceUtilsImplementation(self, filename): """Writes the gles2 auto generated utility implementation.""" file = CHeaderWriter(filename) enums = sorted(_ENUM_LISTS.keys()) for enum in enums: if len(_ENUM_LISTS[enum]['valid']) > 0: file.Write("static %s valid_%s_table[] = {\n" % (_ENUM_LISTS[enum]['type'], ToUn... |
gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h") gen.WriteFormat("common/gles2_cmd_format_autogen.h") gen.WriteFormatTest("common/gles2_cmd_format_test_autogen.h") gen.WriteGLES2ImplementationHeader("client/gles2_implementation_autogen.h") gen.WriteGLES2CLibImplementation("client/gles2_c_lib_autogen.h") gen.WriteC... | if options.alternate_mode == "ppapi": gen.WritePepperGLES2Interface("ppapi/c/ppb_opengles.h") elif options.alternate_mode == "chrome_ppapi": gen.WritePepperGLES2Implementation("webkit/glue/plugins/pepper_graphics_3d_gl.cc") else: gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h") gen.WriteFormat("common/gles2_cmd_... | 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 ... |
Committer("Dumitru Daniliuc", "dumi@chromium.org", "dumi"), | def __init__(self, name, email_or_emails, irc_nickname=None): Committer.__init__(self, name, email_or_emails, irc_nickname) self.can_review = True | |
if name == 'BufferData': | if name == 'BufferData' or name == 'BufferSubData': | def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" # TODO(gman): Move this data to _FUNCTION_INFO? name = func.name if name.endswith("Immediate"): name = name[0:-9] if name == 'BufferData': file.Write(" uint32 data_size = size;\n") elif name == 'BufferSubData': file.Write(" uint32 data_siz... |
elif name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif name == 'CompressedTexImage2D': | elif (name == 'CompressedTexImage2D' or name == 'CompressedTexSubImage2D'): | def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" # TODO(gman): Move this data to _FUNCTION_INFO? name = func.name if name.endswith("Immediate"): name = name[0:-9] if name == 'BufferData': file.Write(" uint32 data_size = size;\n") elif name == 'BufferSubData': file.Write(" uint32 data_siz... |
elif name == 'CompressedTexSubImage2D': file.Write(" uint32 data_size = imageSize;\n") elif name == 'TexImage2D': file.Write(" uint32 data_size = GLES2Util::ComputeImageDataSize(\n") file.Write(" width, height, format, type, unpack_alignment_);\n") elif name == 'TexSubImage2D': file.Write(" uint32 data_size = G... | elif name == 'TexImage2D' or name == 'TexSubImage2D': code = """ uint32 data_size; if (!GLES2Util::ComputeImageDataSize( width, height, format, type, unpack_alignment_, &data_size)) { return error::kOutOfBounds; } """ file.Write(code) | def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" # TODO(gman): Move this data to _FUNCTION_INFO? name = func.name if name.endswith("Immediate"): name = name[0:-9] if name == 'BufferData': file.Write(" uint32 data_size = size;\n") elif name == 'BufferSubData': file.Write(" uint32 data_siz... |
file.Write(" uint32 data_size = n * sizeof(GLuint);\n") | code = """ uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } """ file.Write(code) | def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = n * sizeof(GLuint);\n") |
file.Write(" %s params;\n" % last_arg.type) file.Write(" GLsizei num_values = util_.GLGetNumValuesReturned(pname);\n") file.Write(" uint32 params_size = num_values * sizeof(*params);\n") file.Write(" params = GetSharedMemoryAs<%s>(\n" % last_arg.type) file.Write(" c.params_shm_id, c.params_shm_offset, params_s... | code = """ %(last_arg_type)s params; GLsizei num_values = util_.GLGetNumValuesReturned(pname); uint32 params_size; if (!SafeMultiplyUint32(num_values, sizeof(*params), ¶ms_size)) { return error::kOutOfBounds; } params = GetSharedMemoryAs<%(last_arg_type)s>( c.params_shm_id, c.params_shm_offset, params_size); """ fi... | def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) last_arg = func.GetLastOriginalArg() |
file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count)) | code = """ uint32 data_size; if (!ComputeDataSize(1, sizeof(%s), %d, &data_size)) { return error::kOutOfBounds; } """ file.Write(code % (func.info.data_type, func.info.count)) if func.is_immediate: file.Write(" if (data_size > immediate_data_size) {\n") file.Write(" return error::kOutOfBounds;\n") file.Write(" }\... | def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.