[Cleanup] Add missing #include. Remove useless ones. IWYU part 2.

This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
diff --git a/modules/remote_bitrate_estimator/BUILD.gn b/modules/remote_bitrate_estimator/BUILD.gn
index f6991ea..acc7a35 100644
--- a/modules/remote_bitrate_estimator/BUILD.gn
+++ b/modules/remote_bitrate_estimator/BUILD.gn
@@ -41,6 +41,7 @@
 
   deps = [
     "../..:webrtc_common",
+    "../../api:libjingle_peerconnection_api",
     "../../api/units:data_rate",
     "../../api/units:timestamp",
     "../../modules:module_api",
@@ -124,7 +125,10 @@
     deps = [
       ":remote_bitrate_estimator",
       "..:module_api",
+      "..:module_api_public",
       "../..:webrtc_common",
+      "../../api:libjingle_peerconnection_api",
+      "../../api/transport:network_control",
       "../../logging:mocks",
       "../../rtc_base:checks",
       "../../rtc_base:gtest_prod",
@@ -166,6 +170,7 @@
       ":bwe_simulator_lib",
       ":remote_bitrate_estimator",
       "../../rtc_base:rtc_base_approved",
+      "../../system_wrappers:system_wrappers",
       "../../test:field_trial",
       "../../test:fileutils",
       "../../test:test_support",
@@ -199,6 +204,7 @@
     deps = [
       ":bwe_simulator_lib",
       ":remote_bitrate_estimator",
+      "..:module_api_public",
       "../..:webrtc_common",
       "../../rtc_base:checks",
       "../../rtc_base:rtc_base",
@@ -227,6 +233,7 @@
       ":remote_bitrate_estimator",
       "../..:webrtc_common",
       "../../rtc_base:rtc_base_approved",
+      "../../system_wrappers:system_wrappers",
       "../../test:fileutils",
       "../../test:test_main",
       "../../test:test_support",
diff --git a/modules/remote_bitrate_estimator/bwe_simulations.cc b/modules/remote_bitrate_estimator/bwe_simulations.cc
index de6d2d9..6579fe7 100644
--- a/modules/remote_bitrate_estimator/bwe_simulations.cc
+++ b/modules/remote_bitrate_estimator/bwe_simulations.cc
@@ -8,13 +8,20 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include <stddef.h>
+#include <cstdint>
 #include <memory>
+#include <string>
+#include <vector>
 
-#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
+#include "modules/remote_bitrate_estimator/test/bwe.h"
 #include "modules/remote_bitrate_estimator/test/bwe_test.h"
+#include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 #include "modules/remote_bitrate_estimator/test/packet_receiver.h"
 #include "modules/remote_bitrate_estimator/test/packet_sender.h"
 #include "rtc_base/constructormagic.h"
+#include "rtc_base/random.h"
+#include "system_wrappers/include/clock.h"
 #include "test/gtest.h"
 #include "test/testsupport/fileutils.h"
 
diff --git a/modules/remote_bitrate_estimator/inter_arrival_unittest.cc b/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
index 545b196..daf6f6e 100644
--- a/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
+++ b/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
@@ -10,7 +10,6 @@
 
 #include <memory>
 
-#include "common_types.h"  // NOLINT(build/include)
 #include "modules/remote_bitrate_estimator/inter_arrival.h"
 #include "test/gtest.h"
 
diff --git a/modules/remote_bitrate_estimator/overuse_detector_unittest.cc b/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
index 366902c..8ff3bdd 100644
--- a/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
+++ b/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
@@ -8,10 +8,9 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include <math.h>
-
+#include <stdio.h>
+#include <string.h>
 #include <algorithm>
-#include <cmath>
 #include <cstdlib>
 #include <memory>
 
@@ -20,7 +19,6 @@
 #include "modules/remote_bitrate_estimator/overuse_detector.h"
 #include "modules/remote_bitrate_estimator/overuse_estimator.h"
 #include "rtc_base/random.h"
-#include "rtc_base/rate_statistics.h"
 #include "test/field_trial.h"
 #include "test/gtest.h"
 
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
index 8e5aacb..5f7f7e9 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
@@ -11,11 +11,14 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEND_TIME_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEND_TIME_H_
 
+#include <stddef.h>
+#include <stdint.h>
 #include <list>
 #include <map>
 #include <memory>
 #include <vector>
 
+#include "api/rtp_headers.h"
 #include "modules/remote_bitrate_estimator/aimd_rate_control.h"
 #include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "modules/remote_bitrate_estimator/inter_arrival.h"
@@ -26,6 +29,8 @@
 #include "rtc_base/criticalsection.h"
 #include "rtc_base/race_checker.h"
 #include "rtc_base/rate_statistics.h"
+#include "rtc_base/thread_annotations.h"
+#include "system_wrappers/include/clock.h"
 
 namespace webrtc {
 
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time_unittest.cc b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time_unittest.cc
index bf7f594..117beba 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time_unittest.cc
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time_unittest.cc
@@ -9,8 +9,10 @@
  */
 
 #include "modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
+
 #include "modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h"
 #include "rtc_base/constructormagic.h"
+#include "test/gtest.h"
 
 namespace webrtc {
 
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc
index 2a4ef06..c1116a4 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc
@@ -9,8 +9,10 @@
  */
 
 #include "modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h"
+
 #include "modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h"
 #include "rtc_base/constructormagic.h"
+#include "test/gtest.h"
 
 namespace webrtc {
 
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc b/modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc
index a623bf1..74feed2 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc
@@ -9,20 +9,22 @@
  */
 
 #ifndef WEBRTC_WIN
-#include <sys/types.h>
 #include <unistd.h>
 #endif
 
+#include <stdint.h>
 #include <algorithm>
-#include <sstream>
 
-#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
+#include "modules/remote_bitrate_estimator/test/bwe.h"
 #include "modules/remote_bitrate_estimator/test/bwe_test.h"
+#include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 #include "modules/remote_bitrate_estimator/test/packet_receiver.h"
 #include "modules/remote_bitrate_estimator/test/packet_sender.h"
 #include "rtc_base/constructormagic.h"
 #include "rtc_base/random.h"
+#include "system_wrappers/include/clock.h"
 #include "test/field_trial.h"
+#include "test/gtest.h"
 #include "test/testsupport/fileutils.h"
 
 namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/test/bbr_paced_sender.cc b/modules/remote_bitrate_estimator/test/bbr_paced_sender.cc
index e9321c6..9b80585 100644
--- a/modules/remote_bitrate_estimator/test/bbr_paced_sender.cc
+++ b/modules/remote_bitrate_estimator/test/bbr_paced_sender.cc
@@ -11,10 +11,8 @@
 #include "modules/remote_bitrate_estimator/test/bbr_paced_sender.h"
 
 #include <algorithm>
-#include <queue>
-#include <set>
-#include <vector>
 
+#include "api/transport/network_types.h"
 #include "modules/pacing/paced_sender.h"
 #include "modules/remote_bitrate_estimator/test/estimators/congestion_window.h"
 #include "system_wrappers/include/clock.h"
diff --git a/modules/remote_bitrate_estimator/test/bwe.h b/modules/remote_bitrate_estimator/test/bwe.h
index 350a249..62f8dc1 100644
--- a/modules/remote_bitrate_estimator/test/bwe.h
+++ b/modules/remote_bitrate_estimator/test/bwe.h
@@ -11,17 +11,21 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+#include <iterator>
 #include <list>
 #include <map>
-#include <sstream>
-#include <string>
+#include <utility>
 
 #include "modules/bitrate_controller/include/bitrate_controller.h"
+#include "modules/include/module.h"
 #include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 #include "modules/remote_bitrate_estimator/test/packet.h"
 #include "rtc_base/constructormagic.h"
 #include "rtc_base/gtest_prod_util.h"
 #include "rtc_base/numerics/sequence_number_util.h"
+#include "system_wrappers/include/clock.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc b/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc
index 9f2bc5a..8661540 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc
+++ b/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc
@@ -11,13 +11,12 @@
 #include "modules/remote_bitrate_estimator/test/bwe_test_baselinefile.h"
 
 #include <stdio.h>
-
 #include <algorithm>
+#include <cstdint>
 #include <memory>
 #include <vector>
 
 #include "modules/remote_bitrate_estimator/test/bwe_test_fileutils.h"
-#include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
 #include "rtc_base/constructormagic.h"
 #include "test/testsupport/fileutils.h"
 
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.h b/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.h
index f07fb14..d9f22c0 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.h
+++ b/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.h
@@ -11,8 +11,8 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_BASELINEFILE_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_BASELINEFILE_H_
 
+#include <stdint.h>
 #include <string>
-#include "modules/include/module_common_types.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_fileutils.h b/modules/remote_bitrate_estimator/test/bwe_test_fileutils.h
index 55a03ce..fcb1538 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_fileutils.h
+++ b/modules/remote_bitrate_estimator/test/bwe_test_fileutils.h
@@ -11,11 +11,10 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FILEUTILS_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_FILEUTILS_H_
 
+#include <stdint.h>
 #include <stdio.h>
-
 #include <string>
 
-#include "modules/include/module_common_types.h"
 #include "rtc_base/constructormagic.h"
 
 namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_framework.cc b/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
index 0cd8129..1fd7832 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
+++ b/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
@@ -11,10 +11,13 @@
 #include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 
 #include <stdio.h>
-
+#include <stdlib.h>
+#include <string.h>
+#include <cmath>
 #include <sstream>
 
-#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
+#include "modules/rtp_rtcp/source/rtp_packet_received.h"
 #include "rtc_base/constructormagic.h"
 #include "rtc_base/numerics/safe_minmax.h"
 #include "rtc_base/system/unused.h"
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc b/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc
index 3e41ac1..6daac19 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc
+++ b/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc
@@ -10,10 +10,11 @@
 
 #include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 
-#include <numeric>
-
+#include "modules/include/module_common_types_public.h"
+#include "modules/remote_bitrate_estimator/test/bwe.h"
 #include "modules/remote_bitrate_estimator/test/packet.h"
 #include "modules/remote_bitrate_estimator/test/packet_sender.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "rtc_base/constructormagic.h"
 #include "test/gtest.h"
 #include "test/testsupport/fileutils.h"
diff --git a/modules/remote_bitrate_estimator/test/bwe_unittest.cc b/modules/remote_bitrate_estimator/test/bwe_unittest.cc
index fd4d4e7..15bccd9 100644
--- a/modules/remote_bitrate_estimator/test/bwe_unittest.cc
+++ b/modules/remote_bitrate_estimator/test/bwe_unittest.cc
@@ -10,6 +10,8 @@
 
 #include "modules/remote_bitrate_estimator/test/bwe.h"
 
+#include <algorithm>
+#include <cstdint>
 #include <random>
 #include <vector>
 
diff --git a/modules/remote_bitrate_estimator/test/estimators/bbr.cc b/modules/remote_bitrate_estimator/test/estimators/bbr.cc
index 1f01c6d..b7daa81 100644
--- a/modules/remote_bitrate_estimator/test/estimators/bbr.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/bbr.cc
@@ -12,6 +12,7 @@
 #include "modules/remote_bitrate_estimator/test/estimators/bbr.h"
 
 #include <stdlib.h>
+#include <time.h>
 #include <algorithm>
 
 #include "modules/remote_bitrate_estimator/test/estimators/congestion_window.h"
diff --git a/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc b/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
index ac22cd0..9f2377f 100644
--- a/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
@@ -11,9 +11,8 @@
 
 #include "modules/remote_bitrate_estimator/test/estimators/congestion_window.h"
 
-#include <algorithm>
-
 #include "modules/remote_bitrate_estimator/test/estimators/bbr.h"
+#include "rtc_base/checks.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/estimators/congestion_window.h b/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
index a0952af..f7ae432 100644
--- a/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
+++ b/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
@@ -12,9 +12,11 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDOW_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDOW_H_
 
-#include "modules/remote_bitrate_estimator/test/estimators/bbr.h"
+#include <stddef.h>
+#include <stdint.h>
 
 #include "absl/types/optional.h"
+#include "modules/remote_bitrate_estimator/test/estimators/bbr.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h b/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h
index 489b47e..99c8020 100644
--- a/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h
+++ b/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h
@@ -12,15 +12,9 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_MAX_BANDWIDTH_FILTER_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_MAX_BANDWIDTH_FILTER_H_
 
-#include <climits>
-#include <list>
-#include <map>
-#include <memory>
+#include <cstddef>
+#include <cstdint>
 #include <utility>
-#include <vector>
-
-#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
-#include "modules/remote_bitrate_estimator/test/bwe.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter.h b/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter.h
index 300ba34..4ac392b 100644
--- a/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter.h
+++ b/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter.h
@@ -12,8 +12,7 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_MIN_RTT_FILTER_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_MIN_RTT_FILTER_H_
 
-#include <cstdint>
-#include <limits>
+#include <stddef.h>
 #include <list>
 
 #include "absl/types/optional.h"
diff --git a/modules/remote_bitrate_estimator/test/estimators/nada.cc b/modules/remote_bitrate_estimator/test/estimators/nada.cc
index c189d47..b7f5c9a 100644
--- a/modules/remote_bitrate_estimator/test/estimators/nada.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/nada.cc
@@ -15,10 +15,12 @@
 //  From March 26, 2015.
 
 #include <math.h>
+#include <stddef.h>
 #include <algorithm>
+#include <cstdint>
+#include <list>
 #include <vector>
 
-#include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
 #include "modules/remote_bitrate_estimator/test/estimators/nada.h"
 #include "modules/rtp_rtcp/include/receive_statistics.h"
 #include "rtc_base/arraysize.h"
diff --git a/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc b/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc
index 2b48528..abad4ad 100644
--- a/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc
@@ -10,17 +10,14 @@
 
 #include "modules/remote_bitrate_estimator/test/estimators/nada.h"
 
+#include <math.h>
+#include <stddef.h>
 #include <algorithm>
 #include <memory>
-#include <numeric>
 
-#include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 #include "modules/remote_bitrate_estimator/test/packet.h"
-#include "modules/remote_bitrate_estimator/test/packet_sender.h"
 #include "rtc_base/arraysize.h"
-#include "rtc_base/constructormagic.h"
 #include "test/gtest.h"
-#include "test/testsupport/fileutils.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/estimators/remb.cc b/modules/remote_bitrate_estimator/test/estimators/remb.cc
index 14e884e..3af91c4 100644
--- a/modules/remote_bitrate_estimator/test/estimators/remb.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/remb.cc
@@ -8,14 +8,17 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include <assert.h>
+#include <stddef.h>
 #include <algorithm>
-
-#include "modules/remote_bitrate_estimator/test/estimators/remb.h"
+#include <cstdint>
 
 #include "modules/bitrate_controller/include/bitrate_controller.h"
 #include "modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
 #include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
+#include "modules/remote_bitrate_estimator/test/estimators/remb.h"
 #include "modules/rtp_rtcp/include/receive_statistics.h"
+#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 #include "rtc_base/strings/string_builder.h"
 #include "rtc_base/system/unused.h"
 #include "test/gtest.h"
diff --git a/modules/remote_bitrate_estimator/test/estimators/send_side.cc b/modules/remote_bitrate_estimator/test/estimators/send_side.cc
index 289ff70..7c1d8c4 100644
--- a/modules/remote_bitrate_estimator/test/estimators/send_side.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/send_side.cc
@@ -10,9 +10,13 @@
 
 #include "modules/remote_bitrate_estimator/test/estimators/send_side.h"
 
+#include <assert.h>
+#include <stddef.h>
 #include <algorithm>
 
 #include "absl/memory/memory.h"
+#include "api/rtp_headers.h"
+#include "api/transport/network_types.h"
 #include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
 #include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
 #include "rtc_base/logging.h"
diff --git a/modules/remote_bitrate_estimator/test/estimators/send_side.h b/modules/remote_bitrate_estimator/test/estimators/send_side.h
index 5b45e66..f545b96 100644
--- a/modules/remote_bitrate_estimator/test/estimators/send_side.h
+++ b/modules/remote_bitrate_estimator/test/estimators/send_side.h
@@ -11,13 +11,23 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_
 
+#include <stdint.h>
 #include <memory>
 #include <vector>
 
 #include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
+#include "modules/bitrate_controller/include/bitrate_controller.h"
 #include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h"
+#include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
 #include "modules/congestion_controller/rtp/send_time_history.h"
+#include "modules/include/module_common_types_public.h"
+#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "modules/remote_bitrate_estimator/test/bwe.h"
+#include "modules/remote_bitrate_estimator/test/packet.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
+#include "rtc_base/constructormagic.h"
+#include "system_wrappers/include/clock.h"
+#include "test/gmock.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/estimators/tcp.cc b/modules/remote_bitrate_estimator/test/estimators/tcp.cc
index 759c2f6..96c97ed 100644
--- a/modules/remote_bitrate_estimator/test/estimators/tcp.cc
+++ b/modules/remote_bitrate_estimator/test/estimators/tcp.cc
@@ -8,15 +8,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include <algorithm>
+#include <cstdint>
 
+#include "api/rtp_headers.h"
 #include "modules/remote_bitrate_estimator/test/estimators/tcp.h"
 
-#include "modules/bitrate_controller/include/bitrate_controller.h"
-#include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
-#include "modules/rtp_rtcp/include/receive_statistics.h"
-#include "test/gtest.h"
-
 namespace webrtc {
 namespace testing {
 namespace bwe {
diff --git a/modules/remote_bitrate_estimator/test/estimators/tcp.h b/modules/remote_bitrate_estimator/test/estimators/tcp.h
index aa4584c..abdc071 100644
--- a/modules/remote_bitrate_estimator/test/estimators/tcp.h
+++ b/modules/remote_bitrate_estimator/test/estimators/tcp.h
@@ -11,9 +11,11 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_TCP_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_TCP_H_
 
+#include <stdint.h>
 #include <vector>
 
 #include "modules/remote_bitrate_estimator/test/bwe.h"
+#include "modules/remote_bitrate_estimator/test/packet.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/metric_recorder_unittest.cc b/modules/remote_bitrate_estimator/test/metric_recorder_unittest.cc
index bc0d6d4..c778cb8 100644
--- a/modules/remote_bitrate_estimator/test/metric_recorder_unittest.cc
+++ b/modules/remote_bitrate_estimator/test/metric_recorder_unittest.cc
@@ -12,6 +12,7 @@
 
 #include <math.h>
 #include <algorithm>
+#include <cstdint>
 #include <random>
 #include <vector>
 
diff --git a/modules/remote_bitrate_estimator/test/packet.cc b/modules/remote_bitrate_estimator/test/packet.cc
index 910f638..d318f09 100644
--- a/modules/remote_bitrate_estimator/test/packet.cc
+++ b/modules/remote_bitrate_estimator/test/packet.cc
@@ -10,6 +10,9 @@
 
 #include "modules/remote_bitrate_estimator/test/packet.h"
 
+#include <assert.h>
+#include <cstdint>
+
 namespace webrtc {
 namespace testing {
 namespace bwe {
diff --git a/modules/remote_bitrate_estimator/test/packet.h b/modules/remote_bitrate_estimator/test/packet.h
index 6f44988..5a8c646 100644
--- a/modules/remote_bitrate_estimator/test/packet.h
+++ b/modules/remote_bitrate_estimator/test/packet.h
@@ -11,13 +11,13 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_
 
+#include <stddef.h>
+#include <stdint.h>
 #include <list>
 #include <map>
-#include <utility>
 #include <vector>
 
-#include "common_types.h"  // NOLINT(build/include)
-#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
+#include "api/rtp_headers.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtp_packet_received.h"
 
diff --git a/modules/remote_bitrate_estimator/test/packet_receiver.cc b/modules/remote_bitrate_estimator/test/packet_receiver.cc
index d68ea9a..abd1b5f 100644
--- a/modules/remote_bitrate_estimator/test/packet_receiver.cc
+++ b/modules/remote_bitrate_estimator/test/packet_receiver.cc
@@ -10,14 +10,12 @@
 
 #include "modules/remote_bitrate_estimator/test/packet_receiver.h"
 
+#include <list>
 #include <vector>
 
-#include "modules/include/module_common_types.h"
 #include "modules/remote_bitrate_estimator/test/bwe.h"
 #include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
-#include "modules/rtp_rtcp/include/receive_statistics.h"
-#include "system_wrappers/include/clock.h"
-#include "test/gtest.h"
+#include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
 
 namespace webrtc {
 namespace testing {
diff --git a/modules/remote_bitrate_estimator/test/packet_receiver.h b/modules/remote_bitrate_estimator/test/packet_receiver.h
index af9dadb..940d4b0 100644
--- a/modules/remote_bitrate_estimator/test/packet_receiver.h
+++ b/modules/remote_bitrate_estimator/test/packet_receiver.h
@@ -11,12 +11,15 @@
 #ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_
 #define MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_
 
+#include <stddef.h>
+#include <stdint.h>
 #include <memory>
 #include <string>
 
 #include "modules/remote_bitrate_estimator/test/bwe.h"
 #include "modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 #include "modules/remote_bitrate_estimator/test/metric_recorder.h"
+#include "modules/remote_bitrate_estimator/test/packet.h"
 #include "rtc_base/constructormagic.h"
 
 namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/test/packet_sender.cc b/modules/remote_bitrate_estimator/test/packet_sender.cc
index 06e5505..4585463 100644
--- a/modules/remote_bitrate_estimator/test/packet_sender.cc
+++ b/modules/remote_bitrate_estimator/test/packet_sender.cc
@@ -10,15 +10,20 @@
 
 #include "modules/remote_bitrate_estimator/test/packet_sender.h"
 
+#include <assert.h>
+#include <math.h>
 #include <algorithm>
+#include <limits>
 #include <list>
-#include <sstream>
+#include <vector>
 
-#include "modules/include/module_common_types.h"
+#include "modules/include/module_common_types_public.h"
 #include "modules/pacing/pacer.h"
 #include "modules/remote_bitrate_estimator/test/bbr_paced_sender.h"
 #include "modules/remote_bitrate_estimator/test/bwe.h"
+#include "modules/remote_bitrate_estimator/test/bwe_test_logging.h"
 #include "modules/remote_bitrate_estimator/test/metric_recorder.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "rtc_base/checks.h"
 
 namespace webrtc {