1 // Copyright 2022 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_TEST_ALLOW_CHECK_IS_TEST_FOR_TESTING_H_ 6 #define BASE_TEST_ALLOW_CHECK_IS_TEST_FOR_TESTING_H_ 7 8 namespace base::test { 9 10 // This is to be called exactly once when starting unit or browser tests to 11 // allow test-only code paths that contain `CHECK_IS_TEST()`. It must be called 12 // before we have other threads to avoid races with calls to `CHECK_IS_TEST()`. 13 // 14 // Note: This function must not be called in production code, but only in 15 // tests. 16 void AllowCheckIsTestForTesting(); 17 18 } // namespace base::test 19 20 #endif // BASE_TEST_ALLOW_CHECK_IS_TEST_FOR_TESTING_H_ 21