rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
code = """%(return_type)s %(name)s(%(typed_args)s) { if (%(count_name)s < 0) { SetGLError(GL_INVALID_VALUE, "gl%(name)s: n < 0"); return; } %(resource_type)s_id_handler_->FreeIds(%(args)s); helper_->%(name)sImmediate(%(args)s); } """ file.Write(code % {
args = {
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: code = """%(return_type)s %(name)s(%(typed_args)s) {
dd338377948baa4520f90f4c2447926216be4728 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dd338377948baa4520f90f4c2447926216be4728/build_gles2_cmd_buffer.py
})
} file.Write("%(return_type)s %(name)s(%(typed_args)s) {\n" % args) for arg in func.GetOriginalArgs(): arg.WriteClientSideValidationCode(file, func) code = """%(resource_type)s_id_handler_->FreeIds(%(args)s); helper_->%(name)sImmediate(%(args)s); } """ file.Write(code % args)
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: code = """%(return_type)s %(name)s(%(typed_args)s) {
dd338377948baa4520f90f4c2447926216be4728 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dd338377948baa4520f90f4c2447926216be4728/build_gles2_cmd_buffer.py
if (!ComputeDataSize(1, sizeof(%s), %d, &data_size)) {
if (!ComputeDataSize(count, sizeof(%s), %d, &data_size)) {
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" code = """ uint32 data_size;
dd338377948baa4520f90f4c2447926216be4728 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dd338377948baa4520f90f4c2447926216be4728/build_gles2_cmd_buffer.py
impl_func = func.GetInfo('ImplFunc')
impl_func = func.GetInfo('impl_func')
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention declaration.""" impl_func = func.GetInfo('ImplFunc') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) fi...
6c4fe0ef46535ebba611f6f975e0b4c46e0788ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6c4fe0ef46535ebba611f6f975e0b4c46e0788ca/build_gles2_cmd_buffer.py
'layout_test')
'layout_tests')
def __init__(self, platform, options): self._file_dir = path_utils.PathFromBase('webkit', 'tools', 'layout_test') self._platform = platform self._options = options self._rebaselining_tests = [] self._rebaselined_tests = []
09e51b86eae4f21ee440c2b962a916cff09d0709 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09e51b86eae4f21ee440c2b962a916cff09d0709/rebaseline_chromium_webkit_tests.py
URI.
URI. The 'pid' key-value pair may be omitted or invalid if the notification is closing.
def GetActiveNotifications(self): """Gets a list of the currently active/shown HTML5 notifications.
7893601dae3f70e049055afa5c6cbc2cac3f65c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7893601dae3f70e049055afa5c6cbc2cac3f65c4/pyauto.py
u'origin_url': 'http://www.corp.google.com/'},
u'origin_url': 'http://www.corp.google.com/', u'pid': 8505},
def GetActiveNotifications(self): """Gets a list of the currently active/shown HTML5 notifications.
7893601dae3f70e049055afa5c6cbc2cac3f65c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7893601dae3f70e049055afa5c6cbc2cac3f65c4/pyauto.py
u'origin_url': 'http://www.gmail.com/'}]
u'origin_url': 'http://www.gmail.com/', u'pid': 9291}]
def GetActiveNotifications(self): """Gets a list of the currently active/shown HTML5 notifications.
7893601dae3f70e049055afa5c6cbc2cac3f65c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7893601dae3f70e049055afa5c6cbc2cac3f65c4/pyauto.py
if self._errors: logging.error("FAIL! There were %s errors: " % len(self._errors))
if cur_report_errors: logging.error("FAIL! There were %s errors: " % len(cur_report_errors))
def Report(self, files, check_sanity=False): '''Reads in a set of files and prints Memcheck report.
9c9514b68568eaba866e2f5665de444b6b385072 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9c9514b68568eaba866e2f5665de444b6b385072/memcheck_analyze.py
if name == 'BufferData' or name == 'BufferSubData':
if name == 'BufferData':
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' or name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif (name == 'CompressedTexImag...
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
elif (name == 'CompressedTexImage2D' or name == 'CompressedTexSubImage2D'):
elif name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif name == 'CompressedTexImage2D':
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' or name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif (name == 'CompressedTexImag...
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
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)
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...
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' or name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif (name == 'CompressedTexImag...
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
code = """ uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } """ file.Write(code)
file.Write(" uint32 data_size = n * sizeof(GLuint);\n")
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" code = """ uint32 data_size;
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
code = """ uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } """ file.Write(code)
file.Write(" uint32 data_size = n * sizeof(GLuint);\n")
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" code = """ uint32 data_size;
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
code = """ %(last_arg_type)s params; GLsizei num_values = util_.GLGetNumValuesReturned(pname); uint32 params_size; if (!SafeMultiplyUint32(num_values, sizeof(*params), &params_size)) { return error::kOutOfBounds; } params = GetSharedMemoryAs<%(last_arg_type)s>( c.params_shm_id, c.params_shm_offset, params_size); """ fi...
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...
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()
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
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(" }\...
file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" code = """ uint32 data_size;
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
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(" }\...
file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" code = """ uint32 data_size;
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
if (bufsize > 0) { std::string str; if (GetBucketAsString(kResultBucketId, &str)) { GLsizei max_size = std::min(static_cast<size_t>(%(bufsize_name)s) - 1, str.size()); if (%(length_name)s != NULL) { *%(length_name)s = max_size; } memcpy(%(dest_name)s, str.c_str(), max_size); %(dest_name)s[max_size] = '\\0';
std::string str; if (GetBucketAsString(kResultBucketId, &str)) { GLsizei max_size = std::min(static_cast<size_t>(%(bufsize_name)s) - 1, str.size()); if (%(length_name)s != NULL) { *%(length_name)s = max_size;
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) {
5340d83973560965f01cab2831a24ab9af362aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5340d83973560965f01cab2831a24ab9af362aaf/build_gles2_cmd_buffer.py
proc += ["-no_check_leaks", "-no_count_leaks"]
def ToolCommand(self): """Get the valgrind command to run.""" tool_name = self.ToolName()
f4fa9fc2af2ce3d5007f7ebd7d88cb2b38b80796 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f4fa9fc2af2ce3d5007f7ebd7d88cb2b38b80796/valgrind_test.py
" .WillOnce(SetArgumentPointee<2>(strlen(kInfo)));") % (
" .WillOnce(SetArgumentPointee<2>(strlen(kInfo) + 1));") % (
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
86ff3ca0ec5667c19e24328a15befb8ff09d9a93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/86ff3ca0ec5667c19e24328a15befb8ff09d9a93/build_gles2_cmd_buffer.py
lambda: self.FindInPage('data', tab_index=1)['match_count'],
lambda: self.FindInPage(search_query, tab_index=1)['match_count'],
def testSearchWithinSpecialURL(self): """Verify search for text within special URLs such as chrome:history. chrome://history, chrome://downloads, pyAuto Data directory """ zip_file = 'a_zip_file.zip' self.NavigateToURL(self.GetFileURLForPath(self.DataDir())) # search in Data directory self.assertEqual(1, self.FindInPag...
5fdc13c2895e0ca9c0f4d9fdf4a934fc33d4ee2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fdc13c2895e0ca9c0f4d9fdf4a934fc33d4ee2b/find_in_page.py
self.assertEqual(1, self.FindInPage('data', tab_index=1)['match_count'])
self.assertEqual( 1, self.FindInPage(search_query, tab_index=1)['match_count'])
def testSearchWithinSpecialURL(self): """Verify search for text within special URLs such as chrome:history. chrome://history, chrome://downloads, pyAuto Data directory """ zip_file = 'a_zip_file.zip' self.NavigateToURL(self.GetFileURLForPath(self.DataDir())) # search in Data directory self.assertEqual(1, self.FindInPag...
5fdc13c2895e0ca9c0f4d9fdf4a934fc33d4ee2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fdc13c2895e0ca9c0f4d9fdf4a934fc33d4ee2b/find_in_page.py
bin_dirs = [ os.path.join(chrome_src, 'xcodebuild', 'Debug'), os.path.join(chrome_src, 'xcodebuild', 'Release'), ] for d in bin_dirs: sys.path.append(os.path.normpath(d))
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, 'sconsbuild', 'Release')], 'darwin': [ os.path.join(chrome_src, 'xcodebuild', 'Debug'), os.path.join(chrome_src, 'xcodebuild', 'Release...
def _LocateBinDirs(): script_dir = os.path.dirname(__file__) chrome_src = os.path.join(script_dir, os.pardir, os.pardir, os.pardir) # TODO(nirnimesh): Expand this to include win/linux build dirs # crbug.com/32285 bin_dirs = [ os.path.join(chrome_src, 'xcodebuild', 'Debug'), os.path.join(chrome_src, 'x...
ac820cb37a27715256ee76898e3b31d0f5cbe71e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ac820cb37a27715256ee76898e3b31d0f5cbe71e/pyauto.py
'.*closed.*'))
'(?i).*closed.*'))
def CheckChangeOnCommit(input_api, output_api): results = [] if not input_api.json: results.append(output_api.PresubmitNotifyResult( 'You don\'t have json nor simplejson installed.\n' ' This is a warning that you will need to upgrade your python ' 'installation.\n' ' This is no big deal but you\'ll eventually need to...
b37e35fe9858d47602193dd738ba4b39cd016e90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b37e35fe9858d47602193dd738ba4b39cd016e90/PRESUBMIT.py
subprocess.call(cmd, shell=shell)
return subprocess.call(cmd, shell=shell) else: return 0
def _RunCommand(cmd, dry_run, shell=False, echo_cmd=True): """Runs the command if dry_run is false, otherwise just prints the command.""" if echo_cmd: print cmd # TODO(wtc): Check the return value of subprocess.call, which is the return # value of the command. if not dry_run: subprocess.call(cmd, shell=shell)
a2f96b95f19b75486a9013d2d670330315bd8202 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a2f96b95f19b75486a9013d2d670330315bd8202/coverity.py
_RunCommand(cmd, options.dry_run, shell=True)
gclient_exit = _RunCommand(cmd, options.dry_run, shell=True) if gclient_exit != 0: print 'gclient aborted with status %s' % gclient_exit _ReleaseLock(lock_file, lock_filename) sys.exit(1)
def main(options, args): """Runs all the selected tests for the given build type and target.""" # Create the lock file to prevent another instance of this script from # running. lock_filename = os.path.join(options.source_dir, LOCK_FILE) try: lock_file = os.open(lock_filename, os.O_CREAT | os.O_EXCL | os.O_TRUNC | os.O...
a2f96b95f19b75486a9013d2d670330315bd8202 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a2f96b95f19b75486a9013d2d670330315bd8202/coverity.py
print 'Platform "%s" unrecognized, don\'t know how to proceed'
print 'Platform "%s" unrecognized, aborting' % sys.platform
def main(options, args): """Runs all the selected tests for the given build type and target.""" # Create the lock file to prevent another instance of this script from # running. lock_filename = os.path.join(options.source_dir, LOCK_FILE) try: lock_file = os.open(lock_filename, os.O_CREAT | os.O_EXCL | os.O_TRUNC | os.O...
a2f96b95f19b75486a9013d2d670330315bd8202 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a2f96b95f19b75486a9013d2d670330315bd8202/coverity.py
print action
if hash_output: hash = hashlib.md5() hash.update(action) print >>f, '0x%s\t%s' % (hash.hexdigest()[:16], action) else: print action if hash_output: print "Done. Do not forget to add chromeactions.txt to your changelist"
def main(argv): actions = set() AddComputedActions(actions) # TODO(fmantek): bring back webkit editor actions. # AddWebKitEditorActions(actions) # Walk the source tree to process all .cc files. chrome_root = os.path.join(path_utils.ScriptDir(), '..') WalkDirectory(chrome_root, actions) webkit_root = os.path.join(path_...
ca6f27a0ead1e5e1150457020ab62c2ebca91bcc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ca6f27a0ead1e5e1150457020ab62c2ebca91bcc/extract_actions.py
return self.GetPrefsInfo().Prefs(pyauto.kDesktopNotificationDeniedOrigins)
return (self.GetPrefsInfo().Prefs(pyauto.kDesktopNotificationDeniedOrigins) or [])
def _GetDeniedOrigins(self): """Gets the list of origins that are explicitly denied to create notifications. """ return self.GetPrefsInfo().Prefs(pyauto.kDesktopNotificationDeniedOrigins)
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
return self.GetPrefsInfo().Prefs(pyauto.kDesktopNotificationAllowedOrigins)
return (self.GetPrefsInfo().Prefs(pyauto.kDesktopNotificationAllowedOrigins) or [])
def _GetAllowedOrigins(self): """Gets the list of origins that are explicitly allowed to create notifications. """ return self.GetPrefsInfo().Prefs(pyauto.kDesktopNotificationAllowedOrigins)
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
denied = self._GetDeniedOrigins() or []
denied = self._GetDeniedOrigins()
def _DenyOrigin(self, new_origin): """Denies the given origin to create notifications.
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
allowed = self._GetAllowedOrigins() or []
allowed = self._GetAllowedOrigins()
def _AllowOrigin(self, new_origin): """Allows the given origin to create notifications. If it was explicitly denied, that preference is dropped. """ self._DropOriginPreference(new_origin) allowed = self._GetAllowedOrigins() or [] if new_origin not in allowed: self._SetAllowedOrigins(allowed + [new_origin])
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
[img_url, title, text, replace_id], tab_index, windex);
[img_url, title, text, replace_id], tab_index, windex);
def _CreateSimpleNotification(self, img_url, title, text, replace_id='', tab_index=0, windex=0): """Creates a simple notification.
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
[content_url, replace_id], tab_index, windex)
[content_url, replace_id], tab_index, windex)
def _CreateHTMLNotification(self, content_url, replace_id='', tab_index=0, windex=0): """Creates an HTML notification.
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
self.CallJavascriptFunc('requestPermission', [], windex, tab_index)
self.CallJavascriptFunc('requestPermission', [], tab_index, windex)
def _RequestPermission(self, tab_index=0, windex=0): """Requests permission to create notifications.
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
self.PerformActionOnInfobar('accept', infobar_index=0)
self.PerformActionOnInfobar('accept', 0)
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 do not have permission. self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertFalse(self.GetActiveNotifications())
fe2195535c8e501e53c4ebb04ff50aad34592d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fe2195535c8e501e53c4ebb04ff50aad34592d4a/notifications.py
return int(os.popen2("sysctl -n hw.ncpu")[1].read())
cmd = ['/usr/sbin/sysctl', '-n', 'hw.ncpu'] return int(subprocess.Popen(cmd, stdout=subprocess.PIPE).stdout.read())
def get_num_cores(): """Returns the number of cores on the machine. For hyperthreaded machines, this will be double the number of actual processors.""" return int(os.popen2("sysctl -n hw.ncpu")[1].read())
e5bd8090187e7c39406fe10d637dce356fb2bd01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e5bd8090187e7c39406fe10d637dce356fb2bd01/platform_utils_mac.py
], debug=True)
], debug=False)
def check(self, path, expectedUrl, expectedChannel): actual = self.getSrcUrl(path) if (actual[0] != expectedUrl): self.response.out.write('<span style="color:#f00;">Failure:</span> path ' + path + " gave url " + actual[0] + "<br/>") elif (actual[1] != expectedChannel): self.response.out.write('<span style="color:#f00;"...
77281d7341478d7fce3468aa3c563f91eb57918b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/77281d7341478d7fce3468aa3c563f91eb57918b/chromeextensionsdocs.py
retcode = self.Run(cmdlist)
retcode = self.Run(cmdlist, ignore_retcode=True)
def RunTests(self): """Run all unit tests and generate appropriate lcov files.""" self.BeforeRunAllTests() for fulltest in self.tests: if not os.path.exists(fulltest): logging.info(fulltest + ' does not exist') if self.options.strict: sys.exit(2) else: logging.info('%s path exists' % fulltest) cmdlist = [fulltest, '--g...
a0edf806d6f1916aa5543a8f57c09d04057cd8d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a0edf806d6f1916aa5543a8f57c09d04057cd8d5/coverage_posix.py
"app": self.TestApp, "app_unittests": self.TestApp,
"app": self.TestApp, "app_unittests": self.TestApp,
def __init__(self, options, args, test): # The known list of tests. # Recognise the original abbreviations as well as full executable names. self._test_list = { "base": self.TestBase, "base_unittests": self.TestBase, "browser": self.TestBrowser, "browser_tests": self.TestBrowser, "googleurl": self.TestG...
266c8bf322f9ea782e4f3563385432e3e3235f29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/266c8bf322f9ea782e4f3563385432e3e3235f29/chrome_tests.py
file.Write("static %s valid_%s_table[] = {\n" % (_ENUM_LISTS[enum]['type'], ToUnderscore(enum))) for value in _ENUM_LISTS[enum]['valid']: file.Write(" %s,\n" % value) file.Write("};\n") file.Write("\n")
if len(_ENUM_LISTS[enum]['valid']) > 0: file.Write("static %s valid_%s_table[] = {\n" % (_ENUM_LISTS[enum]['type'], ToUnderscore(enum))) for value in _ENUM_LISTS[enum]['valid']: file.Write(" %s,\n" % value) file.Write("};\n") file.Write("\n")
def WriteServiceUtilsImplementation(self, filename): """Writes the gles2 auto generated utility implementation.""" file = CHeaderWriter(filename) enums = sorted(_ENUM_LISTS.keys()) for enum in enums: file.Write("static %s valid_%s_table[] = {\n" % (_ENUM_LISTS[enum]['type'], ToUnderscore(enum))) for value in _ENUM_LIST...
149374213c09cea5be5db907a13bd7cad2ce11f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/149374213c09cea5be5db907a13bd7cad2ce11f0/build_gles2_cmd_buffer.py
code = """ %(pre)s%(name)s( valid_%(name)s_table, arraysize(valid_%(name)s_table))%(post)s
if len(_ENUM_LISTS[enum]['valid']) > 0: code = """ %(pre)s%(name)s( valid_%(name)s_table, arraysize(valid_%(name)s_table))%(post)s """ else: code = """ %(pre)s%(name)s()%(post)s
def WriteServiceUtilsImplementation(self, filename): """Writes the gles2 auto generated utility implementation.""" file = CHeaderWriter(filename) enums = sorted(_ENUM_LISTS.keys()) for enum in enums: file.Write("static %s valid_%s_table[] = {\n" % (_ENUM_LISTS[enum]['type'], ToUnderscore(enum))) for value in _ENUM_LIST...
149374213c09cea5be5db907a13bd7cad2ce11f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/149374213c09cea5be5db907a13bd7cad2ce11f0/build_gles2_cmd_buffer.py
if (%(name)s != 0u && !id_manager()->GetServiceId(%(name)s, &%(name)s)) { SetGLError(GL_INVALID_VALUE); return error::kNoError; }
def WriteGetCode(self, file): """Overridden from Argument.""" code = """ %(type)s %(name)s = c.%(name)s;
ffed30885a5a60b1a1890fbb82a6c28a0cf39734 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ffed30885a5a60b1a1890fbb82a6c28a0cf39734/build_gles2_cmd_buffer.py
src_dir = sys.argv[0]; if sys.platform != 'cygwin': src_dir = os.path.abspath(sys.argv[0]) print src_dir src_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(src_dir)))))
src_dir = os.path.abspath(os.path.join(sys.path[0], '..', '..', '..'))
def main(): cmd = [sys.executable] src_dir = sys.argv[0]; if sys.platform != 'cygwin': src_dir = os.path.abspath(sys.argv[0]) print src_dir src_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(src_dir))))) script_dir=os.path.join(src_dir, "third_party", "WebKit", "WebKitTools", "Scripts...
dc86777ec582115953f021e8238a9d7c639415a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dc86777ec582115953f021e8238a9d7c639415a4/run_webkit_tests.py
return '%s_main.scons' % GypBuilder.base_name
return '%s.Makefile' % GypBuilder.base_name
def GetSolutionPath(self): """Gets the solution path.""" return '%s_main.scons' % GypBuilder.base_name
a7ad4ba1c73e576e753e9483209664c779854472 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a7ad4ba1c73e576e753e9483209664c779854472/gypbuild.py
solution = self.GetSolutionPath() self.Execute(['hammer', '-f', solution, '--clean'])
print "clean not implemented for this platform."
def CleanTargets(self, targets, options): """Cleans the targets.""" solution = self.GetSolutionPath() self.Execute(['hammer', '-f', solution, '--clean'])
a7ad4ba1c73e576e753e9483209664c779854472 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a7ad4ba1c73e576e753e9483209664c779854472/gypbuild.py
self.Execute(['hammer', '-f', solution])
self.Execute(['make', '-f', solution])
def Dobuild(self, targets, options): """Builds the specifed targets.""" solution = self.GetSolutionPath() self.Execute(['hammer', '-f', solution])
a7ad4ba1c73e576e753e9483209664c779854472 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a7ad4ba1c73e576e753e9483209664c779854472/gypbuild.py
for root, directories, files in os.walk(path):
for root, directories, files in sorted_walk(path):
def _locateManifestsFromPath(self, path): """ Returns a list of paths to sample extension manifest.json files.
fa44cc1846e1a35945d0fadfa3fdb6ef96741229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa44cc1846e1a35945d0fadfa3fdb6ef96741229/directory.py
for root, dirs, files in os.walk(extension_dir_path):
for root, dirs, files in sorted_walk(extension_dir_path):
def _parse_api_calls(self, api_methods): """ Returns a list of Chrome extension API calls the sample makes.
fa44cc1846e1a35945d0fadfa3fdb6ef96741229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa44cc1846e1a35945d0fadfa3fdb6ef96741229/directory.py
for root, directories, files in os.walk(base_path):
for root, directories, files in sorted_walk(base_path):
def _parse_source_files(self): """ Returns a list of paths to source files present in the extenion.
fa44cc1846e1a35945d0fadfa3fdb6ef96741229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa44cc1846e1a35945d0fadfa3fdb6ef96741229/directory.py
for root, dirs, files in os.walk(sample_path):
for root, dirs, files in sorted_walk(sample_path):
def write_zip(self): """ Writes a zip file containing all of the files in this Sample's dir.""" sample_path = os.path.realpath(os.path.dirname(self._manifest_path)) sample_dirname = os.path.basename(sample_path) sample_parentpath = os.path.dirname(sample_path)
fa44cc1846e1a35945d0fadfa3fdb6ef96741229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa44cc1846e1a35945d0fadfa3fdb6ef96741229/directory.py
zip_file.close()
zip_file.close()
def write_zip(self): """ Writes a zip file containing all of the files in this Sample's dir.""" sample_path = os.path.realpath(os.path.dirname(self._manifest_path)) sample_dirname = os.path.basename(sample_path) sample_parentpath = os.path.dirname(sample_path)
fa44cc1846e1a35945d0fadfa3fdb6ef96741229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa44cc1846e1a35945d0fadfa3fdb6ef96741229/directory.py
if get_len_func[0:2] == 'gl':
if get_len_func and get_len_func[0:2] == 'gl':
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
065b4a3125cf60a0495f6251f07047de69883cd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/065b4a3125cf60a0495f6251f07047de69883cd5/build_gles2_cmd_buffer.py
return [''.join(report_lines) for report_lines in self.reports]
return [''.join(map(str, report_lines)) for report_lines in self.reports]
def GetReports(self, files): '''Extracts reports from a set of files.
3c0046084c1fc0ef1968c7def467578fd8f468a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3c0046084c1fc0ef1968c7def467578fd8f468a0/tsan_analyze.py
'<a href="http://localhost:8888/echo">back to referring page</a></div>'
'<a href="/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."""
df0401f579455dcc6e70ad63ffae1704549cf148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df0401f579455dcc6e70ad63ffae1704549cf148/testserver.py
print 'HTTPS server started on port %d...' % port
print 'HTTPS server started on port %d...' % 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...
df0401f579455dcc6e70ad63ffae1704549cf148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df0401f579455dcc6e70ad63ffae1704549cf148/testserver.py
print 'HTTP server started on port %d...' % port
print 'HTTP server started on port %d...' % 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...
df0401f579455dcc6e70ad63ffae1704549cf148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df0401f579455dcc6e70ad63ffae1704549cf148/testserver.py
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...
df0401f579455dcc6e70ad63ffae1704549cf148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df0401f579455dcc6e70ad63ffae1704549cf148/testserver.py
print 'FTP server started on port %d...' % port
listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_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...
df0401f579455dcc6e70ad63ffae1704549cf148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df0401f579455dcc6e70ad63ffae1704549cf148/testserver.py
startup_pipe.write("READY")
startup_pipe.write(struct.pack('@H', listen_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...
df0401f579455dcc6e70ad63ffae1704549cf148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df0401f579455dcc6e70ad63ffae1704549cf148/testserver.py
option_parser.add_option('', '--port', default='8888', type='int', help='Port used by the server.')
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.')
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...
df0401f579455dcc6e70ad63ffae1704549cf148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df0401f579455dcc6e70ad63ffae1704549cf148/testserver.py
self.assertEqual('google.com/', self.GetOmniboxInfo().Text())
self.assertTrue('google.com' in self.GetOmniboxInfo().Text())
def testInlinAutoComplete(self): """Verify inline autocomplete for a pre-visited url.""" self.NavigateToURL('http://www.google.com') matches = self._GetOmniboxMatchesFor('goog') self.assertTrue(matches) # Omnibox should suggest auto completed url as the first item matches_description = matches[0] self.assertTrue('www.g...
fcb5b90f9ac601fe50bc29f3f99b1386fd9bd46f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fcb5b90f9ac601fe50bc29f3f99b1386fd9bd46f/omnibox.py
parser = optparse.OptionParser('Usage: %prog [options] <files>')
parser = optparse.OptionParser(usage=_USAGE, description=_DESCRIPTION)
def ParseCommandLine(): """Constructs and configures an option parser for this script and parses the command line arguments. Returns: The parsed options. """ parser = optparse.OptionParser('Usage: %prog [options] <files>') parser.add_option('-i', '--input', dest='input', help='An archive file to append to.') parser.ad...
dd99051836d6996da5a9106a662d026831c2f49b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dd99051836d6996da5a9106a662d026831c2f49b/zipfiles.py
if options.path:
if path == _DEBUG_ONLY_FILE_SEPARATOR: if options.config != 'Debug': break elif options.path:
def Main(): """Zip input arguments to Zip output archive.""" (options, args) = ParseCommandLine() # Test that all the input files exist before we blow the output archive away # only to fail part way. for path in args: if not os.path.exists(path): raise Exception('Input file does not exist:', path) if os.path.isdir(pat...
dd99051836d6996da5a9106a662d026831c2f49b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dd99051836d6996da5a9106a662d026831c2f49b/zipfiles.py
self.assertTrue(location.startswith('http://www.google.com'))
self.assertTrue('google.com' in location)
def testInstantNavigation(self): """Test that instant navigates based on omnibox input.""" self.SetOmniboxText('google.com') self.assertTrue(self.WaitUntil(self._DoneLoading)) location = self.GetInstantInfo()['location'] self.assertTrue(location.startswith('http://www.google.com'))
f60453c64510385cc124dcf8cce6e5b1ea501b73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f60453c64510385cc124dcf8cce6e5b1ea501b73/instant.py
self.assertTrue(location.startswith('http://www.bing.com'))
self.assertTrue('bing.com' in location)
def testInstantNavigation(self): """Test that instant navigates based on omnibox input.""" self.SetOmniboxText('google.com') self.assertTrue(self.WaitUntil(self._DoneLoading)) location = self.GetInstantInfo()['location'] self.assertTrue(location.startswith('http://www.google.com'))
f60453c64510385cc124dcf8cce6e5b1ea501b73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f60453c64510385cc124dcf8cce6e5b1ea501b73/instant.py
self.assertTrue(location.startswith('http://www.google.com'))
self.assertTrue('google.com' in location)
def testInstantNavigation(self): """Test that instant navigates based on omnibox input.""" self.SetOmniboxText('google.com') self.assertTrue(self.WaitUntil(self._DoneLoading)) location = self.GetInstantInfo()['location'] self.assertTrue(location.startswith('http://www.google.com'))
f60453c64510385cc124dcf8cce6e5b1ea501b73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f60453c64510385cc124dcf8cce6e5b1ea501b73/instant.py
'<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."""
522629f43c7366bce97db14bb044e8884f1b048d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/522629f43c7366bce97db14bb044e8884f1b048d/testserver.py
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...
522629f43c7366bce97db14bb044e8884f1b048d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/522629f43c7366bce97db14bb044e8884f1b048d/testserver.py
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...
522629f43c7366bce97db14bb044e8884f1b048d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/522629f43c7366bce97db14bb044e8884f1b048d/testserver.py
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...
522629f43c7366bce97db14bb044e8884f1b048d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/522629f43c7366bce97db14bb044e8884f1b048d/testserver.py
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...
522629f43c7366bce97db14bb044e8884f1b048d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/522629f43c7366bce97db14bb044e8884f1b048d/testserver.py
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...
522629f43c7366bce97db14bb044e8884f1b048d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/522629f43c7366bce97db14bb044e8884f1b048d/testserver.py
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...
522629f43c7366bce97db14bb044e8884f1b048d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/522629f43c7366bce97db14bb044e8884f1b048d/testserver.py
test_prefixes = ["FLAKY", "FAILS", "MAYBE"]
test_prefixes = ["FLAKY", "FAILS"]
def _ReadGtestFilterFile(self, name, cmd): '''Read a file which is a list of tests to filter out with --gtest_filter and append the command-line option to cmd. ''' filters = [] for directory in self._data_dirs: gtest_filter_files = [ os.path.join(directory, name + ".gtest.txt"), os.path.join(directory, name + ".gtest-%...
93661af93fc06341ad394d4d65fa83f3c55eb2a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/93661af93fc06341ad394d4d65fa83f3c55eb2a1/chrome_tests.py
url='http://foo/?q=%s')
url='http://localhost/?q=%s')
def testAddSearchEngine(self): """Test searching using keyword of user-added search engine.""" self.AddSearchEngine(title='foo', keyword='foo.com', url='http://foo/?q=%s') self.SetOmniboxText('foo.com foobar') self.OmniboxAcceptInput() self.assertEqual('http://foo/?q=foobar', self.GetActiveTabURL().spec())
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
self.assertEqual('http://foo/?q=foobar', self.GetActiveTabURL().spec())
self.assertEqual('http://localhost/?q=foobar', self.GetActiveTabURL().spec())
def testAddSearchEngine(self): """Test searching using keyword of user-added search engine.""" self.AddSearchEngine(title='foo', keyword='foo.com', url='http://foo/?q=%s') self.SetOmniboxText('foo.com foobar') self.OmniboxAcceptInput() self.assertEqual('http://foo/?q=foobar', self.GetActiveTabURL().spec())
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
new_url='http://foo/?bar=true&q=%s')
new_url='http://localhost/?bar=true&q=%s')
def testEditSearchEngine(self): """Test editing a search engine's properties.""" self.AddSearchEngine(title='foo', keyword='foo.com', url='http://foo/?q=%s') self.EditSearchEngine(keyword='foo.com', new_title='bar', new_keyword='bar.com', new_url='http://foo/?bar=true&q=%s') self.assertTrue(self._GetSearchEngineWithKey...
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
self.assertEqual('http://foo/?bar=true&q=foobar',
self.assertEqual('http://localhost/?bar=true&q=foobar',
def testEditSearchEngine(self): """Test editing a search engine's properties.""" self.AddSearchEngine(title='foo', keyword='foo.com', url='http://foo/?q=%s') self.EditSearchEngine(keyword='foo.com', new_title='bar', new_keyword='bar.com', new_url='http://foo/?bar=true&q=%s') self.assertTrue(self._GetSearchEngineWithKey...
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
url='http://foo/?q=%s')
url='http://localhost/?q=%s')
def testMakeSearchEngineDefault(self): """Test adding then making a search engine default.""" self.AddSearchEngine( title='foo', keyword='foo.com', url='http://foo/?q=%s') foo = self._GetSearchEngineWithKeyword('foo.com') self.assertTrue(foo) self.assertFalse(foo['is_default']) self.MakeSearchEngineDefault('foo.com') f...
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
self.assertEqual('http://foo/?q=foobar',
self.assertEqual('http://localhost/?q=foobar',
def testMakeSearchEngineDefault(self): """Test adding then making a search engine default.""" self.AddSearchEngine( title='foo', keyword='foo.com', url='http://foo/?q=%s') foo = self._GetSearchEngineWithKeyword('foo.com') self.assertTrue(foo) self.assertFalse(foo['is_default']) self.MakeSearchEngineDefault('foo.com') f...
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
def IsWhiteListedExtension(file_path): """Returns True if file_path has an extension we want to ignore.""" return WHITELIST_EXTENSIONS_REGEX.match(os.path.splitext(file_path)[1]) def IsWhiteListedPath(file_path): """Returns True if file_path ends with a path we want to ignore.""" return WHITELIST_FILES_REGEX.search(f...
def IsWhiteListed(file_path): """Returns True if file_path is in our whitelist of files to ignore.""" if WHITELIST_EXTENSIONS_REGEX.match(os.path.splitext(file_path)[1]): return True if WHITELIST_FILES_REGEX.search(file_path): return True if os.path.basename(file_path) in WHITELIST_FILENAMES: return True
def IsWhiteListedExtension(file_path): """Returns True if file_path has an extension we want to ignore.""" return WHITELIST_EXTENSIONS_REGEX.match(os.path.splitext(file_path)[1])
f461f4e7f3f8565a49c941e063f0f6303b7c1224 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f461f4e7f3f8565a49c941e063f0f6303b7c1224/checkperms.py
if IsWhiteListedExtension(file_path_lower): return None if IsWhiteListedPath(file_path_lower): return None if IsWhiteListedRegex(file_path_lower):
if IsWhiteListed(file_path_lower):
def CheckFile(file_path): """Checks file_path's permissions. Args: file_path: The file path to check. Returns: Either a string describing the error if there was one, or None if the file checked out OK. """ if VERBOSE: print 'Checking file: ' + file_path file_path_lower = file_path.lower() # Check to see if it's whit...
f461f4e7f3f8565a49c941e063f0f6303b7c1224 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f461f4e7f3f8565a49c941e063f0f6303b7c1224/checkperms.py
if PyUITest.IsPosix(): chrome_flags += ' --enable-crash-reporter'
os.putenv('CHROME_HEADLESS', '1')
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
725f22deb4c6b55e5edb83b906e7ce957ac3294b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/725f22deb4c6b55e5edb83b906e7ce957ac3294b/pyauto.py
startup_pipe.write(struct.pack('@H', listen_port))
startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json)
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...
b02ad3b5181f911bb0bdb59c434e55f5db8c9375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b02ad3b5181f911bb0bdb59c434e55f5db8c9375/testserver.py
output_file.write(" '%s',\n" % output_tgz)
output_file.write(" '../samples/%s',\n" % output_tgz)
def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '')...
a748df3cd46382137a5fc40ce14094c4f2dfe618 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a748df3cd46382137a5fc40ce14094c4f2dfe618/samples_gen.py
(dir_name in GIT_SOURCE_DIRECTORY)):
(dir_name.lower() in GIT_SOURCE_DIRECTORY)):
def ApplyDirectoryRules(existing_rules, dir_name): """Combines rules from the existing rules and the new directory. Any directory can contain a DEPS file. Toplevel DEPS files can contain module dependencies which are used by gclient. We use these, along with additional include rules and implicit rules for the given di...
bffff1c73fab9acf74f5d7945c0d656513ed7723 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bffff1c73fab9acf74f5d7945c0d656513ed7723/checkdeps.py
def CollectTranslatedStrings():
def CollectTranslatedStrings(branding):
def CollectTranslatedStrings(): """Collects all the translations for all the strings specified by kStringIds. Returns a list of tuples of (string_id, language, translated string). The list is sorted by language codes.""" kGeneratedResourcesPath = os.path.join(path_utils.ScriptDir(), '..', '..', '..', 'app/google_chrome...
714ae827fd635aefff50b51f4e5b7b50d9561a30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/714ae827fd635aefff50b51f4e5b7b50d9561a30/create_string_rc.py
'..', 'app/google_chrome_strings.grd')
'..', strings_file)
def CollectTranslatedStrings(): """Collects all the translations for all the strings specified by kStringIds. Returns a list of tuples of (string_id, language, translated string). The list is sorted by language codes.""" kGeneratedResourcesPath = os.path.join(path_utils.ScriptDir(), '..', '..', '..', 'app/google_chrome...
714ae827fd635aefff50b51f4e5b7b50d9561a30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/714ae827fd635aefff50b51f4e5b7b50d9561a30/create_string_rc.py
'google_chrome_strings*.xtb'))
translation_files))
def CollectTranslatedStrings(): """Collects all the translations for all the strings specified by kStringIds. Returns a list of tuples of (string_id, language, translated string). The list is sorted by language codes.""" kGeneratedResourcesPath = os.path.join(path_utils.ScriptDir(), '..', '..', '..', 'app/google_chrome...
714ae827fd635aefff50b51f4e5b7b50d9561a30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/714ae827fd635aefff50b51f4e5b7b50d9561a30/create_string_rc.py
translated_strings = CollectTranslatedStrings()
branding = '' if (argv > 2): branding = argv[2] translated_strings = CollectTranslatedStrings(branding)
def main(argv): translated_strings = CollectTranslatedStrings() kFilebase = os.path.join(argv[1], 'installer_util_strings') WriteRCFile(translated_strings, kFilebase) WriteHeaderFile(translated_strings, kFilebase)
714ae827fd635aefff50b51f4e5b7b50d9561a30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/714ae827fd635aefff50b51f4e5b7b50d9561a30/create_string_rc.py
print 'Usage:\n %s <output_directory>' % sys.argv[0]
print 'Usage:\n %s <output_directory> [branding]' % sys.argv[0]
def main(argv): translated_strings = CollectTranslatedStrings() kFilebase = os.path.join(argv[1], 'installer_util_strings') WriteRCFile(translated_strings, kFilebase) WriteHeaderFile(translated_strings, kFilebase)
714ae827fd635aefff50b51f4e5b7b50d9561a30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/714ae827fd635aefff50b51f4e5b7b50d9561a30/create_string_rc.py
os.lseek(fd, size, os.SEEK_SET)
os.lseek(fd, size, 0)
def testBigZip(self): """Verify that we can download a 1GB file.
7ef629f84fed4060c4fe83ea85a04df42c7c1079 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7ef629f84fed4060c4fe83ea85a04df42c7c1079/downloads.py
file.Write(" if (!id_map_.GetServiceId(c.%s, &%s)) {\n" %
file.Write(" if (!id_manager_->GetServiceId(c.%s, &%s)) {\n" %
def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s;\n" % (self.type, self.name)) file.Write(" if (!id_map_.GetServiceId(c.%s, &%s)) {\n" % (self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return parse_error::kParseNoError;\n") file.Write(" }\n")
15784643da8d09c0012e128870434277969fec3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/15784643da8d09c0012e128870434277969fec3e/build_gles2_cmd_buffer.py
startup_pipe.write(struct.pack('@H', listen_port))
startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json)
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...
bf64afdc2b251d73be83b4ac4dc56a19bd4cfe58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bf64afdc2b251d73be83b4ac4dc56a19bd4cfe58/testserver.py
_remove_expected_call_re = re.compile(r' EXPECT_CALL.*?;\n', re.S)
def Close(self): self.Write("#endif // %s\n\n" % self.guard) CWriter.Close(self)
56cf771f243d94985cd4e18f5f61bf6bab39d12c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/56cf771f243d94985cd4e18f5f61bf6bab39d12c/build_gles2_cmd_buffer.py
if func.GetInfo('expectation') == False: test = self._remove_expected_call_re.sub('', test)
def WriteValidUnitTest(self, func, file, test, extra = {}): """Writes a valid unit test.""" if func.GetInfo('expectation') == False: test = self._remove_expected_call_re.sub('', test) name = func.name arg_strings = [] count = 0 for arg in func.GetOriginalArgs(): arg_strings.append(arg.GetValidArg(count, 0)) count += 1 ...
56cf771f243d94985cd4e18f5f61bf6bab39d12c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/56cf771f243d94985cd4e18f5f61bf6bab39d12c/build_gles2_cmd_buffer.py
num_invalid_values = arg.GetNumInvalidValues(func)
num_invalid_values = arg.GetNumInvalidValues()
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(func) for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" gl_error = None count = 0 for ar...
56cf771f243d94985cd4e18f5f61bf6bab39d12c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/56cf771f243d94985cd4e18f5f61bf6bab39d12c/build_gles2_cmd_buffer.py
def WriteGLES2ImplementationDeclaration(self, func, file):
def WriteGLES2ImplementationHeader(self, func, file):
def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
56cf771f243d94985cd4e18f5f61bf6bab39d12c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/56cf771f243d94985cd4e18f5f61bf6bab39d12c/build_gles2_cmd_buffer.py
file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n") def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention."""
def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
56cf771f243d94985cd4e18f5f61bf6bab39d12c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/56cf771f243d94985cd4e18f5f61bf6bab39d12c/build_gles2_cmd_buffer.py