Discourage `CHECK_IS_TEST` in *ForTesting functions.

There is already a presubmit test which blocks adding calls to test-only
functions to production code paths and adding `CHECK_IS_TEST` can make
trivial test-only accessors non-trivial, reducing readability.

Change-Id: I0a18f1bdd4da10cd690d043fd96dd69d38c70e9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6480714
Commit-Queue: Solomon Kinard <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Auto-Submit: Reilly Grant <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Reviewed-by: Solomon Kinard <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1450311}
diff --git a/base/check_is_test.h b/base/check_is_test.h
index b2c5780a..d4d4de9 100644
--- a/base/check_is_test.h
+++ b/base/check_is_test.h
@@ -34,6 +34,10 @@
 //     return;
 //   }
 //
+// `CHECK_IS_TEST` should not be used within functions named `*ForTesting`,
+// `*ForTests`, etc. because there is a presubmit check which warns against
+// calling such functions in production code.
+//
 // `CHECK_IS_TEST` is thread safe.
 //
 // An optional base::NotFatalUntil argument can be provided to make the