bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
code = """ typedef %(func_name)s::Result Result;
code = """ typedef %(func_name)s::Result Result;
475,300
def WriteValidationCode(self, file): """Writes the validation code for an argument.""" pass
def WriteValidationCode(self, file, func): """Writes the validation code for an argument.""" pass
475,301
def WriteClientSideValidationCode(self, file): """Writes the validation code for an argument.""" pass
def WriteClientSideValidationCode(self, file, func): """Writes the validation code for an argument.""" pass
475,302
def WriteValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
def WriteValidationCode(self, file, func): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
475,303
def WriteValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
def WriteValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE, \"gl%s: %s < 0\");\n" % (func.original_name, self.name)) file.Write(" return error::kNoError;\n") file.Write(" }\n")
475,304
def WriteClientSideValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return;\n") file.Write(" }\n")
def WriteClientSideValidationCode(self, file, func): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return;\n") file.Write(" }\n")
475,305
def WriteClientSideValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return;\n") file.Write(" }\n")
def WriteClientSideValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE, \"gl%s: %s < 0\");\n" % (func.original_name, self.name)) file.Write(" return;\n") file.Write(" }\n")
475,306
def WriteValidationCode(self, file): file.Write(" if (!Validate%s(%s)) {\n" % (self.local_type, self.name)) file.Write(" SetGLError(%s);\n" % self.gl_error) file.Write(" return error::kNoError;\n") file.Write(" }\n")
def WriteValidationCode(self, file, func): file.Write(" if (!Validate%s(%s)) {\n" % (self.local_type, self.name)) file.Write(" SetGLError(%s);\n" % self.gl_error) file.Write(" return error::kNoError;\n") file.Write(" }\n")
475,307
def WriteValidationCode(self, file): file.Write(" if (!Validate%s(%s)) {\n" % (self.local_type, self.name)) file.Write(" SetGLError(%s);\n" % self.gl_error) file.Write(" return error::kNoError;\n") file.Write(" }\n")
def WriteValidationCode(self, file): file.Write(" if (!Validate%s(%s)) {\n" % (self.local_type, self.name)) file.Write(" SetGLError(%s, \"gl%s: %s %s\");\n" % (self.gl_error, func.original_name, self.name, self.gl_error)) file.Write(" return error::kNoError;\n") file.Write(" }\n")
475,308
def WriteValidationCode(self, file): """Overridden from Argument.""" file.Write(" if (%s == NULL) {\n" % self.name) file.Write(" return error::kOutOfBounds;\n") file.Write(" }\n")
def WriteValidationCode(self, file, func): """Overridden from Argument.""" file.Write(" if (%s == NULL) {\n" % self.name) file.Write(" return error::kOutOfBounds;\n") file.Write(" }\n")
475,309
def WriteValidationCode(self, file): """Overridden from Argument.""" file.Write(" if (%s == NULL) {\n" % self.name) file.Write(" return error::kOutOfBounds;\n") file.Write(" }\n")
def WriteValidationCode(self, file, func): """Overridden from Argument.""" file.Write(" if (%s == NULL) {\n" % self.name) file.Write(" return error::kOutOfBounds;\n") file.Write(" }\n")
475,310
def WriteHandlerValidation(self, file): """Writes validation code for the function.""" for arg in self.GetOriginalArgs(): arg.WriteValidationCode(file) self.WriteValidationCode(file)
def WriteHandlerValidation(self, file): """Writes validation code for the function.""" for arg in self.GetOriginalArgs(): arg.WriteValidationCode(file, self) self.WriteValidationCode(file)
475,311
def git_fetch_id(): """ Fetch the GIT identifier for the local tree. Errors are swallowed. """ try: p = subprocess.Popen(['git', 'log', '-1'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform=='win32')) except OSError: # 'git' is apparently either not installed or not executable. return None id = No...
def git_fetch_id(): """ Fetch the GIT identifier for the local tree. Errors are swallowed. """ try: proc = subprocess.Popen(['git', 'log', '-999'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform=='win32')) for line in proc.stdout: match = git_re.search(line) if match: id = match.group(2) if id: pr...
475,312
def git_fetch_id(): """ Fetch the GIT identifier for the local tree. Errors are swallowed. """ try: p = subprocess.Popen(['git', 'log', '-1'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform=='win32')) except OSError: # 'git' is apparently either not installed or not executable. return None id = No...
def git_fetch_id(): """ Fetch the GIT identifier for the local tree. Errors are swallowed. """ try: p = subprocess.Popen(['git', 'log', '-1'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform=='win32')) except OSError: # 'git' is apparently either not installed or not executable. pass return None
475,313
def setUp(self): self._to_import = ['ALL']
def setUp(self): self._to_import = ['ALL']
475,314
def tearDown(self): pyauto.PyUITest.tearDown(self) # Re-set the path to its state before the test. if self.IsMac(): if self._old_path: os.environ['DYLD_FALLBACK_LIBRARY_PATH'] = self._old_path else: os.environ.pop('DYLD_FALLBACK_LIBRARY_PATH') # Delete any replacers to restore the original profiles. if self._safari_rep...
def tearDown(self): pyauto.PyUITest.tearDown(self) # Re-set the path to its state before the test.# Delete any replacers to restore the original profiles. if self._safari_replacer: del self._safari_replacer if self._firefox_replacer: del self._firefox_replacer
475,315
def testFirefoxImportFromPrefs(self): """Verify importing Firefox data through preferences.""" self._SwapFirefoxProfile() self.ImportSettings('Mozilla Firefox', False, ['ALL']) self._CheckDefaults(bookmarks=True, history=True, passwords=True, home_page=False, search_engines=True)
def testFirefoxImportFromPrefs(self): """Verify importing Firefox data through preferences.""" self._SwapFirefoxProfile() self.ImportSettings('Mozilla Firefox', False, self._to_import) self._CheckDefaults(bookmarks=True, history=True, passwords=True, home_page=False, search_engines=True)
475,316
def testFirefoxFirstRun(self): """Verify importing from Firefox on the first run.
def testFirefoxFirstRun(self): """Verify importing from Firefox on the first run.
475,317
def testImportFirefoxDataTwice(self): """Verify importing Firefox data twice.
def testImportFirefoxDataTwice(self): """Verify importing Firefox data twice.
475,318
def testImportFirefoxDataTwice(self): """Verify importing Firefox data twice.
def testImportFirefoxDataTwice(self): """Verify importing Firefox data twice.
475,319
def testImportFromFirefoxAndSafari(self): """Verify importing from Firefox and then Safari.""" # This test is for Mac only. if not self.IsMac(): return
def testImportFromFirefoxAndSafari(self): """Verify importing from Firefox and then Safari.""" # This test is for Mac only. if not self.IsMac(): return
475,320
def testSafariImportFromPrefs(self): """Verify importing Safari data through preferences.""" # This test is Mac only. if not self.IsMac(): return self._SwapSafariProfile() self.ImportSettings('Safari', False, ['ALL']) self._CheckDefaults(bookmarks=True, history=True, passwords=False, home_page=False, search_engines=Tru...
def testSafariImportFromPrefs(self): """Verify importing Safari data through preferences.""" # This test is Mac only. if not self.IsMac(): return self._SwapSafariProfile() self.ImportSettings('Safari', False, self._to_import) self._CheckDefaults(bookmarks=True, history=True, passwords=False, home_page=False, search_eng...
475,321
def testSafariFirstRun(self): """Verify importing Safari data on the first run.""" # This test is Mac only. if not self.IsMac(): return self._SwapSafariProfile() self.ImportSettings('Safari', False, ['ALL']) self._CheckDefaults(bookmarks=True, history=True, passwords=False, home_page=False, search_engines=False)
def testSafariFirstRun(self): """Verify importing Safari data on the first run.""" # This test is Mac only. if not self.IsMac(): return self._SwapSafariProfile() self.ImportSettings('Safari', False, self._to_import) self._CheckDefaults(bookmarks=True, history=True, passwords=False, home_page=False, search_engines=False...
475,322
def testImportSafariDataTwice(self): """Verify importing Safari data twice.
def testImportSafariDataTwice(self): """Verify importing Safari data twice.
475,323
def testImportSafariDataTwice(self): """Verify importing Safari data twice.
def testImportSafariDataTwice(self): """Verify importing Safari data twice.
475,324
def gatherFrames(node, source_dir): frames = [] for frame in node.getElementsByTagName("frame"): frame_dict = { INSTRUCTION_POINTER : getTextOf(frame, INSTRUCTION_POINTER), OBJECT_FILE : getTextOf(frame, OBJECT_FILE), FUNCTION_NAME : getTextOf(frame, FUNCTION_NAME), SRC_FILE_DIR : removeCommonRoot(...
def gatherFrames(node, source_dir): frames = [] for frame in node.getElementsByTagName("frame"): frame_dict = { INSTRUCTION_POINTER : getTextOf(frame, INSTRUCTION_POINTER), OBJECT_FILE : getTextOf(frame, OBJECT_FILE), FUNCTION_NAME : getTextOf(frame, FUNCTION_NAME), SRC_FILE_DIR : removeCommonRoot(...
475,325
def find_and_truncate(f): f.seek(0) while True: line = f.readline() if line == "": return False if '</valgrindoutput>' in line: # valgrind often has garbage after </valgrindoutput> upon crash f.truncate() return True
def find_and_truncate(f): f.seek(0) while True: line = f.readline() if line == "": return False if '</valgrindoutput>' in line: # valgrind often has garbage after </valgrindoutput> upon crash f.truncate() return True
475,326
def __init__(self, source_dir, files, show_all_leaks=False, use_gdb=False): '''Reads in a set of files.
def __init__(self, source_dir, files, show_all_leaks=False, use_gdb=False): '''Reads in a set of files.
475,327
def Report(self, check_sanity=False): if self._parse_failed: logging.error("FAIL! Couldn't parse Valgrind output file") return -2
def Report(self, check_sanity=False): if self._parse_failed: logging.error("FAIL! Couldn't parse Valgrind output file") return -2
475,328
def Report(self, check_sanity=False): if self._parse_failed: logging.error("FAIL! Couldn't parse Valgrind output file") return -2
def Report(self, check_sanity=False): if self._parse_failed: logging.error("FAIL! Couldn't parse Valgrind output file") return -2
475,329
def GenerateLcovPosix(self): """Convert profile data to lcov on Mac or Linux.""" start_dir = os.getcwd() if self.IsLinux(): # With Linux/make (e.g. the coverage_run target), the current # directory for this command is .../build/src/chrome but we need # to be in .../build/src for the relative path of source files # to b...
def GenerateLcovPosix(self): """Convert profile data to lcov on Mac or Linux.""" start_dir = os.getcwd() if self.IsLinux(): # With Linux/make (e.g. the coverage_run target), the current # directory for this command is .../build/src/chrome but we need # to be in .../build/src for the relative path of source files # to b...
475,330
def CheckChange(input_api, output_api): """Checks that the user didn't paste 'Suppression:' into the file""" keyword = 'Suppression:' for f, line_num, line in input_api.RightHandSideLines(lambda x: x.LocalPath().endswith('.txt')): if keyword in line: text = '"%s" must not be included; %s line %s' % ( keyword, f.LocalPa...
def CheckChange(input_api, output_api): """Checks the memcheck suppressions files for bad data.""" errors = [] skip_next_line = False func_re = input_api.re.compile('[a-z_.]+\(.+\)$') for f, line_num, line in input_api.RightHandSideLines(lambda x: x.LocalPath().endswith('.txt')): if keyword in line: text = '"%s" must n...
475,331
def CheckChange(input_api, output_api): """Checks that the user didn't paste 'Suppression:' into the file""" keyword = 'Suppression:' for f, line_num, line in input_api.RightHandSideLines(lambda x: x.LocalPath().endswith('.txt')): if keyword in line: text = '"%s" must not be included; %s line %s' % ( keyword, f.LocalPa...
def CheckChange(input_api, output_api): """Checks that the user didn't paste 'Suppression:' into the file""" keyword = 'Suppression:' for f, line_num, line in input_api.RightHandSideLines(lambda x: x.LocalPath().endswith('.txt')): line = line.lstrip() if line.startswith(' continue if skip_next_line: skip_next_line = F...
475,332
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,333
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,334
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,335
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,336
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,337
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,338
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,339
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,340
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,341
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,342
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,343
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,344
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,345
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,346
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,347
code = """ typedef %(func_name)s::Result Result;
code = """ typedef %(func_name)s::Result Result;
475,348
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,349
typedef %(name)s::Result Result;
typedef %(name)s::Result Result;
475,350
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,351
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,352
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,353
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
475,354
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,355
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,356
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,357
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,358
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,359
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
475,360
def _ParseArgs(self): parser = optparse.OptionParser() parser.add_option( '-d', '--outdir', type='string', default=None, help='Directory in which to setup. This is typically the directory ' 'where the binaries would go when compiled from source.') parser.add_option( '-p', '--platform', type='string', default=pyauto_uti...
def _ParseArgs(self): parser = optparse.OptionParser() parser.add_option( '-d', '--outdir', type='string', default=None, help='Directory in which to setup. This is typically the directory ' 'where the binaries would go when compiled from source.') parser.add_option( '-p', '--platform', type='string', default=pyauto_uti...
475,361
def Run(self): self._ParseArgs() if not os.path.isdir(self._outdir): os.makedirs(self._outdir)
def Run(self): self._ParseArgs() if not os.path.isdir(self._outdir): os.makedirs(self._outdir)
475,362
def main(): if sys.platform == 'cygwin': return( 'ERROR: you are running from cygwin python, which is not\n' ' supported by "run_webkit_test.py". You should use python\n' ' for Windows (2.5+) to launch this script. A python for\n' ' Windows can be found at your depot_tools folder:\n' ' [DEPOT_TO...
def main(): cmd = [sys.executable] src_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(sys.argv[0])))))) script_dir=os.path.join(src_dir, "third_party", "WebKit", "WebKitTools", "Scripts") script = os.path.join(script_dir, 'new-run-webkit-tests') cmd.append(script) if '...
475,363
def main(): if sys.platform == 'cygwin': return( 'ERROR: you are running from cygwin python, which is not\n' ' supported by "run_webkit_test.py". You should use python\n' ' for Windows (2.5+) to launch this script. A python for\n' ' Windows can be found at your depot_tools folder:\n' ' [DEPOT_TO...
def main(): if sys.platform == 'cygwin': return( 'ERROR: you are running from cygwin python, which is not\n' ' supported by "run_webkit_test.py". You should use python\n' ' for Windows (2.5+) to launch this script. A python for\n' ' Windows can be found at your depot_tools folder:\n' ' [DEPOT_TO...
475,364
def WritePepperGLES2Implementation(self, filename): """Writes the Pepper OpenGLES interface implementation."""
def WritePepperGLES2Implementation(self, filename): """Writes the Pepper OpenGLES interface implementation."""
475,365
def testDownloadDangerousFiles(self): """Verify that we can download and save dangerous files.""" test_dir = os.path.abspath('.') # This file is a .py file which is "dangerous" file_path = os.path.join(test_dir, 'downloads.py') file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadD...
def testDownloadDangerousFiles(self): """Verify that we can download and save dangerous files.""" test_dir = os.path.abspath('.') # This file is a .py file which is "dangerous" file_path = os.path.join(test_dir, 'downloads.py') file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadD...
475,366
def testDownloadDangerousFiles(self): """Verify that we can download and save dangerous files.""" test_dir = os.path.abspath('.') # This file is a .py file which is "dangerous" file_path = os.path.join(test_dir, 'downloads.py') file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadD...
def testDownloadDangerousFiles(self): """Verify that we can download and save dangerous files.""" test_dir = os.path.abspath('.') # This file is a .py file which is "dangerous" file_path = os.path.join(test_dir, os.path.basename(file_path)) file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self...
475,367
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(...
def RenderPage(name, 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(na...
475,368
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(...
def RenderPages(names, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result 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(na...
475,369
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(...
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(...
475,370
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(...
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(...
475,371
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(...
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(...
475,372
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,373
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,374
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,375
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
475,376
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script.") parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if ...
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script.") parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if ...
475,377
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
475,378
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...
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...
475,379
def __init__(self, methodName='runTest'): super(NotificationsTest, self).__init__(methodName) self.NO_SUCH_URL = 'http://no_such_url_exists/' self.NO_SUCH_URL2 = 'http://no_such_url_exists2/' self.NO_SUCH_URL3 = 'http://no_such_url_exists3/' # Content settings for default notification permission. self.ALLOW_ALL_SETTING...
def __init__(self, methodName='runTest'): super(NotificationsTest, self).__init__(methodName) self.NO_SUCH_URL = 'http://no_such_url_exists/' # Content settings for default notification permission. self.ALLOW_ALL_SETTING = 1 self.DENY_ALL_SETTING = 2 self.ASK_SETTING = 3
475,380
def testNotificationOrderAfterClosingOne(self): """Tests that closing a notification leaves the rest of the notifications in the correct order. """ self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self._CreateHTMLNotification(self.NO_SUCH_URL2) self._CreateHT...
def testNotificationOrderAfterClosingOne(self): """Tests that closing a notification leaves the rest of the notifications in the correct order. """ self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateSimpleNotification('', 'Title1', '') self._CreateSimpleNotification('', 'Title2', '') self._Creat...
475,381
def testNotificationOrderAfterClosingOne(self): """Tests that closing a notification leaves the rest of the notifications in the correct order. """ self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self._CreateHTMLNotification(self.NO_SUCH_URL2) self._CreateHT...
def testNotificationOrderAfterClosingOne(self): """Tests that closing a notification leaves the rest of the notifications in the correct order. """ self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self._CreateHTMLNotification(self.NO_SUCH_URL2) self._CreateHT...
475,382
def _ExtractAndAddNewBaselines(self, archive_file): """Extract new baselines from archive and add them to SVN repository.
def _ExtractAndAddNewBaselines(self, archive_file): """Extract new baselines from archive and add them to SVN repository.
475,383
def _ParseArgs(self): """Parse command line args.""" parser = optparse.OptionParser() parser.add_option( '-v', '--verbose', action='store_true', default=False, help='Make PyAuto verbose.') parser.add_option( '-D', '--wait-for-debugger', action='store_true', default=False, help='Block PyAuto on startup for attaching deb...
def _ParseArgs(self): """Parse command line args.""" parser = optparse.OptionParser() parser.add_option( '-v', '--verbose', action='store_true', default=False, help='Make PyAuto verbose.') parser.add_option( '-D', '--wait-for-debugger', action='store_true', default=False, help='Block PyAuto on startup for attaching deb...
475,384
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
475,385
def ScanThirdPartyDirs(third_party_dirs): """Scan a list of directories and report on any problems we find.""" errors = [] for path in sorted(third_party_dirs): try: metadata = ParseDir(path) except LicenseError, e: errors.append((path, e.args[0])) continue print path, "OK:", metadata["License File"] print for path, ...
def ScanThirdPartyDirs(third_party_dirs): """Scan a list of directories and report on any problems we find.""" errors = [] for path in sorted(third_party_dirs): try: metadata = ParseDir(path) except LicenseError, e: errors.append((path, e.args[0])) continue for path, error in sorted(errors): print path + ": " + error ...
475,386
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
475,387
def InitFunction(self, func): """Add or adjust anything type specific for this function.""" if func.GetInfo('needs_size'): func.AddCmdArg(DataSizeArgument('data_size'))
def InitFunction(self, func): """Add or adjust anything type specific for this function.""" if func.GetInfo('needs_size') and not func.name.endswith('Bucket'): func.AddCmdArg(DataSizeArgument('data_size'))
475,388
def GetBucketVersion(self): """Overridden from Argument.""" if self.type == "const char*": return InputStringBucketArgument(self.name, self.type) return self
def GetBucketVersion(self): """Overridden from Argument.""" if self.type == "const char*": return InputStringBucketArgument(self.name, self.type) return self
475,389
def InitFunction(self): """Overridden from Function""" pass
def InitFunction(self): """Overridden from Function""" pass
475,390
def WriteServiceImplementation(self, file): """Overridden from Function""" pass
def WriteServiceImplementation(self, file): """Overridden from Function""" pass
475,391
def RunCommand(argv): """Runs the command with given argv and returns exit code.""" try: proc = subprocess.Popen(argv, stdout=None) except OSError: return 1 output = proc.communicate()[0] return proc.returncode
NONESSENTIAL_DIRS = ( 'chrome/test/data', 'chrome/tools/test/reference_build', 'gears/binaries', 'net/data/cache_tests', 'o3d/documentation', 'o3d/samples', 'third_party/lighttpd', 'third_party/WebKit/LayoutTests', 'webkit/data/layout_tests', 'webkit/tools/test/reference_build', ) def GetSourceDirectory(): return os.p...
475,392
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
475,393
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
475,394
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
475,395
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
def main(argv): parser = optparse.OptionParser() parser.add_option("--remove-nonessential-files", dest="remove_nonessential_files", action="store_true", default=False) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' print '(without .tar.bz2 exten...
475,396
def ustring_to_string(ptr, length=None): """Convert a pointer to UTF-16 data into a Python Unicode string. ptr and length are both gdb.Value objects. If length is unspecified, will guess at the length.""" extra = '' if length is None: # Try to guess at the length. for i in xrange(0, 2048): if int((ptr + i).dereference...
def ustring_to_string(ptr, length=None): """Convert a pointer to UTF-16 data into a Python Unicode string. ptr and length are both gdb.Value objects. If length is unspecified, will guess at the length.""" extra = '' if length is None: # Try to guess at the length. for i in xrange(0, 2048): if int((ptr + i).dereference...
475,397
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
475,398
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
475,399