This CL adds a presubmit check trying to limit new usage of
NSUserDefaults.
Note that this check provides a WARNING message.
This check does not cover all scenarios and can produce some false
positives (in case the developer uses the pattern code to get
the content of an existing userDefault key).
Bug: none
Change-Id: Ie78b731ff5517a5c2d331494b2e76c66f630c6dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6179973
Reviewed-by: Mark Cogan <marq@chromium.org>
Commit-Queue: Federica Germinario <fedegermi@google.com>
Cr-Commit-Position: refs/heads/main@{#1411606}
This CL adds a presubmit check which checks if new changes in
unit test code can be improved by giving a warning message.
Example of lines that can be improved:
(EXPECT_TRUE or EXPECT_FALSE) +
(isEqualToString: or isEqualToData: or isEqualToArray:)
This CL also fixed the error_message string of:
_CheckHasNoChromeBrowserStateForwardDeclaration
Bug: none
Change-Id: I46a3593c7d9d41c54cdf87986895e295553e01c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5866150
Commit-Queue: Federica Germinario <fedegermi@google.com>
Reviewed-by: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1356410}
Adds a PRESUBMIT check to catch forward-declarations of
ChromeBrowserState, which (for the time being) should instead be
done with the forwarding header.
The check for this is intentionally quite narrow.
Bug: 359821340
Change-Id: I143cd68ad37ccb69a03f17014ec3819f6c2fde5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5797169
Auto-Submit: Mark Cogan <marq@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1344010}
This makes CWVPageView.title, CWVBackForwardListItem.title and
CWPageView.lastCommittedUrl nullable so that their Swift bindings
become equal to the WebKit variants.
For Objective C there will be no noticeable change which might be
why it was never noticed.
This also modifies the PRESUBMIT check to allow nullability
in ios/web_view even if it is banned everywhere else.
Bug: 334275652
Change-Id: I957430f556df9a8bfabb1a947e66f188a009eaa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5444561
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/main@{#1288560}
This CL changes the ios/ PRESUBMIT to warn if b/ links are used in
TODOs.
Also fixes some error messages. In the singular, inserts an 'a' for
correctness ("without a bug number" vs "without bug number"). Also now
the parentheses opened with "(expected format is" is now closed before
the final colon.
Bug: 326058403
Change-Id: I863a013120939e3fe20656b064c8d095e30b1223
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5343955
Reviewed-by: Asami Doi <asamidoi@chromium.org>
Commit-Queue: Mark Cogan <marq@chromium.org>
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1269465}
The ARC boilerplate isn't needed any more and is being removed across
the codebase. Add a presubmit to avoid getting any more committed.
The presubmit change alone landed earlier and was reverted because it
wasn't ready. Now this lands along with other related changes.
Bug: 1468376
Change-Id: I9a7fdc66ed5daa1d623e3226fdf4e9004c071d5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4727321
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1177895}
Currently, the link that is given is not recognized by apple default
terminal. Since it’s almost a given that any developer will have
internet access, using an online link seems acceptable. I selected the
public link given that Chrome is open source.
Change-Id: I565affd0fb24b6e8a007468781daa02c8f79dd11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3826240
Commit-Queue: Arthur Milchior <arthurmilchior@google.com>
Reviewed-by: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1034480}
The check is failing because it was written as if the content of the
file returned with f.NewContents() is a string. It is actually a list.
This CL fixes it.
The check never worked.
Bug: 798289
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Icfd216bbcaee78671878b65ac412b9063bd24509
Reviewed-on: https://chromium-review.googlesource.com/847372
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526452}
Add EarlGrey tests tryjobs to ios changes. We want to have EG
tests running for at least ios changes to reduce tree breakages.
Since the ios-simulator-full-configs has only 8 builders, iOS CLs might
experience extra landing time due to the tryjob size and limited capacity.
Bug: 782735
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I8c00dbe1963893af19c37d7410e6d57c8d37ab5d
Reviewed-on: https://chromium-review.googlesource.com/759166
Reviewed-by: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
Commit-Queue: Menglu Huang <huangml@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515214}
All TODOs in src/ios/ should follow the format TODO(crbug.com/######)
so add a PRESUBMIT.py check (and corresponding unit tests) for that.
BUG=677203
Change-Id: I360ad75c786f292d3a8ada8df519cb451c1c2828
Reviewed-on: https://chromium-review.googlesource.com/538613
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482589}
As we're adding more and more code outside of stc/ios/{web,chrome},
add a presubmit check enforcing "clang-format" for all of src/ios/
instead of limiting it to select sub-directories of src/ios/.
BUG=None
Review-Url: https://codereview.chromium.org/2665383002
Cr-Commit-Position: refs/heads/master@{#447541}