summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT_test_mocks.py
Commit message (Collapse)AuthorAgeFilesLines
* Include isolate.py in data for Android unit testsagrieve2016-03-241-3/+4
| | | | | | | | | | | This is required for any test that uses an .isolate to push files to the device (e.g. base_unittests). BUG=589318 Review URL: https://codereview.chromium.org/1784373002 Cr-Commit-Position: refs/heads/master@{#383127}
* [Extern Generation] Add a presubmit script to check externs not being updatedrdevlin.cronin2016-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | Add a presubmit script that checks for when extension api files are touched, but the corresponding extern file is not. Right now, this is very simple - it only checks that the extern is modified in some way (doesn't validate that it's the *right* way), and is only a warning (because sometimes api file changes don't cause extern changes). As an improvement, we would validate that the extern files contain the proper content - let's do that later. This will also be rolled out piecemeal, since many APIs don't currently have a dedicated extern file. This change only imposes the check on bluetooth (because it was handy) - if all goes well, we'll roll this out to all api files. Also establish a dedicated extern folder, since it's silly for chrome-generated externs to live in third_party/. BUG=469920 Review URL: https://codereview.chromium.org/1718243003 Cr-Commit-Position: refs/heads/master@{#378018}
* Add presubmit warning about deprecated compiled_resources.gypdbeam2016-02-101-0/+3
| | | | | | | | | | | Just use v2 instead ;) (compiled_resources2.gyp) R=maruel@chromium.org,cpu@chromium.org BUG=585553 Review URL: https://codereview.chromium.org/1686663002 Cr-Commit-Position: refs/heads/master@{#374762}
* Add PRESUBMIT tests for _CheckUserActionUpdate function.davileen2015-03-021-4/+15
| | | | | | | | | | | | | Presubmit does not contain any tests for the _CheckUserActionUpdate function. This commit adds a test to check against an action in actions.xml and one that is not found there. To do this we have to improve the MockInputApi and MockFile classes. BUG=462814 Review URL: https://codereview.chromium.org/966703003 Cr-Commit-Position: refs/heads/master@{#318759}
* Presubmit for chrome/browser/resources matches multiline metric type.gayane2015-02-241-0/+3
| | | | | | | | | | Also added a testcase for it and a nice print of errors. BUG=443026 Review URL: https://codereview.chromium.org/809053003 Cr-Commit-Position: refs/heads/master@{#317794}
* Reland https://codereview.chromium.org/929043002/: Add a presubmit check ↵glider2015-02-181-0/+10
| | | | | | | | | | | | | | | | that warns about declaring Singleton<T> in header files Add a presubmit check that warns about declaring Singleton<T> in header files (except for base/memory/singleton.h) This check is copied from presubmit_canned_checks.py in depot_tools/ with an added exception for base/memory/singleton.h. The corresponding code will be removed from presubmit_canned_checks.py afterwards. BUG=349861 Review URL: https://codereview.chromium.org/933253002 Cr-Commit-Position: refs/heads/master@{#316852}
* Revert of Add a presubmit check that warns about declaring Singleton<T> in ↵glider2015-02-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | header files (patchset #2 id:20001 of https://codereview.chromium.org/929043002/) Reason for revert: Reverting because of presubmit crashes: Traceback (most recent call last): File "/usr/local/google/ssd/depot_tools/git_cl.py", line 2983, in <module> sys.exit(main(sys.argv[1:])) File "/usr/local/google/ssd/depot_tools/git_cl.py", line 2969, in main return dispatcher.execute(OptionParser(), argv) File "/usr/local/google/ssd/depot_tools/subcommand.py", line 245, in execute return command(parser, args[1:]) File "/usr/local/google/ssd/depot_tools/git_cl.py", line 1614, in CMDpresubmit change=cl.GetChange(base_branch, None)) File "/usr/local/google/ssd/depot_tools/git_cl.py", line 936, in RunHook rietveld_obj=self.RpcServer()) File "/usr/local/google/ssd/depot_tools/presubmit_support.py", line 1396, in DoPresubmitChecks results += executer.ExecPresubmitScript(presubmit_script, filename) File "/usr/local/google/ssd/depot_tools/presubmit_support.py", line 1313, in ExecPresubmitScript result = eval(function_name + '(*__args)', context) File "<string>", line 1, in <module> File "<string>", line 1727, in CheckChangeOnCommit File "<string>", line 1455, in _CommonChecks File "<string>", line 1322, in _CheckSingletonInHeaders File "/usr/local/google/ssd/depot_tools/presubmit_support.py", line 472, in ReadFile raise IOError('Access outside the repository root is denied.') IOError: Access outside the repository root is denied. Original issue's description: > Add a presubmit check that warns about declaring Singleton<T> in header files > (except for base/memory/singleton.h) > This check is copied from presubmit_canned_checks.py in depot_tools/ with an > added exception for base/memory/singleton.h. > The corresponding code will be removed from presubmit_canned_checks.py afterwards. > > BUG=349861 > R=phajdan.jr@chromium.org, > > Committed: https://crrev.com/9b73d0393037452d13358f4e2766cb62adbdede8 > Cr-Commit-Position: refs/heads/master@{#316546} TBR=phajdan.jr@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=349861 Review URL: https://codereview.chromium.org/934723003 Cr-Commit-Position: refs/heads/master@{#316559}
* Add a presubmit check that warns about declaring Singleton<T> in header filesglider2015-02-171-0/+3
| | | | | | | | | | | | | | (except for base/memory/singleton.h) This check is copied from presubmit_canned_checks.py in depot_tools/ with an added exception for base/memory/singleton.h. The corresponding code will be removed from presubmit_canned_checks.py afterwards. BUG=349861 R=phajdan.jr@chromium.org, Review URL: https://codereview.chromium.org/929043002 Cr-Commit-Position: refs/heads/master@{#316546}
* Looking into all changed files to find actions.xml.gayane2014-12-131-0/+1
| | | | | | | | | | | | In case actions.xml is included in the changelist the chrome/browser/resources/PRESUBMIT.py shouldn't run because the presubmit for actions.xml will do more complete job. Fixing the bug to look into all changed files in the CL where previously it was only looking at subdirectories of current presubmit script to find actions.xml BUG=439978 Review URL: https://codereview.chromium.org/760163004 Cr-Commit-Position: refs/heads/master@{#308244}
* Fixing bugs introduced by new presubmit changesgayane2014-12-051-1/+1
| | | | | | | | | | | | | | | Fixing issues introduced by https://codereview.chromium.org/719463003/. - Fixing the constant suffix in case of boolean action - comment fix for mocks. BUG=439328 TBR=phajdan.jr@chromium.org, brettw@chromium.org Review URL: https://codereview.chromium.org/757233004 Cr-Commit-Position: refs/heads/master@{#307030}
* Presubmit checks for user actions introduced in HTML files.gayane2014-12-041-0/+109
This presubmit task will catch the case when HTML files are modified with new user action and action.xml is not updated BUG=431393 Review URL: https://codereview.chromium.org/719463003 Cr-Commit-Position: refs/heads/master@{#306842}