Verify field trials looked up through field_trial::FindFullName

For now, the run-time check will only be enabled if the
rtc_strict_field_trials GN arg is set.

In order to allow testing with imaginary field trial keys, two test
helpers have been added. It's a bit awkward to test these since the
field trial string is already global, hence the helpers are also
modifying global state. Tests must make sure this global state is reset
between runs. Things won't be an issue anymore when [1] has removed the
global string.

[1] https://crbug.com/webrtc/10335

Bug: webrtc:14154
Change-Id: Ida44cc817079d7177325e2228cf1f1d242b799e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276269
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38447}
diff --git a/webrtc.gni b/webrtc.gni
index 8ab7b27..8dfcc9d 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -231,6 +231,11 @@
 
   # Includes the dav1d decoder in the internal decoder factory when set to true.
   rtc_include_dav1d_in_internal_decoder_factory = true
+
+  # When set to true, a run-time check will make sure that all field trial keys
+  # have been registered in accordance with the field trial policy. The check
+  # will only run with builds that have RTC_DCHECKs enabled.
+  rtc_strict_field_trials = false
 }
 
 if (!build_with_mozilla) {