Fully qualify googletest symbols.

Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
diff --git a/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc b/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
index d8fd9e0..99a9e29 100644
--- a/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
+++ b/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
@@ -66,7 +66,7 @@
       absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
     auto dec = absl::make_unique<testing::StrictMock<MockAudioDecoder>>();
     EXPECT_CALL(*dec, SampleRateHz())
-        .WillOnce(testing::Return(Params::CodecInfo().sample_rate_hz));
+        .WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz));
     EXPECT_CALL(*dec, Die());
     return std::move(dec);
   }
@@ -78,7 +78,7 @@
   rtc::scoped_refptr<AudioDecoderFactory> factory(
       new rtc::RefCountedObject<
           audio_decoder_factory_template_impl::AudioDecoderFactoryT<>>());
-  EXPECT_THAT(factory->GetSupportedDecoders(), testing::IsEmpty());
+  EXPECT_THAT(factory->GetSupportedDecoders(), ::testing::IsEmpty());
   EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
   EXPECT_EQ(nullptr,
             factory->MakeAudioDecoder({"bar", 16000, 1}, absl::nullopt));
@@ -87,7 +87,7 @@
 TEST(AudioDecoderFactoryTemplateTest, OneDecoderType) {
   auto factory = CreateAudioDecoderFactory<AudioDecoderFakeApi<BogusParams>>();
   EXPECT_THAT(factory->GetSupportedDecoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}}));
   EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
   EXPECT_TRUE(factory->IsSupportedDecoder({"bogus", 8000, 1}));
@@ -102,7 +102,7 @@
   auto factory = CreateAudioDecoderFactory<AudioDecoderFakeApi<BogusParams>,
                                            AudioDecoderFakeApi<ShamParams>>();
   EXPECT_THAT(factory->GetSupportedDecoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}},
                   AudioCodecSpec{{"sham", 16000, 2, {{"param", "value"}}},
                                  {16000, 2, 23456}}));
@@ -126,7 +126,7 @@
 TEST(AudioDecoderFactoryTemplateTest, G711) {
   auto factory = CreateAudioDecoderFactory<AudioDecoderG711>();
   EXPECT_THAT(factory->GetSupportedDecoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"PCMU", 8000, 1}, {8000, 1, 64000}},
                   AudioCodecSpec{{"PCMA", 8000, 1}, {8000, 1, 64000}}));
   EXPECT_FALSE(factory->IsSupportedDecoder({"G711", 8000, 1}));
@@ -145,7 +145,7 @@
 TEST(AudioDecoderFactoryTemplateTest, G722) {
   auto factory = CreateAudioDecoderFactory<AudioDecoderG722>();
   EXPECT_THAT(factory->GetSupportedDecoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"G722", 8000, 1}, {16000, 1, 64000}}));
   EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
   EXPECT_TRUE(factory->IsSupportedDecoder({"G722", 8000, 1}));
@@ -166,7 +166,7 @@
 TEST(AudioDecoderFactoryTemplateTest, Ilbc) {
   auto factory = CreateAudioDecoderFactory<AudioDecoderIlbc>();
   EXPECT_THAT(factory->GetSupportedDecoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"ILBC", 8000, 1}, {8000, 1, 13300}}));
   EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
   EXPECT_TRUE(factory->IsSupportedDecoder({"ilbc", 8000, 1}));
@@ -180,7 +180,7 @@
 TEST(AudioDecoderFactoryTemplateTest, IsacFix) {
   auto factory = CreateAudioDecoderFactory<AudioDecoderIsacFix>();
   EXPECT_THAT(factory->GetSupportedDecoders(),
-              testing::ElementsAre(AudioCodecSpec{
+              ::testing::ElementsAre(AudioCodecSpec{
                   {"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}}));
   EXPECT_FALSE(factory->IsSupportedDecoder({"isac", 16000, 2}));
   EXPECT_TRUE(factory->IsSupportedDecoder({"isac", 16000, 1}));
@@ -196,7 +196,7 @@
   auto factory = CreateAudioDecoderFactory<AudioDecoderIsacFloat>();
   EXPECT_THAT(
       factory->GetSupportedDecoders(),
-      testing::ElementsAre(
+      ::testing::ElementsAre(
           AudioCodecSpec{{"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}},
           AudioCodecSpec{{"ISAC", 32000, 1}, {32000, 1, 56000, 10000, 56000}}));
   EXPECT_FALSE(factory->IsSupportedDecoder({"isac", 16000, 2}));
@@ -216,7 +216,7 @@
   auto factory = CreateAudioDecoderFactory<AudioDecoderL16>();
   EXPECT_THAT(
       factory->GetSupportedDecoders(),
-      testing::ElementsAre(
+      ::testing::ElementsAre(
           AudioCodecSpec{{"L16", 8000, 1}, {8000, 1, 8000 * 16}},
           AudioCodecSpec{{"L16", 16000, 1}, {16000, 1, 16000 * 16}},
           AudioCodecSpec{{"L16", 32000, 1}, {32000, 1, 32000 * 16}},
@@ -241,7 +241,7 @@
   const SdpAudioFormat opus_format(
       {"opus", 48000, 2, {{"minptime", "10"}, {"useinbandfec", "1"}}});
   EXPECT_THAT(factory->GetSupportedDecoders(),
-              testing::ElementsAre(AudioCodecSpec{opus_format, opus_info}));
+              ::testing::ElementsAre(AudioCodecSpec{opus_format, opus_info}));
   EXPECT_FALSE(factory->IsSupportedDecoder({"opus", 48000, 1}));
   EXPECT_TRUE(factory->IsSupportedDecoder({"opus", 48000, 2}));
   EXPECT_EQ(nullptr,
diff --git a/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc b/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc
index ca024b9..4188c8c 100644
--- a/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc
+++ b/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc
@@ -67,7 +67,7 @@
       absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
     auto enc = absl::make_unique<testing::StrictMock<MockAudioEncoder>>();
     EXPECT_CALL(*enc, SampleRateHz())
-        .WillOnce(testing::Return(Params::CodecInfo().sample_rate_hz));
+        .WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz));
     return std::move(enc);
   }
 };
@@ -78,7 +78,7 @@
   rtc::scoped_refptr<AudioEncoderFactory> factory(
       new rtc::RefCountedObject<
           audio_encoder_factory_template_impl::AudioEncoderFactoryT<>>());
-  EXPECT_THAT(factory->GetSupportedEncoders(), testing::IsEmpty());
+  EXPECT_THAT(factory->GetSupportedEncoders(), ::testing::IsEmpty());
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
   EXPECT_EQ(nullptr,
             factory->MakeAudioEncoder(17, {"bar", 16000, 1}, absl::nullopt));
@@ -87,7 +87,7 @@
 TEST(AudioEncoderFactoryTemplateTest, OneEncoderType) {
   auto factory = CreateAudioEncoderFactory<AudioEncoderFakeApi<BogusParams>>();
   EXPECT_THAT(factory->GetSupportedEncoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}}));
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
   EXPECT_EQ(AudioCodecInfo(8000, 1, 12345),
@@ -103,7 +103,7 @@
   auto factory = CreateAudioEncoderFactory<AudioEncoderFakeApi<BogusParams>,
                                            AudioEncoderFakeApi<ShamParams>>();
   EXPECT_THAT(factory->GetSupportedEncoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}},
                   AudioCodecSpec{{"sham", 16000, 2, {{"param", "value"}}},
                                  {16000, 2, 23456}}));
@@ -129,7 +129,7 @@
 TEST(AudioEncoderFactoryTemplateTest, G711) {
   auto factory = CreateAudioEncoderFactory<AudioEncoderG711>();
   EXPECT_THAT(factory->GetSupportedEncoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"PCMU", 8000, 1}, {8000, 1, 64000}},
                   AudioCodecSpec{{"PCMA", 8000, 1}, {8000, 1, 64000}}));
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"PCMA", 16000, 1}));
@@ -148,7 +148,7 @@
 TEST(AudioEncoderFactoryTemplateTest, G722) {
   auto factory = CreateAudioEncoderFactory<AudioEncoderG722>();
   EXPECT_THAT(factory->GetSupportedEncoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"G722", 8000, 1}, {16000, 1, 64000}}));
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
   EXPECT_EQ(AudioCodecInfo(16000, 1, 64000),
@@ -163,7 +163,7 @@
 TEST(AudioEncoderFactoryTemplateTest, Ilbc) {
   auto factory = CreateAudioEncoderFactory<AudioEncoderIlbc>();
   EXPECT_THAT(factory->GetSupportedEncoders(),
-              testing::ElementsAre(
+              ::testing::ElementsAre(
                   AudioCodecSpec{{"ILBC", 8000, 1}, {8000, 1, 13333}}));
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
   EXPECT_EQ(AudioCodecInfo(8000, 1, 13333),
@@ -178,7 +178,7 @@
 TEST(AudioEncoderFactoryTemplateTest, IsacFix) {
   auto factory = CreateAudioEncoderFactory<AudioEncoderIsacFix>();
   EXPECT_THAT(factory->GetSupportedEncoders(),
-              testing::ElementsAre(AudioCodecSpec{
+              ::testing::ElementsAre(AudioCodecSpec{
                   {"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}}));
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"isac", 16000, 2}));
   EXPECT_EQ(AudioCodecInfo(16000, 1, 32000, 10000, 32000),
@@ -200,7 +200,7 @@
   auto factory = CreateAudioEncoderFactory<AudioEncoderIsacFloat>();
   EXPECT_THAT(
       factory->GetSupportedEncoders(),
-      testing::ElementsAre(
+      ::testing::ElementsAre(
           AudioCodecSpec{{"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}},
           AudioCodecSpec{{"ISAC", 32000, 1}, {32000, 1, 56000, 10000, 56000}}));
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"isac", 16000, 2}));
@@ -222,7 +222,7 @@
   auto factory = CreateAudioEncoderFactory<AudioEncoderL16>();
   EXPECT_THAT(
       factory->GetSupportedEncoders(),
-      testing::ElementsAre(
+      ::testing::ElementsAre(
           AudioCodecSpec{{"L16", 8000, 1}, {8000, 1, 8000 * 16}},
           AudioCodecSpec{{"L16", 16000, 1}, {16000, 1, 16000 * 16}},
           AudioCodecSpec{{"L16", 32000, 1}, {32000, 1, 32000 * 16}},
@@ -246,7 +246,7 @@
   info.supports_network_adaption = true;
   EXPECT_THAT(
       factory->GetSupportedEncoders(),
-      testing::ElementsAre(AudioCodecSpec{
+      ::testing::ElementsAre(AudioCodecSpec{
           {"opus", 48000, 2, {{"minptime", "10"}, {"useinbandfec", "1"}}},
           info}));
   EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
diff --git a/api/test/loopback_media_transport_unittest.cc b/api/test/loopback_media_transport_unittest.cc
index b827405..8e510e6 100644
--- a/api/test/loopback_media_transport_unittest.cc
+++ b/api/test/loopback_media_transport_unittest.cc
@@ -86,11 +86,11 @@
   std::unique_ptr<rtc::Thread> thread = rtc::Thread::Create();
   thread->Start();
   MediaTransportPair transport_pair(thread.get());
-  testing::StrictMock<MockMediaTransportAudioSinkInterface> sink;
+  ::testing::StrictMock<MockMediaTransportAudioSinkInterface> sink;
   EXPECT_CALL(sink,
-              OnData(1, testing::Property(
+              OnData(1, ::testing::Property(
                             &MediaTransportEncodedAudioFrame::sequence_number,
-                            testing::Eq(10))));
+                            ::testing::Eq(10))));
   transport_pair.second()->SetReceiveAudioSink(&sink);
   transport_pair.first()->SendAudioFrame(1, CreateAudioFrame(10));
 
@@ -102,17 +102,17 @@
   std::unique_ptr<rtc::Thread> thread = rtc::Thread::Create();
   thread->Start();
   MediaTransportPair transport_pair(thread.get());
-  testing::StrictMock<MockMediaTransportVideoSinkInterface> sink;
+  ::testing::StrictMock<MockMediaTransportVideoSinkInterface> sink;
   constexpr uint8_t encoded_data[] = {1, 2, 3};
   EncodedImage encoded_image;
   encoded_image.Allocate(sizeof(encoded_data));
   memcpy(encoded_image.data(), encoded_data, sizeof(encoded_data));
   encoded_image.set_size(sizeof(encoded_data));
 
-  EXPECT_CALL(sink, OnData(1, testing::Property(
+  EXPECT_CALL(sink, OnData(1, ::testing::Property(
                                   &MediaTransportEncodedVideoFrame::frame_id,
-                                  testing::Eq(10))))
-      .WillOnce(testing::Invoke(
+                                  ::testing::Eq(10))))
+      .WillOnce(::testing::Invoke(
           [&encoded_image](int frame_id,
                            const MediaTransportEncodedVideoFrame& frame) {
             EXPECT_NE(frame.encoded_image().data(), encoded_image.data());
@@ -135,8 +135,8 @@
   std::unique_ptr<rtc::Thread> thread = rtc::Thread::Create();
   thread->Start();
   MediaTransportPair transport_pair(thread.get());
-  testing::StrictMock<MockMediaTransportKeyFrameRequestCallback> callback1;
-  testing::StrictMock<MockMediaTransportKeyFrameRequestCallback> callback2;
+  ::testing::StrictMock<MockMediaTransportKeyFrameRequestCallback> callback1;
+  ::testing::StrictMock<MockMediaTransportKeyFrameRequestCallback> callback2;
   const uint64_t kFirstChannelId = 1111;
   const uint64_t kSecondChannelId = 2222;
 
@@ -160,11 +160,11 @@
   transport_pair.first()->SetDataSink(&sink);
 
   const int channel_id = 1;
-  EXPECT_CALL(sink,
-              OnDataReceived(
-                  channel_id, DataMessageType::kText,
-                  testing::Property<rtc::CopyOnWriteBuffer, const char*>(
-                      &rtc::CopyOnWriteBuffer::cdata, testing::StrEq("foo"))));
+  EXPECT_CALL(
+      sink, OnDataReceived(
+                channel_id, DataMessageType::kText,
+                ::testing::Property<rtc::CopyOnWriteBuffer, const char*>(
+                    &rtc::CopyOnWriteBuffer::cdata, ::testing::StrEq("foo"))));
 
   SendDataParams params;
   params.type = DataMessageType::kText;
@@ -188,7 +188,7 @@
 
   const int channel_id = 1;
   {
-    testing::InSequence s;
+    ::testing::InSequence s;
     EXPECT_CALL(second_sink, OnChannelClosing(channel_id));
     EXPECT_CALL(second_sink, OnChannelClosed(channel_id));
     EXPECT_CALL(first_sink, OnChannelClosed(channel_id));
diff --git a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc
index 40cbb1f..8ccafcc 100644
--- a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc
+++ b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc
@@ -552,8 +552,8 @@
 }
 
 TEST(SoftwareFallbackEncoderTest, BothRateControllersNotTrusted) {
-  auto* sw_encoder = new testing::NiceMock<MockVideoEncoder>();
-  auto* hw_encoder = new testing::NiceMock<MockVideoEncoder>();
+  auto* sw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
+  auto* hw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
 
   EXPECT_CALL(*sw_encoder, GetEncoderInfo())
       .WillRepeatedly(Return(GetEncoderInfoWithTrustedRateController(false)));
@@ -568,8 +568,8 @@
 }
 
 TEST(SoftwareFallbackEncoderTest, SwRateControllerTrusted) {
-  auto* sw_encoder = new testing::NiceMock<MockVideoEncoder>();
-  auto* hw_encoder = new testing::NiceMock<MockVideoEncoder>();
+  auto* sw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
+  auto* hw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
   EXPECT_CALL(*sw_encoder, GetEncoderInfo())
       .WillRepeatedly(Return(GetEncoderInfoWithTrustedRateController(true)));
   EXPECT_CALL(*hw_encoder, GetEncoderInfo())
@@ -583,8 +583,8 @@
 }
 
 TEST(SoftwareFallbackEncoderTest, HwRateControllerTrusted) {
-  auto* sw_encoder = new testing::NiceMock<MockVideoEncoder>();
-  auto* hw_encoder = new testing::NiceMock<MockVideoEncoder>();
+  auto* sw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
+  auto* hw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
   EXPECT_CALL(*sw_encoder, GetEncoderInfo())
       .WillRepeatedly(Return(GetEncoderInfoWithTrustedRateController(false)));
   EXPECT_CALL(*hw_encoder, GetEncoderInfo())
@@ -608,8 +608,8 @@
 }
 
 TEST(SoftwareFallbackEncoderTest, BothRateControllersTrusted) {
-  auto* sw_encoder = new testing::NiceMock<MockVideoEncoder>();
-  auto* hw_encoder = new testing::NiceMock<MockVideoEncoder>();
+  auto* sw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
+  auto* hw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
   EXPECT_CALL(*sw_encoder, GetEncoderInfo())
       .WillRepeatedly(Return(GetEncoderInfoWithTrustedRateController(true)));
   EXPECT_CALL(*hw_encoder, GetEncoderInfo())
@@ -623,8 +623,8 @@
 }
 
 TEST(SoftwareFallbackEncoderTest, ReportsHardwareAccelerated) {
-  auto* sw_encoder = new testing::NiceMock<MockVideoEncoder>();
-  auto* hw_encoder = new testing::NiceMock<MockVideoEncoder>();
+  auto* sw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
+  auto* hw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
   EXPECT_CALL(*sw_encoder, GetEncoderInfo())
       .WillRepeatedly(Return(GetEncoderInfoWithHardwareAccelerated(false)));
   EXPECT_CALL(*hw_encoder, GetEncoderInfo())
@@ -647,8 +647,8 @@
 }
 
 TEST(SoftwareFallbackEncoderTest, ReportsInternalSource) {
-  auto* sw_encoder = new testing::NiceMock<MockVideoEncoder>();
-  auto* hw_encoder = new testing::NiceMock<MockVideoEncoder>();
+  auto* sw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
+  auto* hw_encoder = new ::testing::NiceMock<MockVideoEncoder>();
   EXPECT_CALL(*sw_encoder, GetEncoderInfo())
       .WillRepeatedly(Return(GetEncoderInfoWithInternalSource(false)));
   EXPECT_CALL(*hw_encoder, GetEncoderInfo())
diff --git a/audio/audio_receive_stream_unittest.cc b/audio/audio_receive_stream_unittest.cc
index def4d1a..127f2ff 100644
--- a/audio/audio_receive_stream_unittest.cc
+++ b/audio/audio_receive_stream_unittest.cc
@@ -33,9 +33,9 @@
 namespace test {
 namespace {
 
-using testing::_;
-using testing::FloatEq;
-using testing::Return;
+using ::testing::_;
+using ::testing::FloatEq;
+using ::testing::Return;
 
 AudioDecodingCallStats MakeAudioDecodeStatsForTest() {
   AudioDecodingCallStats audio_decode_stats;
@@ -76,7 +76,7 @@
 
   explicit ConfigHelper(rtc::scoped_refptr<MockAudioMixer> audio_mixer)
       : audio_mixer_(audio_mixer) {
-    using testing::Invoke;
+    using ::testing::Invoke;
 
     AudioState::Config config;
     config.audio_mixer = audio_mixer_;
@@ -85,7 +85,7 @@
         new rtc::RefCountedObject<testing::NiceMock<MockAudioDeviceModule>>();
     audio_state_ = AudioState::Create(config);
 
-    channel_receive_ = new testing::StrictMock<MockChannelReceive>();
+    channel_receive_ = new ::testing::StrictMock<MockChannelReceive>();
     EXPECT_CALL(*channel_receive_, SetLocalSSRC(kLocalSsrc)).Times(1);
     EXPECT_CALL(*channel_receive_, SetNACKStatus(true, 15)).Times(1);
     EXPECT_CALL(*channel_receive_,
@@ -96,7 +96,7 @@
     EXPECT_CALL(*channel_receive_, SetAssociatedSendChannel(nullptr)).Times(1);
     EXPECT_CALL(*channel_receive_, SetReceiveCodecs(_))
         .WillRepeatedly(Invoke([](const std::map<int, SdpAudioFormat>& codecs) {
-          EXPECT_THAT(codecs, testing::IsEmpty());
+          EXPECT_THAT(codecs, ::testing::IsEmpty());
         }));
 
     stream_config_.rtp.local_ssrc = kLocalSsrc;
@@ -124,8 +124,8 @@
   MockChannelReceive* channel_receive() { return channel_receive_; }
 
   void SetupMockForGetStats() {
-    using testing::DoAll;
-    using testing::SetArgPointee;
+    using ::testing::DoAll;
+    using ::testing::SetArgPointee;
 
     ASSERT_TRUE(channel_receive_);
     EXPECT_CALL(*channel_receive_, GetRTCPStatistics())
@@ -152,7 +152,7 @@
   rtc::scoped_refptr<AudioState> audio_state_;
   rtc::scoped_refptr<MockAudioMixer> audio_mixer_;
   AudioReceiveStream::Config stream_config_;
-  testing::StrictMock<MockChannelReceive>* channel_receive_ = nullptr;
+  ::testing::StrictMock<MockChannelReceive>* channel_receive_ = nullptr;
   RtpStreamReceiverController rtp_stream_receiver_controller_;
   MockTransport rtcp_send_transport_;
 };
@@ -242,7 +242,7 @@
   parsed_packet.set_arrival_time_ms((packet_time_us + 500) / 1000);
 
   EXPECT_CALL(*helper.channel_receive(),
-              OnRtpPacket(testing::Ref(parsed_packet)));
+              OnRtpPacket(::testing::Ref(parsed_packet)));
 
   recv_stream->OnRtpPacket(parsed_packet);
 }
diff --git a/audio/audio_send_stream_unittest.cc b/audio/audio_send_stream_unittest.cc
index 0db569b..701df1c 100644
--- a/audio/audio_send_stream_unittest.cc
+++ b/audio/audio_send_stream_unittest.cc
@@ -39,13 +39,13 @@
 namespace test {
 namespace {
 
-using testing::_;
-using testing::Eq;
-using testing::Ne;
-using testing::Field;
-using testing::Invoke;
-using testing::Return;
-using testing::StrEq;
+using ::testing::_;
+using ::testing::Eq;
+using ::testing::Field;
+using ::testing::Invoke;
+using ::testing::Ne;
+using ::testing::Return;
+using ::testing::StrEq;
 
 const uint32_t kSsrc = 1234;
 const char* kCName = "foo_name";
@@ -87,7 +87,7 @@
   for (const auto& spec : kCodecSpecs) {
     if (format == spec.format) {
       std::unique_ptr<MockAudioEncoder> encoder(
-          new testing::NiceMock<MockAudioEncoder>());
+          new ::testing::NiceMock<MockAudioEncoder>());
       ON_CALL(*encoder.get(), SampleRateHz())
           .WillByDefault(Return(spec.info.sample_rate_hz));
       ON_CALL(*encoder.get(), NumChannels())
@@ -136,7 +136,7 @@
             "ConfigHelper_worker_queue",
             TaskQueueFactory::Priority::NORMAL)),
         audio_encoder_(nullptr) {
-    using testing::Invoke;
+    using ::testing::Invoke;
 
     AudioState::Config config;
     config.audio_mixer = AudioMixerImpl::Create();
@@ -191,7 +191,7 @@
 
   void SetupDefaultChannelSend(bool audio_bwe_enabled) {
     EXPECT_TRUE(channel_send_ == nullptr);
-    channel_send_ = new testing::StrictMock<MockChannelSend>();
+    channel_send_ = new ::testing::StrictMock<MockChannelSend>();
     EXPECT_CALL(*channel_send_, GetRtpRtcp()).WillRepeatedly(Invoke([this]() {
       return &this->rtp_rtcp_;
     }));
@@ -254,9 +254,9 @@
   }
 
   void SetupMockForGetStats() {
-    using testing::DoAll;
-    using testing::SetArgPointee;
-    using testing::SetArgReferee;
+    using ::testing::DoAll;
+    using ::testing::SetArgPointee;
+    using ::testing::SetArgReferee;
 
     std::vector<ReportBlock> report_blocks;
     webrtc::ReportBlock block = kReportBlock;
@@ -295,15 +295,15 @@
   std::unique_ptr<TaskQueueFactory> task_queue_factory_;
   rtc::scoped_refptr<AudioState> audio_state_;
   AudioSendStream::Config stream_config_;
-  testing::StrictMock<MockChannelSend>* channel_send_ = nullptr;
+  ::testing::StrictMock<MockChannelSend>* channel_send_ = nullptr;
   rtc::scoped_refptr<MockAudioProcessing> audio_processing_;
   AudioProcessingStats audio_processing_stats_;
-  testing::StrictMock<MockRtcpBandwidthObserver> bandwidth_observer_;
-  testing::NiceMock<MockRtcEventLog> event_log_;
-  testing::NiceMock<MockRtpTransportControllerSend> rtp_transport_;
-  testing::NiceMock<MockRtpRtcp> rtp_rtcp_;
+  ::testing::StrictMock<MockRtcpBandwidthObserver> bandwidth_observer_;
+  ::testing::NiceMock<MockRtcEventLog> event_log_;
+  ::testing::NiceMock<MockRtpTransportControllerSend> rtp_transport_;
+  ::testing::NiceMock<MockRtpRtcp> rtp_rtcp_;
   MockRtcpRttStats rtcp_rtt_stats_;
-  testing::NiceMock<MockLimitObserver> limit_observer_;
+  ::testing::NiceMock<MockLimitObserver> limit_observer_;
   BitrateAllocator bitrate_allocator_;
   // |worker_queue| is defined last to ensure all pending tasks are cancelled
   // and deleted before any other members.
@@ -537,7 +537,7 @@
   }
 
   // CallEncoder will be called to re-set overhead.
-  EXPECT_CALL(*helper.channel_send(), CallEncoder(testing::_)).Times(1);
+  EXPECT_CALL(*helper.channel_send(), CallEncoder(::testing::_)).Times(1);
 
   send_stream->Reconfigure(new_config);
 }
@@ -548,7 +548,7 @@
   auto new_config = helper.config();
 
   // CallEncoder will be called on overhead change.
-  EXPECT_CALL(*helper.channel_send(), CallEncoder(testing::_)).Times(1);
+  EXPECT_CALL(*helper.channel_send(), CallEncoder(::testing::_)).Times(1);
 
   const size_t transport_overhead_per_packet_bytes = 333;
   send_stream->SetTransportOverhead(transport_overhead_per_packet_bytes);
@@ -563,7 +563,7 @@
   auto new_config = helper.config();
 
   // CallEncoder will be called on overhead change.
-  EXPECT_CALL(*helper.channel_send(), CallEncoder(testing::_)).Times(1);
+  EXPECT_CALL(*helper.channel_send(), CallEncoder(::testing::_)).Times(1);
 
   const size_t audio_overhead_per_packet_bytes = 555;
   send_stream->OnOverheadChanged(audio_overhead_per_packet_bytes);
@@ -577,7 +577,7 @@
   auto new_config = helper.config();
 
   // CallEncoder will be called when each of overhead changes.
-  EXPECT_CALL(*helper.channel_send(), CallEncoder(testing::_)).Times(2);
+  EXPECT_CALL(*helper.channel_send(), CallEncoder(::testing::_)).Times(2);
 
   const size_t transport_overhead_per_packet_bytes = 333;
   send_stream->SetTransportOverhead(transport_overhead_per_packet_bytes);
diff --git a/audio/audio_state_unittest.cc b/audio/audio_state_unittest.cc
index 75bf4e1..ed5ca22 100644
--- a/audio/audio_state_unittest.cc
+++ b/audio/audio_state_unittest.cc
@@ -112,12 +112,12 @@
 
   EXPECT_CALL(
       stream,
-      SendAudioDataForMock(testing::AllOf(
-          testing::Field(&AudioFrame::sample_rate_hz_, testing::Eq(8000)),
-          testing::Field(&AudioFrame::num_channels_, testing::Eq(2u)))))
+      SendAudioDataForMock(::testing::AllOf(
+          ::testing::Field(&AudioFrame::sample_rate_hz_, ::testing::Eq(8000)),
+          ::testing::Field(&AudioFrame::num_channels_, ::testing::Eq(2u)))))
       .WillOnce(
           // Verify that channels are not swapped by default.
-          testing::Invoke([](AudioFrame* audio_frame) {
+          ::testing::Invoke([](AudioFrame* audio_frame) {
             auto levels = ComputeChannelLevels(audio_frame);
             EXPECT_LT(0u, levels[0]);
             EXPECT_EQ(0u, levels[1]);
@@ -126,7 +126,7 @@
       static_cast<MockAudioProcessing*>(audio_state->audio_processing());
   EXPECT_CALL(*ap, set_stream_delay_ms(0));
   EXPECT_CALL(*ap, set_stream_key_pressed(false));
-  EXPECT_CALL(*ap, ProcessStream(testing::_));
+  EXPECT_CALL(*ap, ProcessStream(::testing::_));
 
   constexpr int kSampleRate = 16000;
   constexpr size_t kNumChannels = 2;
@@ -152,23 +152,23 @@
 
   EXPECT_CALL(
       stream_1,
-      SendAudioDataForMock(testing::AllOf(
-          testing::Field(&AudioFrame::sample_rate_hz_, testing::Eq(16000)),
-          testing::Field(&AudioFrame::num_channels_, testing::Eq(1u)))))
+      SendAudioDataForMock(::testing::AllOf(
+          ::testing::Field(&AudioFrame::sample_rate_hz_, ::testing::Eq(16000)),
+          ::testing::Field(&AudioFrame::num_channels_, ::testing::Eq(1u)))))
       .WillOnce(
           // Verify that there is output signal.
-          testing::Invoke([](AudioFrame* audio_frame) {
+          ::testing::Invoke([](AudioFrame* audio_frame) {
             auto levels = ComputeChannelLevels(audio_frame);
             EXPECT_LT(0u, levels[0]);
           }));
   EXPECT_CALL(
       stream_2,
-      SendAudioDataForMock(testing::AllOf(
-          testing::Field(&AudioFrame::sample_rate_hz_, testing::Eq(16000)),
-          testing::Field(&AudioFrame::num_channels_, testing::Eq(1u)))))
+      SendAudioDataForMock(::testing::AllOf(
+          ::testing::Field(&AudioFrame::sample_rate_hz_, ::testing::Eq(16000)),
+          ::testing::Field(&AudioFrame::num_channels_, ::testing::Eq(1u)))))
       .WillOnce(
           // Verify that there is output signal.
-          testing::Invoke([](AudioFrame* audio_frame) {
+          ::testing::Invoke([](AudioFrame* audio_frame) {
             auto levels = ComputeChannelLevels(audio_frame);
             EXPECT_LT(0u, levels[0]);
           }));
@@ -176,7 +176,7 @@
       static_cast<MockAudioProcessing*>(audio_state->audio_processing());
   EXPECT_CALL(*ap, set_stream_delay_ms(5));
   EXPECT_CALL(*ap, set_stream_key_pressed(true));
-  EXPECT_CALL(*ap, ProcessStream(testing::_));
+  EXPECT_CALL(*ap, ProcessStream(::testing::_));
 
   constexpr int kSampleRate = 16000;
   constexpr size_t kNumChannels = 1;
@@ -204,10 +204,10 @@
   MockAudioSendStream stream;
   audio_state->AddSendingStream(&stream, kSampleRate, kNumChannels);
 
-  EXPECT_CALL(stream, SendAudioDataForMock(testing::_))
+  EXPECT_CALL(stream, SendAudioDataForMock(::testing::_))
       .WillOnce(
           // Verify that channels are swapped.
-          testing::Invoke([](AudioFrame* audio_frame) {
+          ::testing::Invoke([](AudioFrame* audio_frame) {
             auto levels = ComputeChannelLevels(audio_frame);
             EXPECT_EQ(0u, levels[0]);
             EXPECT_LT(0u, levels[1]);
@@ -240,8 +240,8 @@
         kSampleRate, 0, 0, 0, false, new_mic_level);
     auto stats = audio_state->GetAudioInputStats();
     EXPECT_EQ(0, stats.audio_level);
-    EXPECT_THAT(stats.total_energy, testing::DoubleEq(0.0));
-    EXPECT_THAT(stats.total_duration, testing::DoubleEq(0.01));
+    EXPECT_THAT(stats.total_energy, ::testing::DoubleEq(0.0));
+    EXPECT_THAT(stats.total_duration, ::testing::DoubleEq(0.01));
   }
 
   // Push 10 non-silent buffers -> Level stats should be non-zero.
@@ -255,8 +255,8 @@
     }
     auto stats = audio_state->GetAudioInputStats();
     EXPECT_EQ(32767, stats.audio_level);
-    EXPECT_THAT(stats.total_energy, testing::DoubleEq(0.01));
-    EXPECT_THAT(stats.total_duration, testing::DoubleEq(0.11));
+    EXPECT_THAT(stats.total_energy, ::testing::DoubleEq(0.01));
+    EXPECT_THAT(stats.total_duration, ::testing::DoubleEq(0.11));
   }
 }
 
@@ -268,9 +268,9 @@
   FakeAudioSource fake_source;
   helper.mixer()->AddSource(&fake_source);
 
-  EXPECT_CALL(fake_source, GetAudioFrameWithInfo(testing::_, testing::_))
+  EXPECT_CALL(fake_source, GetAudioFrameWithInfo(::testing::_, ::testing::_))
       .WillOnce(
-          testing::Invoke([](int sample_rate_hz, AudioFrame* audio_frame) {
+          ::testing::Invoke([](int sample_rate_hz, AudioFrame* audio_frame) {
             audio_frame->sample_rate_hz_ = sample_rate_hz;
             audio_frame->samples_per_channel_ = sample_rate_hz / 100;
             audio_frame->num_channels_ = kNumberOfChannels;
diff --git a/audio/test/media_transport_test.cc b/audio/test/media_transport_test.cc
index 5ab13c5..c48a1f6 100644
--- a/audio/test/media_transport_test.cc
+++ b/audio/test/media_transport_test.cc
@@ -33,7 +33,7 @@
 namespace test {
 
 namespace {
-using testing::NiceMock;
+using ::testing::NiceMock;
 
 constexpr int kPayloadTypeOpus = 17;
 constexpr int kSamplingFrequency = 48000;
diff --git a/audio/transport_feedback_packet_loss_tracker_unittest.cc b/audio/transport_feedback_packet_loss_tracker_unittest.cc
index cc90651..716a1bd 100644
--- a/audio/transport_feedback_packet_loss_tracker_unittest.cc
+++ b/audio/transport_feedback_packet_loss_tracker_unittest.cc
@@ -563,6 +563,6 @@
 
 INSTANTIATE_TEST_SUITE_P(_,
                          TransportFeedbackPacketLossTrackerTest,
-                         testing::ValuesIn(kBases));
+                         ::testing::ValuesIn(kBases));
 
 }  // namespace webrtc
diff --git a/call/flexfec_receive_stream_unittest.cc b/call/flexfec_receive_stream_unittest.cc
index 4728c8f..6fcc5dd 100644
--- a/call/flexfec_receive_stream_unittest.cc
+++ b/call/flexfec_receive_stream_unittest.cc
@@ -143,7 +143,7 @@
       kPayloadBits,    kPayloadBits,    kPayloadBits,       kPayloadBits};
   // clang-format on
 
-  testing::StrictMock<MockRecoveredPacketReceiver> recovered_packet_receiver;
+  ::testing::StrictMock<MockRecoveredPacketReceiver> recovered_packet_receiver;
   EXPECT_CALL(process_thread_, RegisterModule(_, _)).Times(1);
   FlexfecReceiveStreamImpl receive_stream(
       Clock::GetRealTimeClock(), &rtp_stream_receiver_controller_, config_,
diff --git a/call/rtcp_demuxer_unittest.cc b/call/rtcp_demuxer_unittest.cc
index 5060c7b..16faa28 100644
--- a/call/rtcp_demuxer_unittest.cc
+++ b/call/rtcp_demuxer_unittest.cc
@@ -39,7 +39,7 @@
   MOCK_METHOD1(OnRtcpPacket, void(rtc::ArrayView<const uint8_t>));
 };
 
-class RtcpDemuxerTest : public testing::Test {
+class RtcpDemuxerTest : public ::testing::Test {
  protected:
   ~RtcpDemuxerTest() {
     for (auto* sink : sinks_to_tear_down_) {
diff --git a/call/rtp_bitrate_configurator_unittest.cc b/call/rtp_bitrate_configurator_unittest.cc
index b177db7..70a4cf6 100644
--- a/call/rtp_bitrate_configurator_unittest.cc
+++ b/call/rtp_bitrate_configurator_unittest.cc
@@ -15,7 +15,7 @@
 namespace webrtc {
 using absl::nullopt;
 
-class RtpBitrateConfiguratorTest : public testing::Test {
+class RtpBitrateConfiguratorTest : public ::testing::Test {
  public:
   RtpBitrateConfiguratorTest()
       : configurator_(new RtpBitrateConfigurator(BitrateConstraints())) {}
diff --git a/call/rtp_demuxer_unittest.cc b/call/rtp_demuxer_unittest.cc
index fbca494..0a08c86 100644
--- a/call/rtp_demuxer_unittest.cc
+++ b/call/rtp_demuxer_unittest.cc
@@ -48,7 +48,7 @@
                void(uint8_t payload_type, uint32_t ssrc));
 };
 
-class RtpDemuxerTest : public testing::Test {
+class RtpDemuxerTest : public ::testing::Test {
  protected:
   ~RtpDemuxerTest() {
     for (auto* sink : sinks_to_tear_down_) {
diff --git a/call/rtp_video_sender_unittest.cc b/call/rtp_video_sender_unittest.cc
index 1a1dd9b..d1c7714 100644
--- a/call/rtp_video_sender_unittest.cc
+++ b/call/rtp_video_sender_unittest.cc
@@ -316,7 +316,7 @@
   EXPECT_NE(
       EncodedImageCallback::Result::OK,
       test.router()->OnEncodedImage(encoded_image, nullptr, nullptr).error);
-  testing::Mock::VerifyAndClearExpectations(&callback);
+  ::testing::Mock::VerifyAndClearExpectations(&callback);
 
   test.router()->SetActive(true);
 
@@ -330,7 +330,7 @@
   EXPECT_EQ(1, frame_counts.key_frames);
   EXPECT_EQ(0, frame_counts.delta_frames);
 
-  testing::Mock::VerifyAndClearExpectations(&callback);
+  ::testing::Mock::VerifyAndClearExpectations(&callback);
 
   encoded_image._frameType = VideoFrameType::kVideoFrameDelta;
   EXPECT_CALL(callback, FrameCountUpdated(_, kSsrc1))
diff --git a/call/rtx_receive_stream_unittest.cc b/call/rtx_receive_stream_unittest.cc
index a9cfd53..f003c4e 100644
--- a/call/rtx_receive_stream_unittest.cc
+++ b/call/rtx_receive_stream_unittest.cc
@@ -74,11 +74,11 @@
   EXPECT_TRUE(rtx_packet.Parse(rtc::ArrayView<const uint8_t>(kRtxPacket)));
 
   EXPECT_CALL(media_sink, OnRtpPacket(_))
-      .WillOnce(testing::Invoke([](const RtpPacketReceived& packet) {
+      .WillOnce(::testing::Invoke([](const RtpPacketReceived& packet) {
         EXPECT_EQ(packet.SequenceNumber(), kMediaSeqno);
         EXPECT_EQ(packet.Ssrc(), kMediaSSRC);
         EXPECT_EQ(packet.PayloadType(), kMediaPayloadType);
-        EXPECT_THAT(packet.payload(), testing::ElementsAre(0xee));
+        EXPECT_THAT(packet.payload(), ::testing::ElementsAre(0xee));
       }));
 
   rtx_sink.OnRtpPacket(rtx_packet);
@@ -91,7 +91,7 @@
   EXPECT_TRUE(rtx_packet.Parse(rtc::ArrayView<const uint8_t>(kRtxPacket)));
   EXPECT_FALSE(rtx_packet.recovered());
   EXPECT_CALL(media_sink, OnRtpPacket(_))
-      .WillOnce(testing::Invoke([](const RtpPacketReceived& packet) {
+      .WillOnce(::testing::Invoke([](const RtpPacketReceived& packet) {
         EXPECT_TRUE(packet.recovered());
       }));
 
@@ -132,11 +132,11 @@
   EXPECT_EQ(kVideoRotation_90, rotation);
 
   EXPECT_CALL(media_sink, OnRtpPacket(_))
-      .WillOnce(testing::Invoke([](const RtpPacketReceived& packet) {
+      .WillOnce(::testing::Invoke([](const RtpPacketReceived& packet) {
         EXPECT_EQ(packet.SequenceNumber(), kMediaSeqno);
         EXPECT_EQ(packet.Ssrc(), kMediaSSRC);
         EXPECT_EQ(packet.PayloadType(), kMediaPayloadType);
-        EXPECT_THAT(packet.payload(), testing::ElementsAre(0xee));
+        EXPECT_THAT(packet.payload(), ::testing::ElementsAre(0xee));
         VideoRotation rotation = kVideoRotation_0;
         EXPECT_TRUE(packet.GetExtension<VideoOrientation>(&rotation));
         EXPECT_EQ(rotation, kVideoRotation_90);
diff --git a/common_audio/resampler/resampler_unittest.cc b/common_audio/resampler/resampler_unittest.cc
index 61be040..08a7479 100644
--- a/common_audio/resampler/resampler_unittest.cc
+++ b/common_audio/resampler/resampler_unittest.cc
@@ -40,7 +40,7 @@
   return true;
 }
 
-class ResamplerTest : public testing::Test {
+class ResamplerTest : public ::testing::Test {
  protected:
   ResamplerTest();
   void SetUp() override;
diff --git a/common_audio/resampler/sinc_resampler_unittest.cc b/common_audio/resampler/sinc_resampler_unittest.cc
index 3aedacc..0aa3c91 100644
--- a/common_audio/resampler/sinc_resampler_unittest.cc
+++ b/common_audio/resampler/sinc_resampler_unittest.cc
@@ -29,7 +29,7 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
+using ::testing::_;
 
 namespace webrtc {
 
@@ -72,7 +72,7 @@
   resampler.Resample(resampler.ChunkSize(), resampled_destination.get());
 
   // Verify requesting kChunks * ChunkSize() frames causes kChunks callbacks.
-  testing::Mock::VerifyAndClear(&mock_source);
+  ::testing::Mock::VerifyAndClear(&mock_source);
   EXPECT_CALL(mock_source, Run(_, _))
       .Times(kChunks)
       .WillRepeatedly(ClearBuffer());
@@ -94,7 +94,7 @@
 
   // Flush and request more data, which should all be zeros now.
   resampler.Flush();
-  testing::Mock::VerifyAndClear(&mock_source);
+  ::testing::Mock::VerifyAndClear(&mock_source);
   EXPECT_CALL(mock_source, Run(_, _)).Times(1).WillOnce(ClearBuffer());
   resampler.Resample(resampler.ChunkSize() / 2, resampled_destination.get());
   for (size_t i = 0; i < resampler.ChunkSize() / 2; ++i)
@@ -230,7 +230,8 @@
 #undef CONVOLVE_FUNC
 
 typedef std::tuple<int, int, double, double> SincResamplerTestData;
-class SincResamplerTest : public testing::TestWithParam<SincResamplerTestData> {
+class SincResamplerTest
+    : public ::testing::TestWithParam<SincResamplerTestData> {
  public:
   SincResamplerTest()
       : input_rate_(std::get<0>(GetParam())),
@@ -343,7 +344,7 @@
 INSTANTIATE_TEST_SUITE_P(
     SincResamplerTest,
     SincResamplerTest,
-    testing::Values(
+    ::testing::Values(
         // To 44.1kHz
         std::make_tuple(8000, 44100, kResamplingRMSError, -62.73),
         std::make_tuple(11025, 44100, kResamplingRMSError, -72.19),
diff --git a/common_audio/signal_processing/signal_processing_unittest.cc b/common_audio/signal_processing/signal_processing_unittest.cc
index aeaf97b..0e316b9 100644
--- a/common_audio/signal_processing/signal_processing_unittest.cc
+++ b/common_audio/signal_processing/signal_processing_unittest.cc
@@ -25,7 +25,7 @@
                                                 -3333,
                                                 345};
 
-class SplTest : public testing::Test {
+class SplTest : public ::testing::Test {
  protected:
   SplTest() { WebRtcSpl_Init(); }
   ~SplTest() override {}
diff --git a/logging/rtc_event_log/encoder/rtc_event_log_encoder_common_unittest.cc b/logging/rtc_event_log/encoder/rtc_event_log_encoder_common_unittest.cc
index 8a44a6d..0afa536 100644
--- a/logging/rtc_event_log/encoder/rtc_event_log_encoder_common_unittest.cc
+++ b/logging/rtc_event_log/encoder/rtc_event_log_encoder_common_unittest.cc
@@ -21,7 +21,7 @@
 namespace {
 
 template <typename T>
-class SignednessConversionTest : public testing::Test {
+class SignednessConversionTest : public ::testing::Test {
  public:
   static_assert(std::is_integral<T>::value, "");
   static_assert(std::is_signed<T>::value, "");
diff --git a/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc b/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc
index 796c6d4..e8d69ea 100644
--- a/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc
+++ b/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc
@@ -43,7 +43,7 @@
 
 namespace webrtc {
 class RtcEventLogEncoderTest
-    : public testing::TestWithParam<std::tuple<int, bool, size_t, bool>> {
+    : public ::testing::TestWithParam<std::tuple<int, bool, size_t, bool>> {
  protected:
   RtcEventLogEncoderTest()
       : seed_(std::get<0>(GetParam())),
diff --git a/media/base/rtp_data_engine_unittest.cc b/media/base/rtp_data_engine_unittest.cc
index bcba9a4..97d7e18 100644
--- a/media/base/rtp_data_engine_unittest.cc
+++ b/media/base/rtp_data_engine_unittest.cc
@@ -49,7 +49,7 @@
   cricket::ReceiveDataParams last_received_data_params_;
 };
 
-class RtpDataMediaChannelTest : public testing::Test {
+class RtpDataMediaChannelTest : public ::testing::Test {
  protected:
   virtual void SetUp() {
     // Seed needed for each test to satisfy expectations.
diff --git a/media/base/video_adapter_unittest.cc b/media/base/video_adapter_unittest.cc
index c156264..3334d36 100644
--- a/media/base/video_adapter_unittest.cc
+++ b/media/base/video_adapter_unittest.cc
@@ -26,7 +26,7 @@
 const int kDefaultFps = 30;
 }  // namespace
 
-class VideoAdapterTest : public testing::Test,
+class VideoAdapterTest : public ::testing::Test,
                          public ::testing::WithParamInterface<bool> {
  public:
   VideoAdapterTest()
diff --git a/media/engine/fake_webrtc_call.h b/media/engine/fake_webrtc_call.h
index 9839b2d..134dd47 100644
--- a/media/engine/fake_webrtc_call.h
+++ b/media/engine/fake_webrtc_call.h
@@ -357,7 +357,7 @@
       int transport_overhead_per_packet) override;
   void OnSentPacket(const rtc::SentPacket& sent_packet) override;
 
-  testing::NiceMock<webrtc::MockRtpTransportControllerSend>
+  ::testing::NiceMock<webrtc::MockRtpTransportControllerSend>
       transport_controller_send_;
 
   webrtc::NetworkState audio_network_state_;
diff --git a/media/engine/null_webrtc_video_engine_unittest.cc b/media/engine/null_webrtc_video_engine_unittest.cc
index 343e167..0d1833f 100644
--- a/media/engine/null_webrtc_video_engine_unittest.cc
+++ b/media/engine/null_webrtc_video_engine_unittest.cc
@@ -30,7 +30,7 @@
 TEST(NullWebRtcVideoEngineTest, CheckInterface) {
   std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory =
       webrtc::CreateDefaultTaskQueueFactory();
-  testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
+  ::testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
   auto audio_engine = absl::make_unique<WebRtcVoiceEngine>(
       task_queue_factory.get(), &adm,
       webrtc::MockAudioEncoderFactory::CreateUnusedFactory(),
diff --git a/media/engine/payload_type_mapper_unittest.cc b/media/engine/payload_type_mapper_unittest.cc
index eed797b..2e6ae1e 100644
--- a/media/engine/payload_type_mapper_unittest.cc
+++ b/media/engine/payload_type_mapper_unittest.cc
@@ -18,7 +18,7 @@
 
 namespace cricket {
 
-class PayloadTypeMapperTest : public testing::Test {
+class PayloadTypeMapperTest : public ::testing::Test {
  protected:
   PayloadTypeMapper mapper_;
 };
diff --git a/media/engine/webrtc_video_engine_unittest.cc b/media/engine/webrtc_video_engine_unittest.cc
index e844403..54e76e5 100644
--- a/media/engine/webrtc_video_engine_unittest.cc
+++ b/media/engine/webrtc_video_engine_unittest.cc
@@ -57,7 +57,7 @@
 #include "test/frame_generator.h"
 #include "test/gmock.h"
 
-using testing::Field;
+using ::testing::Field;
 using webrtc::BitrateConstraints;
 using webrtc::RtpExtension;
 
@@ -342,7 +342,7 @@
 TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionBeforeCapturer) {
   // Allocate the source first to prevent early destruction before channel's
   // dtor is called.
-  testing::NiceMock<MockVideoSource> video_source;
+  ::testing::NiceMock<MockVideoSource> video_source;
 
   encoder_factory_->AddSupportedVideoCodecType("VP8");
 
@@ -360,19 +360,19 @@
 
   EXPECT_CALL(
       video_source,
-      AddOrUpdateSink(testing::_,
+      AddOrUpdateSink(::testing::_,
                       Field(&rtc::VideoSinkWants::rotation_applied, false)));
   // Set capturer.
   EXPECT_TRUE(channel->SetVideoSend(kSsrc, nullptr, &video_source));
 
   // Verify capturer has turned off applying rotation.
-  testing::Mock::VerifyAndClear(&video_source);
+  ::testing::Mock::VerifyAndClear(&video_source);
 
   // Verify removing header extension turns on applying rotation.
   parameters.extensions.clear();
   EXPECT_CALL(
       video_source,
-      AddOrUpdateSink(testing::_,
+      AddOrUpdateSink(::testing::_,
                       Field(&rtc::VideoSinkWants::rotation_applied, true)));
 
   EXPECT_TRUE(channel->SetSendParameters(parameters));
@@ -381,7 +381,7 @@
 TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionBeforeAddSendStream) {
   // Allocate the source first to prevent early destruction before channel's
   // dtor is called.
-  testing::NiceMock<MockVideoSource> video_source;
+  ::testing::NiceMock<MockVideoSource> video_source;
 
   encoder_factory_->AddSupportedVideoCodecType("VP8");
 
@@ -399,13 +399,13 @@
   // Set source.
   EXPECT_CALL(
       video_source,
-      AddOrUpdateSink(testing::_,
+      AddOrUpdateSink(::testing::_,
                       Field(&rtc::VideoSinkWants::rotation_applied, false)));
   EXPECT_TRUE(channel->SetVideoSend(kSsrc, nullptr, &video_source));
 }
 
 TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionAfterCapturer) {
-  testing::NiceMock<MockVideoSource> video_source;
+  ::testing::NiceMock<MockVideoSource> video_source;
 
   encoder_factory_->AddSupportedVideoCodecType("VP8");
   encoder_factory_->AddSupportedVideoCodecType("VP9");
@@ -417,12 +417,12 @@
   // Set capturer.
   EXPECT_CALL(
       video_source,
-      AddOrUpdateSink(testing::_,
+      AddOrUpdateSink(::testing::_,
                       Field(&rtc::VideoSinkWants::rotation_applied, true)));
   EXPECT_TRUE(channel->SetVideoSend(kSsrc, nullptr, &video_source));
 
   // Verify capturer has turned on applying rotation.
-  testing::Mock::VerifyAndClear(&video_source);
+  ::testing::Mock::VerifyAndClear(&video_source);
 
   // Add CVO extension.
   const int id = 1;
@@ -435,18 +435,18 @@
   parameters.codecs.erase(parameters.codecs.begin());
   EXPECT_CALL(
       video_source,
-      AddOrUpdateSink(testing::_,
+      AddOrUpdateSink(::testing::_,
                       Field(&rtc::VideoSinkWants::rotation_applied, false)));
   EXPECT_TRUE(channel->SetSendParameters(parameters));
 
   // Verify capturer has turned off applying rotation.
-  testing::Mock::VerifyAndClear(&video_source);
+  ::testing::Mock::VerifyAndClear(&video_source);
 
   // Verify removing header extension turns on applying rotation.
   parameters.extensions.clear();
   EXPECT_CALL(
       video_source,
-      AddOrUpdateSink(testing::_,
+      AddOrUpdateSink(::testing::_,
                       Field(&rtc::VideoSinkWants::rotation_applied, true)));
   EXPECT_TRUE(channel->SetSendParameters(parameters));
 }
@@ -710,11 +710,11 @@
   const RtpCapabilities capabilities = engine_.GetCapabilities();
   if (supported) {
     EXPECT_THAT(capabilities.header_extensions,
-                testing::Contains(testing::Field(&RtpExtension::uri, uri)));
+                ::testing::Contains(::testing::Field(&RtpExtension::uri, uri)));
   } else {
-    EXPECT_THAT(
-        capabilities.header_extensions,
-        testing::Each(testing::Field(&RtpExtension::uri, testing::StrNe(uri))));
+    EXPECT_THAT(capabilities.header_extensions,
+                ::testing::Each(::testing::Field(&RtpExtension::uri,
+                                                 ::testing::StrNe(uri))));
   }
 }
 
@@ -1053,7 +1053,7 @@
   EXPECT_CALL(*rate_allocator_factory,
               CreateVideoBitrateAllocatorProxy(Field(
                   &webrtc::VideoCodec::codecType, webrtc::kVideoCodecVP8)))
-      .WillOnce(testing::Return(new webrtc::MockVideoBitrateAllocator()));
+      .WillOnce(::testing::Return(new webrtc::MockVideoBitrateAllocator()));
   WebRtcVideoEngine engine(
       (std::unique_ptr<webrtc::VideoEncoderFactory>(encoder_factory)),
       (std::unique_ptr<webrtc::VideoDecoderFactory>(decoder_factory)),
@@ -1062,7 +1062,7 @@
   const webrtc::SdpVideoFormat vp8_format("VP8");
   const std::vector<webrtc::SdpVideoFormat> supported_formats = {vp8_format};
   EXPECT_CALL(*encoder_factory, GetSupportedFormats())
-      .WillRepeatedly(testing::Return(supported_formats));
+      .WillRepeatedly(::testing::Return(supported_formats));
 
   // Verify the codecs from the engine.
   const std::vector<VideoCodec> engine_codecs = engine.codecs();
@@ -1101,7 +1101,7 @@
   codec_info.has_internal_source = false;
   const webrtc::SdpVideoFormat format("VP8");
   EXPECT_CALL(*encoder_factory, QueryVideoEncoder(format))
-      .WillRepeatedly(testing::Return(codec_info));
+      .WillRepeatedly(::testing::Return(codec_info));
   FakeWebRtcVideoEncoder* const encoder = new FakeWebRtcVideoEncoder(nullptr);
   rtc::Event encoder_created;
   EXPECT_CALL(*encoder_factory, CreateVideoEncoderProxy(format))
@@ -1113,7 +1113,7 @@
   // Mock decoder creation. |engine| take ownership of the decoder.
   FakeWebRtcVideoDecoder* const decoder = new FakeWebRtcVideoDecoder(nullptr);
   EXPECT_CALL(*decoder_factory, CreateVideoDecoderProxy(format))
-      .WillOnce(testing::Return(decoder));
+      .WillOnce(::testing::Return(decoder));
 
   // Create a call.
   webrtc::RtcEventLogNullImpl event_log;
@@ -1176,11 +1176,11 @@
   const webrtc::SdpVideoFormat vp8_format("VP8");
   const std::vector<webrtc::SdpVideoFormat> supported_formats = {vp8_format};
   EXPECT_CALL(*encoder_factory, GetSupportedFormats())
-      .WillRepeatedly(testing::Return(supported_formats));
+      .WillRepeatedly(::testing::Return(supported_formats));
 
   // Decoder creation fails.
-  EXPECT_CALL(*decoder_factory, CreateVideoDecoderProxy(testing::_))
-      .WillOnce(testing::Return(nullptr));
+  EXPECT_CALL(*decoder_factory, CreateVideoDecoderProxy(::testing::_))
+      .WillOnce(::testing::Return(nullptr));
 
   // Create a call.
   webrtc::RtcEventLogNullImpl event_log;
@@ -1261,7 +1261,7 @@
   EXPECT_EQ(0u, encoder_factory_->encoders().size());
 }
 
-class WebRtcVideoChannelBaseTest : public testing::Test {
+class WebRtcVideoChannelBaseTest : public ::testing::Test {
  protected:
   WebRtcVideoChannelBaseTest()
       : engine_(webrtc::CreateBuiltinVideoEncoderFactory(),
@@ -7113,7 +7113,7 @@
   TestReceiverLocalSsrcConfiguration(true);
 }
 
-class WebRtcVideoChannelSimulcastTest : public testing::Test {
+class WebRtcVideoChannelSimulcastTest : public ::testing::Test {
  public:
   WebRtcVideoChannelSimulcastTest()
       : fake_call_(),
diff --git a/media/engine/webrtc_voice_engine_unittest.cc b/media/engine/webrtc_voice_engine_unittest.cc
index 969c10c..4ddcd43 100644
--- a/media/engine/webrtc_voice_engine_unittest.cc
+++ b/media/engine/webrtc_voice_engine_unittest.cc
@@ -98,27 +98,30 @@
   EXPECT_CALL(*adm, RegisterAudioCallback(_)).WillOnce(Return(0));
 #if defined(WEBRTC_WIN)
   EXPECT_CALL(
-      *adm, SetPlayoutDevice(
-                testing::Matcher<webrtc::AudioDeviceModule::WindowsDeviceType>(
-                    webrtc::AudioDeviceModule::kDefaultCommunicationDevice)))
+      *adm,
+      SetPlayoutDevice(
+          ::testing::Matcher<webrtc::AudioDeviceModule::WindowsDeviceType>(
+              webrtc::AudioDeviceModule::kDefaultCommunicationDevice)))
       .WillOnce(Return(0));
 #else
   EXPECT_CALL(*adm, SetPlayoutDevice(0)).WillOnce(Return(0));
 #endif  // #if defined(WEBRTC_WIN)
   EXPECT_CALL(*adm, InitSpeaker()).WillOnce(Return(0));
-  EXPECT_CALL(*adm, StereoPlayoutIsAvailable(testing::_)).WillOnce(Return(0));
+  EXPECT_CALL(*adm, StereoPlayoutIsAvailable(::testing::_)).WillOnce(Return(0));
   EXPECT_CALL(*adm, SetStereoPlayout(false)).WillOnce(Return(0));
 #if defined(WEBRTC_WIN)
   EXPECT_CALL(
-      *adm, SetRecordingDevice(
-                testing::Matcher<webrtc::AudioDeviceModule::WindowsDeviceType>(
-                    webrtc::AudioDeviceModule::kDefaultCommunicationDevice)))
+      *adm,
+      SetRecordingDevice(
+          ::testing::Matcher<webrtc::AudioDeviceModule::WindowsDeviceType>(
+              webrtc::AudioDeviceModule::kDefaultCommunicationDevice)))
       .WillOnce(Return(0));
 #else
   EXPECT_CALL(*adm, SetRecordingDevice(0)).WillOnce(Return(0));
 #endif  // #if defined(WEBRTC_WIN)
   EXPECT_CALL(*adm, InitMicrophone()).WillOnce(Return(0));
-  EXPECT_CALL(*adm, StereoRecordingIsAvailable(testing::_)).WillOnce(Return(0));
+  EXPECT_CALL(*adm, StereoRecordingIsAvailable(::testing::_))
+      .WillOnce(Return(0));
   EXPECT_CALL(*adm, SetStereoRecording(false)).WillOnce(Return(0));
   EXPECT_CALL(*adm, BuiltInAECIsAvailable()).WillOnce(Return(false));
   EXPECT_CALL(*adm, BuiltInAGCIsAvailable()).WillOnce(Return(false));
@@ -147,7 +150,7 @@
   webrtc::AudioProcessing::Config apm_config;
   EXPECT_CALL(*apm, GetConfig()).WillRepeatedly(ReturnPointee(&apm_config));
   EXPECT_CALL(*apm, ApplyConfig(_)).WillRepeatedly(SaveArg<0>(&apm_config));
-  EXPECT_CALL(*apm, SetExtraOptions(testing::_));
+  EXPECT_CALL(*apm, SetExtraOptions(::testing::_));
   EXPECT_CALL(*apm, DetachAecDump());
   {
     cricket::WebRtcVoiceEngine engine(
@@ -167,7 +170,7 @@
   void SetSink(Sink* sink) override {}
 };
 
-class WebRtcVoiceEngineTestFake : public testing::Test {
+class WebRtcVoiceEngineTestFake : public ::testing::Test {
  public:
   WebRtcVoiceEngineTestFake() : WebRtcVoiceEngineTestFake("") {}
 
@@ -183,7 +186,7 @@
     // AudioProcessing.
     EXPECT_CALL(*apm_, GetConfig()).WillRepeatedly(ReturnPointee(&apm_config_));
     EXPECT_CALL(*apm_, ApplyConfig(_)).WillRepeatedly(SaveArg<0>(&apm_config_));
-    EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
+    EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
     EXPECT_CALL(*apm_, DetachAecDump());
     // Default Options.
     EXPECT_CALL(apm_ns_, set_level(kDefaultNsLevel)).WillOnce(Return(0));
@@ -209,7 +212,7 @@
   }
 
   bool SetupChannel() {
-    EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
+    EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
     channel_ = engine_->CreateMediaChannel(&call_, cricket::MediaConfig(),
                                            cricket::AudioOptions(),
                                            webrtc::CryptoOptions());
@@ -285,13 +288,13 @@
       EXPECT_CALL(adm_, RecordingIsInitialized()).WillOnce(Return(false));
       EXPECT_CALL(adm_, Recording()).WillOnce(Return(false));
       EXPECT_CALL(adm_, InitRecording()).WillOnce(Return(0));
-      EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
+      EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
     }
     channel_->SetSend(enable);
   }
 
   void SetSendParameters(const cricket::AudioSendParameters& params) {
-    EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
+    EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
     ASSERT_TRUE(channel_);
     EXPECT_TRUE(channel_->SetSendParameters(params));
   }
@@ -303,7 +306,7 @@
     EXPECT_CALL(*apm_, set_output_will_be_muted(!enable));
     ASSERT_TRUE(channel_);
     if (enable && options) {
-      EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
+      EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
     }
     EXPECT_TRUE(channel_->SetAudioSend(ssrc, enable, options, source));
   }
@@ -2033,7 +2036,7 @@
        SupportsTransportSequenceNumberHeaderExtension) {
   const cricket::RtpCapabilities capabilities = engine_->GetCapabilities();
   EXPECT_THAT(capabilities.header_extensions,
-              Contains(testing::Field(
+              Contains(::testing::Field(
                   "uri", &RtpExtension::uri,
                   webrtc::RtpExtension::kTransportSequenceNumberUri)));
 }
@@ -2320,7 +2323,7 @@
 TEST_F(WebRtcVoiceEngineTestFake, TxAgcConfigViaOptions) {
   EXPECT_TRUE(SetupSendStream());
   EXPECT_CALL(adm_, BuiltInAGCIsAvailable())
-      .Times(testing::AtLeast(1))
+      .Times(::testing::AtLeast(1))
       .WillRepeatedly(Return(false));
   const auto& agc_config = apm_config_.gain_controller1;
 
@@ -2978,7 +2981,7 @@
       .WillRepeatedly(Return(false));
   EXPECT_CALL(adm_, Recording()).Times(2).WillRepeatedly(Return(false));
   EXPECT_CALL(adm_, InitRecording()).Times(2).WillRepeatedly(Return(0));
-  EXPECT_CALL(*apm_, SetExtraOptions(testing::_)).Times(10);
+  EXPECT_CALL(*apm_, SetExtraOptions(::testing::_)).Times(10);
 
   std::unique_ptr<cricket::WebRtcVoiceMediaChannel> channel1(
       static_cast<cricket::WebRtcVoiceMediaChannel*>(
@@ -3084,7 +3087,7 @@
   std::unique_ptr<cricket::WebRtcVoiceMediaChannel> channel;
   webrtc::RtpParameters parameters;
 
-  EXPECT_CALL(*apm_, SetExtraOptions(testing::_)).Times(3);
+  EXPECT_CALL(*apm_, SetExtraOptions(::testing::_)).Times(3);
 
   channel.reset(static_cast<cricket::WebRtcVoiceMediaChannel*>(
       engine_->CreateMediaChannel(&call_, config, cricket::AudioOptions(),
@@ -3508,7 +3511,7 @@
   // we never want it to create a decoder at this stage.
   std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory =
       webrtc::CreateDefaultTaskQueueFactory();
-  testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
+  ::testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
   rtc::scoped_refptr<webrtc::AudioProcessing> apm =
       webrtc::AudioProcessingBuilder().Create();
   cricket::WebRtcVoiceEngine engine(
@@ -3530,7 +3533,7 @@
 TEST(WebRtcVoiceEngineTest, StartupShutdownWithExternalADM) {
   std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory =
       webrtc::CreateDefaultTaskQueueFactory();
-  testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
+  ::testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
   EXPECT_CALL(adm, AddRef()).Times(3);
   EXPECT_CALL(adm, Release())
       .Times(3)
@@ -3560,7 +3563,7 @@
       webrtc::CreateDefaultTaskQueueFactory();
   // TODO(ossu): Why are the payload types of codecs with non-static payload
   // type assignments checked here? It shouldn't really matter.
-  testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
+  ::testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
   rtc::scoped_refptr<webrtc::AudioProcessing> apm =
       webrtc::AudioProcessingBuilder().Create();
   cricket::WebRtcVoiceEngine engine(
@@ -3608,7 +3611,7 @@
 TEST(WebRtcVoiceEngineTest, Has32Channels) {
   std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory =
       webrtc::CreateDefaultTaskQueueFactory();
-  testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
+  ::testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
   rtc::scoped_refptr<webrtc::AudioProcessing> apm =
       webrtc::AudioProcessingBuilder().Create();
   cricket::WebRtcVoiceEngine engine(
@@ -3650,7 +3653,7 @@
   // what we sent in - though it's probably reasonable to expect so, if
   // SetRecvParameters returns true.
   // I think it will become clear once audio decoder injection is completed.
-  testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
+  ::testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
   rtc::scoped_refptr<webrtc::AudioProcessing> apm =
       webrtc::AudioProcessingBuilder().Create();
   cricket::WebRtcVoiceEngine engine(
@@ -3695,7 +3698,7 @@
       new rtc::RefCountedObject<webrtc::MockAudioDecoderFactory>;
   EXPECT_CALL(*mock_decoder_factory.get(), GetSupportedDecoders())
       .WillOnce(Return(specs));
-  testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
+  ::testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
 
   rtc::scoped_refptr<webrtc::AudioProcessing> apm =
       webrtc::AudioProcessingBuilder().Create();
diff --git a/media/sctp/sctp_transport_unittest.cc b/media/sctp/sctp_transport_unittest.cc
index c86b62b..86cb416 100644
--- a/media/sctp/sctp_transport_unittest.cc
+++ b/media/sctp/sctp_transport_unittest.cc
@@ -116,7 +116,7 @@
 };
 
 // SCTP Data Engine testing framework.
-class SctpTransportTest : public testing::Test, public sigslot::has_slots<> {
+class SctpTransportTest : public ::testing::Test, public sigslot::has_slots<> {
  protected:
   // usrsctp uses the NSS random number generator on non-Android platforms,
   // so we need to initialize SSL.
diff --git a/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc b/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc
index b1e3313..5d5e5df 100644
--- a/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc
@@ -48,7 +48,7 @@
 
 EventLogWriterStates CreateEventLogWriter() {
   EventLogWriterStates state;
-  state.event_log.reset(new testing::StrictMock<MockRtcEventLog>());
+  state.event_log.reset(new ::testing::StrictMock<MockRtcEventLog>());
   state.event_log_writer.reset(new EventLogWriter(
       state.event_log.get(), kMinBitrateChangeBps, kMinBitrateChangeFraction,
       kMinPacketLossChangeFraction));
diff --git a/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc
index b7456a7..4a3db23 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc
@@ -16,7 +16,7 @@
 #include "system_wrappers/include/cpu_features_wrapper.h"
 #include "test/gtest.h"
 
-class FilterBanksTest : public testing::Test {
+class FilterBanksTest : public ::testing::Test {
  protected:
   // Pass a function pointer to the Tester function.
   void RTC_NO_SANITIZE("signed-integer-overflow")  // bugs.webrtc.org/5513
diff --git a/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc
index 471fa57..192ef89 100644
--- a/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/filters_unittest.cc
@@ -12,7 +12,7 @@
 #include "system_wrappers/include/cpu_features_wrapper.h"
 #include "test/gtest.h"
 
-class FiltersTest : public testing::Test {
+class FiltersTest : public ::testing::Test {
  protected:
   // Pass a function pointer to the Tester function.
   void FiltersTester(AutocorrFix WebRtcIsacfix_AutocorrFixFunction) {
diff --git a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
index fab0a04..554ec0c 100644
--- a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
@@ -12,7 +12,7 @@
 #include "system_wrappers/include/cpu_features_wrapper.h"
 #include "test/gtest.h"
 
-class LpcMaskingModelTest : public testing::Test {
+class LpcMaskingModelTest : public ::testing::Test {
  protected:
   // Pass a function pointer to the Tester function.
   void CalculateResidualEnergyTester(
diff --git a/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc
index a058530..473b7f8 100644
--- a/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/transform_unittest.cc
@@ -136,7 +136,7 @@
     294,   -339,   344,    -396,  407,   -429,  438,   -439,  485,   -556,
     629,   -612,   637,    -645,  661,   -737,  829,   -830,  831,   -1041};
 
-class TransformTest : public testing::Test {
+class TransformTest : public ::testing::Test {
  protected:
   TransformTest() { WebRtcSpl_Init(); }
 
diff --git a/modules/audio_coding/codecs/isac/unittest.cc b/modules/audio_coding/codecs/isac/unittest.cc
index 076510b..b9eff32 100644
--- a/modules/audio_coding/codecs/isac/unittest.cc
+++ b/modules/audio_coding/codecs/isac/unittest.cc
@@ -210,7 +210,7 @@
   }
 };
 
-class IsacCommonTest : public testing::TestWithParam<IsacTestParam> {};
+class IsacCommonTest : public ::testing::TestWithParam<IsacTestParam> {};
 
 }  // namespace
 
@@ -252,6 +252,6 @@
   return cases;
 }
 
-INSTANTIATE_TEST_SUITE_P(, IsacCommonTest, testing::ValuesIn(TestCases()));
+INSTANTIATE_TEST_SUITE_P(, IsacCommonTest, ::testing::ValuesIn(TestCases()));
 
 }  // namespace webrtc
diff --git a/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_unittest.cc b/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_unittest.cc
index 23b9506..66eecb7 100644
--- a/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_unittest.cc
+++ b/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_unittest.cc
@@ -94,7 +94,7 @@
   EXPECT_TRUE(decoder_config->IsOk());
   EXPECT_EQ(decoder_config->coupled_streams, 2);
   EXPECT_THAT(decoder_config->channel_mapping,
-              testing::ContainerEq(std::vector<unsigned char>({3, 1, 2, 0})));
+              ::testing::ContainerEq(std::vector<unsigned char>({3, 1, 2, 0})));
 }
 
 TEST(AudioDecoderMultiOpusTest, InvalidSdpToConfigDoesNotProduceConfig) {
diff --git a/modules/audio_coding/codecs/tools/audio_codec_speed_test.h b/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
index c626bfa..59c2f16 100644
--- a/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
+++ b/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
@@ -22,7 +22,7 @@
 // <channels, bit_rate, file_name, extension, if_save_output>.
 typedef std::tuple<size_t, int, std::string, std::string, bool> coding_param;
 
-class AudioCodecSpeedTest : public testing::TestWithParam<coding_param> {
+class AudioCodecSpeedTest : public ::testing::TestWithParam<coding_param> {
  protected:
   AudioCodecSpeedTest(int block_duration_ms,
                       int input_sampling_khz,
diff --git a/modules/audio_coding/neteq/decoder_database_unittest.cc b/modules/audio_coding/neteq/decoder_database_unittest.cc
index 9a28cac..c1b92b5 100644
--- a/modules/audio_coding/neteq/decoder_database_unittest.cc
+++ b/modules/audio_coding/neteq/decoder_database_unittest.cc
@@ -21,8 +21,8 @@
 #include "test/mock_audio_decoder.h"
 #include "test/mock_audio_decoder_factory.h"
 
-using testing::_;
-using testing::Invoke;
+using ::testing::_;
+using ::testing::Invoke;
 
 namespace webrtc {
 
diff --git a/modules/audio_coding/neteq/test/neteq_ilbc_quality_test.cc b/modules/audio_coding/neteq/test/neteq_ilbc_quality_test.cc
index 09b3728..5d2df77 100644
--- a/modules/audio_coding/neteq/test/neteq_ilbc_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_ilbc_quality_test.cc
@@ -17,7 +17,7 @@
 #include "rtc_base/numerics/safe_conversions.h"
 #include "test/testsupport/file_utils.h"
 
-using testing::InitGoogleTest;
+using ::testing::InitGoogleTest;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc b/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
index 92e0680..94a5a86 100644
--- a/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
@@ -12,7 +12,7 @@
 #include "modules/audio_coding/neteq/tools/neteq_quality_test.h"
 #include "rtc_base/flags.h"
 
-using testing::InitGoogleTest;
+using ::testing::InitGoogleTest;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/audio_coding/neteq/test/neteq_opus_quality_test.cc b/modules/audio_coding/neteq/test/neteq_opus_quality_test.cc
index 35e24c2..e56c817 100644
--- a/modules/audio_coding/neteq/test/neteq_opus_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_opus_quality_test.cc
@@ -13,7 +13,7 @@
 #include "modules/audio_coding/neteq/tools/neteq_quality_test.h"
 #include "rtc_base/flags.h"
 
-using testing::InitGoogleTest;
+using ::testing::InitGoogleTest;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc b/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc
index 3557b11..a43c26a 100644
--- a/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc
@@ -18,7 +18,7 @@
 #include "rtc_base/numerics/safe_conversions.h"
 #include "test/testsupport/file_utils.h"
 
-using testing::InitGoogleTest;
+using ::testing::InitGoogleTest;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/audio_coding/neteq/test/neteq_pcmu_quality_test.cc b/modules/audio_coding/neteq/test/neteq_pcmu_quality_test.cc
index ce399a4..62a184e 100644
--- a/modules/audio_coding/neteq/test/neteq_pcmu_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_pcmu_quality_test.cc
@@ -17,7 +17,7 @@
 #include "rtc_base/numerics/safe_conversions.h"
 #include "test/testsupport/file_utils.h"
 
-using testing::InitGoogleTest;
+using ::testing::InitGoogleTest;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/audio_device/include/test_audio_device_unittest.cc b/modules/audio_device/include/test_audio_device_unittest.cc
index 8d62084..db3260e 100644
--- a/modules/audio_device/include/test_audio_device_unittest.cc
+++ b/modules/audio_device/include/test_audio_device_unittest.cc
@@ -59,7 +59,7 @@
     std::vector<int16_t> read_samples(expected_samples.size());
     EXPECT_EQ(expected_samples.size(),
               reader.ReadSamples(read_samples.size(), read_samples.data()));
-    EXPECT_THAT(expected_samples, testing::ElementsAreArray(read_samples));
+    EXPECT_THAT(expected_samples, ::testing::ElementsAreArray(read_samples));
 
     EXPECT_EQ(0u, reader.ReadSamples(read_samples.size(), read_samples.data()));
   }
diff --git a/modules/audio_mixer/audio_mixer_impl_unittest.cc b/modules/audio_mixer/audio_mixer_impl_unittest.cc
index ab20378..e14b69e 100644
--- a/modules/audio_mixer/audio_mixer_impl_unittest.cc
+++ b/modules/audio_mixer/audio_mixer_impl_unittest.cc
@@ -26,10 +26,10 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
-using testing::Exactly;
-using testing::Invoke;
-using testing::Return;
+using ::testing::_;
+using ::testing::Exactly;
+using ::testing::Invoke;
+using ::testing::Return;
 
 namespace webrtc {
 
@@ -63,7 +63,7 @@
 
 }  // namespace
 
-class MockMixerAudioSource : public testing::NiceMock<AudioMixer::Source> {
+class MockMixerAudioSource : public ::testing::NiceMock<AudioMixer::Source> {
  public:
   MockMixerAudioSource()
       : fake_audio_frame_info_(AudioMixer::Source::AudioFrameInfo::kNormal) {
@@ -296,7 +296,7 @@
     const auto sample_rate = source_sample_rates[i];
     EXPECT_CALL(source, PreferredSampleRate()).WillOnce(Return(sample_rate));
 
-    EXPECT_CALL(source, GetAudioFrameWithInfo(testing::Ge(sample_rate), _));
+    EXPECT_CALL(source, GetAudioFrameWithInfo(::testing::Ge(sample_rate), _));
   }
   mixer->Mix(1, &frame_for_mixing);
 }
diff --git a/modules/audio_processing/aec3/block_processor_unittest.cc b/modules/audio_processing/aec3/block_processor_unittest.cc
index 29a25eb..bd085da 100644
--- a/modules/audio_processing/aec3/block_processor_unittest.cc
+++ b/modules/audio_processing/aec3/block_processor_unittest.cc
@@ -28,10 +28,10 @@
 namespace webrtc {
 namespace {
 
-using testing::AtLeast;
-using testing::Return;
-using testing::StrictMock;
-using testing::_;
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::Return;
+using ::testing::StrictMock;
 
 // Verifies that the basic BlockProcessor functionality works and that the API
 // methods are callable.
@@ -151,7 +151,7 @@
         render_delay_buffer_mock(
             new StrictMock<webrtc::test::MockRenderDelayBuffer>(rate));
     std::unique_ptr<
-        testing::StrictMock<webrtc::test::MockRenderDelayController>>
+        ::testing::StrictMock<webrtc::test::MockRenderDelayController>>
         render_delay_controller_mock(
             new StrictMock<webrtc::test::MockRenderDelayController>());
     std::unique_ptr<testing::StrictMock<webrtc::test::MockEchoRemover>>
diff --git a/modules/audio_processing/aec3/echo_canceller3_unittest.cc b/modules/audio_processing/aec3/echo_canceller3_unittest.cc
index 267213e..6951597 100644
--- a/modules/audio_processing/aec3/echo_canceller3_unittest.cc
+++ b/modules/audio_processing/aec3/echo_canceller3_unittest.cc
@@ -28,8 +28,8 @@
 namespace webrtc {
 namespace {
 
-using testing::StrictMock;
-using testing::_;
+using ::testing::_;
+using ::testing::StrictMock;
 
 // Populates the frame with linearly increasing sample values for each band,
 // with a band-specific offset, in order to allow simple bitexactness
@@ -327,7 +327,7 @@
             .Times(1);
         break;
       case EchoLeakageTestVariant::kTrueNonSticky: {
-        testing::InSequence s;
+        ::testing::InSequence s;
         EXPECT_CALL(*block_processor_mock, UpdateEchoLeakageStatus(true))
             .Times(1);
         EXPECT_CALL(*block_processor_mock, UpdateEchoLeakageStatus(false))
@@ -409,14 +409,14 @@
             .Times(expected_num_block_to_process);
         break;
       case SaturationTestVariant::kOneNegative: {
-        testing::InSequence s;
+        ::testing::InSequence s;
         EXPECT_CALL(*block_processor_mock, ProcessCapture(_, true, _))
             .Times(num_full_blocks_per_frame);
         EXPECT_CALL(*block_processor_mock, ProcessCapture(_, false, _))
             .Times(expected_num_block_to_process - num_full_blocks_per_frame);
       } break;
       case SaturationTestVariant::kOnePositive: {
-        testing::InSequence s;
+        ::testing::InSequence s;
         EXPECT_CALL(*block_processor_mock, ProcessCapture(_, true, _))
             .Times(num_full_blocks_per_frame);
         EXPECT_CALL(*block_processor_mock, ProcessCapture(_, false, _))
diff --git a/modules/audio_processing/aec3/mock/mock_render_delay_buffer.cc b/modules/audio_processing/aec3/mock/mock_render_delay_buffer.cc
index 20214cb..7526235 100644
--- a/modules/audio_processing/aec3/mock/mock_render_delay_buffer.cc
+++ b/modules/audio_processing/aec3/mock/mock_render_delay_buffer.cc
@@ -23,9 +23,9 @@
       downsampled_render_buffer_(GetDownSampledBufferSize(4, 4)) {
   ON_CALL(*this, GetRenderBuffer())
       .WillByDefault(
-          testing::Invoke(this, &MockRenderDelayBuffer::FakeGetRenderBuffer));
+          ::testing::Invoke(this, &MockRenderDelayBuffer::FakeGetRenderBuffer));
   ON_CALL(*this, GetDownsampledRenderBuffer())
-      .WillByDefault(testing::Invoke(
+      .WillByDefault(::testing::Invoke(
           this, &MockRenderDelayBuffer::FakeGetDownsampledRenderBuffer));
 }
 
diff --git a/modules/audio_processing/aec_dump/aec_dump_integration_test.cc b/modules/audio_processing/aec_dump/aec_dump_integration_test.cc
index b6d8756..a32867f 100644
--- a/modules/audio_processing/aec_dump/aec_dump_integration_test.cc
+++ b/modules/audio_processing/aec_dump/aec_dump_integration_test.cc
@@ -14,11 +14,11 @@
 #include "modules/audio_processing/aec_dump/mock_aec_dump.h"
 #include "modules/audio_processing/include/audio_processing.h"
 
-using testing::_;
-using testing::AtLeast;
-using testing::Exactly;
-using testing::Matcher;
-using testing::StrictMock;
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::Exactly;
+using ::testing::Matcher;
+using ::testing::StrictMock;
 
 namespace {
 std::unique_ptr<webrtc::AudioProcessing> CreateAudioProcessing() {
diff --git a/modules/audio_processing/agc/agc_manager_direct_unittest.cc b/modules/audio_processing/agc/agc_manager_direct_unittest.cc
index 4be420a..cfa7f69 100644
--- a/modules/audio_processing/agc/agc_manager_direct_unittest.cc
+++ b/modules/audio_processing/agc/agc_manager_direct_unittest.cc
@@ -683,7 +683,7 @@
 }
 
 TEST(AgcManagerDirectStandaloneTest, DisableDigitalDisablesDigital) {
-  auto agc = std::unique_ptr<Agc>(new testing::NiceMock<MockAgc>());
+  auto agc = std::unique_ptr<Agc>(new ::testing::NiceMock<MockAgc>());
   test::MockGainControl gctrl;
   TestVolumeCallbacks volume;
 
diff --git a/modules/audio_processing/agc2/rnn_vad/pitch_search_internal_unittest.cc b/modules/audio_processing/agc2/rnn_vad/pitch_search_internal_unittest.cc
index bd2ea24..7e29417 100644
--- a/modules/audio_processing/agc2/rnn_vad/pitch_search_internal_unittest.cc
+++ b/modules/audio_processing/agc2/rnn_vad/pitch_search_internal_unittest.cc
@@ -32,7 +32,7 @@
 }  // namespace
 
 class ComputePitchGainThresholdTest
-    : public testing::Test,
+    : public ::testing::Test,
       public ::testing::WithParamInterface<
           std::tuple<size_t, size_t, size_t, float, size_t, float, float>> {};
 
@@ -124,7 +124,7 @@
 }
 
 class CheckLowerPitchPeriodsAndComputePitchGainTest
-    : public testing::Test,
+    : public ::testing::Test,
       public ::testing::WithParamInterface<
           std::tuple<int, int, float, int, float>> {};
 
diff --git a/modules/audio_processing/audio_processing_unittest.cc b/modules/audio_processing/audio_processing_unittest.cc
index ddfcf58..7ff37cb 100644
--- a/modules/audio_processing/audio_processing_unittest.cc
+++ b/modules/audio_processing/audio_processing_unittest.cc
@@ -2142,7 +2142,7 @@
 // case SNR which corresponds to inf, or zero error.
 typedef std::tuple<int, int, int, int, double, double> AudioProcessingTestData;
 class AudioProcessingTest
-    : public testing::TestWithParam<AudioProcessingTestData> {
+    : public ::testing::TestWithParam<AudioProcessingTestData> {
  public:
   AudioProcessingTest()
       : input_rate_(std::get<0>(GetParam())),
@@ -2440,113 +2440,113 @@
 INSTANTIATE_TEST_SUITE_P(
     CommonFormats,
     AudioProcessingTest,
-    testing::Values(std::make_tuple(48000, 48000, 48000, 48000, 0, 0),
-                    std::make_tuple(48000, 48000, 32000, 48000, 40, 30),
-                    std::make_tuple(48000, 48000, 16000, 48000, 40, 20),
-                    std::make_tuple(48000, 44100, 48000, 44100, 20, 20),
-                    std::make_tuple(48000, 44100, 32000, 44100, 20, 15),
-                    std::make_tuple(48000, 44100, 16000, 44100, 20, 15),
-                    std::make_tuple(48000, 32000, 48000, 32000, 30, 35),
-                    std::make_tuple(48000, 32000, 32000, 32000, 30, 0),
-                    std::make_tuple(48000, 32000, 16000, 32000, 30, 20),
-                    std::make_tuple(48000, 16000, 48000, 16000, 25, 20),
-                    std::make_tuple(48000, 16000, 32000, 16000, 25, 20),
-                    std::make_tuple(48000, 16000, 16000, 16000, 25, 0),
+    ::testing::Values(std::make_tuple(48000, 48000, 48000, 48000, 0, 0),
+                      std::make_tuple(48000, 48000, 32000, 48000, 40, 30),
+                      std::make_tuple(48000, 48000, 16000, 48000, 40, 20),
+                      std::make_tuple(48000, 44100, 48000, 44100, 20, 20),
+                      std::make_tuple(48000, 44100, 32000, 44100, 20, 15),
+                      std::make_tuple(48000, 44100, 16000, 44100, 20, 15),
+                      std::make_tuple(48000, 32000, 48000, 32000, 30, 35),
+                      std::make_tuple(48000, 32000, 32000, 32000, 30, 0),
+                      std::make_tuple(48000, 32000, 16000, 32000, 30, 20),
+                      std::make_tuple(48000, 16000, 48000, 16000, 25, 20),
+                      std::make_tuple(48000, 16000, 32000, 16000, 25, 20),
+                      std::make_tuple(48000, 16000, 16000, 16000, 25, 0),
 
-                    std::make_tuple(44100, 48000, 48000, 48000, 30, 0),
-                    std::make_tuple(44100, 48000, 32000, 48000, 30, 30),
-                    std::make_tuple(44100, 48000, 16000, 48000, 30, 20),
-                    std::make_tuple(44100, 44100, 48000, 44100, 20, 20),
-                    std::make_tuple(44100, 44100, 32000, 44100, 20, 15),
-                    std::make_tuple(44100, 44100, 16000, 44100, 20, 15),
-                    std::make_tuple(44100, 32000, 48000, 32000, 30, 35),
-                    std::make_tuple(44100, 32000, 32000, 32000, 30, 0),
-                    std::make_tuple(44100, 32000, 16000, 32000, 30, 20),
-                    std::make_tuple(44100, 16000, 48000, 16000, 25, 20),
-                    std::make_tuple(44100, 16000, 32000, 16000, 25, 20),
-                    std::make_tuple(44100, 16000, 16000, 16000, 25, 0),
+                      std::make_tuple(44100, 48000, 48000, 48000, 30, 0),
+                      std::make_tuple(44100, 48000, 32000, 48000, 30, 30),
+                      std::make_tuple(44100, 48000, 16000, 48000, 30, 20),
+                      std::make_tuple(44100, 44100, 48000, 44100, 20, 20),
+                      std::make_tuple(44100, 44100, 32000, 44100, 20, 15),
+                      std::make_tuple(44100, 44100, 16000, 44100, 20, 15),
+                      std::make_tuple(44100, 32000, 48000, 32000, 30, 35),
+                      std::make_tuple(44100, 32000, 32000, 32000, 30, 0),
+                      std::make_tuple(44100, 32000, 16000, 32000, 30, 20),
+                      std::make_tuple(44100, 16000, 48000, 16000, 25, 20),
+                      std::make_tuple(44100, 16000, 32000, 16000, 25, 20),
+                      std::make_tuple(44100, 16000, 16000, 16000, 25, 0),
 
-                    std::make_tuple(32000, 48000, 48000, 48000, 30, 0),
-                    std::make_tuple(32000, 48000, 32000, 48000, 32, 30),
-                    std::make_tuple(32000, 48000, 16000, 48000, 30, 20),
-                    std::make_tuple(32000, 44100, 48000, 44100, 19, 20),
-                    std::make_tuple(32000, 44100, 32000, 44100, 19, 15),
-                    std::make_tuple(32000, 44100, 16000, 44100, 19, 15),
-                    std::make_tuple(32000, 32000, 48000, 32000, 40, 35),
-                    std::make_tuple(32000, 32000, 32000, 32000, 0, 0),
-                    std::make_tuple(32000, 32000, 16000, 32000, 40, 20),
-                    std::make_tuple(32000, 16000, 48000, 16000, 25, 20),
-                    std::make_tuple(32000, 16000, 32000, 16000, 25, 20),
-                    std::make_tuple(32000, 16000, 16000, 16000, 25, 0),
+                      std::make_tuple(32000, 48000, 48000, 48000, 30, 0),
+                      std::make_tuple(32000, 48000, 32000, 48000, 32, 30),
+                      std::make_tuple(32000, 48000, 16000, 48000, 30, 20),
+                      std::make_tuple(32000, 44100, 48000, 44100, 19, 20),
+                      std::make_tuple(32000, 44100, 32000, 44100, 19, 15),
+                      std::make_tuple(32000, 44100, 16000, 44100, 19, 15),
+                      std::make_tuple(32000, 32000, 48000, 32000, 40, 35),
+                      std::make_tuple(32000, 32000, 32000, 32000, 0, 0),
+                      std::make_tuple(32000, 32000, 16000, 32000, 40, 20),
+                      std::make_tuple(32000, 16000, 48000, 16000, 25, 20),
+                      std::make_tuple(32000, 16000, 32000, 16000, 25, 20),
+                      std::make_tuple(32000, 16000, 16000, 16000, 25, 0),
 
-                    std::make_tuple(16000, 48000, 48000, 48000, 24, 0),
-                    std::make_tuple(16000, 48000, 32000, 48000, 24, 30),
-                    std::make_tuple(16000, 48000, 16000, 48000, 24, 20),
-                    std::make_tuple(16000, 44100, 48000, 44100, 15, 20),
-                    std::make_tuple(16000, 44100, 32000, 44100, 15, 15),
-                    std::make_tuple(16000, 44100, 16000, 44100, 15, 15),
-                    std::make_tuple(16000, 32000, 48000, 32000, 25, 35),
-                    std::make_tuple(16000, 32000, 32000, 32000, 25, 0),
-                    std::make_tuple(16000, 32000, 16000, 32000, 25, 20),
-                    std::make_tuple(16000, 16000, 48000, 16000, 39, 20),
-                    std::make_tuple(16000, 16000, 32000, 16000, 40, 20),
-                    std::make_tuple(16000, 16000, 16000, 16000, 0, 0)));
+                      std::make_tuple(16000, 48000, 48000, 48000, 24, 0),
+                      std::make_tuple(16000, 48000, 32000, 48000, 24, 30),
+                      std::make_tuple(16000, 48000, 16000, 48000, 24, 20),
+                      std::make_tuple(16000, 44100, 48000, 44100, 15, 20),
+                      std::make_tuple(16000, 44100, 32000, 44100, 15, 15),
+                      std::make_tuple(16000, 44100, 16000, 44100, 15, 15),
+                      std::make_tuple(16000, 32000, 48000, 32000, 25, 35),
+                      std::make_tuple(16000, 32000, 32000, 32000, 25, 0),
+                      std::make_tuple(16000, 32000, 16000, 32000, 25, 20),
+                      std::make_tuple(16000, 16000, 48000, 16000, 39, 20),
+                      std::make_tuple(16000, 16000, 32000, 16000, 40, 20),
+                      std::make_tuple(16000, 16000, 16000, 16000, 0, 0)));
 
 #elif defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)
 INSTANTIATE_TEST_SUITE_P(
     CommonFormats,
     AudioProcessingTest,
-    testing::Values(std::make_tuple(48000, 48000, 48000, 48000, 20, 0),
-                    std::make_tuple(48000, 48000, 32000, 48000, 20, 30),
-                    std::make_tuple(48000, 48000, 16000, 48000, 20, 20),
-                    std::make_tuple(48000, 44100, 48000, 44100, 15, 20),
-                    std::make_tuple(48000, 44100, 32000, 44100, 15, 15),
-                    std::make_tuple(48000, 44100, 16000, 44100, 15, 15),
-                    std::make_tuple(48000, 32000, 48000, 32000, 20, 35),
-                    std::make_tuple(48000, 32000, 32000, 32000, 20, 0),
-                    std::make_tuple(48000, 32000, 16000, 32000, 20, 20),
-                    std::make_tuple(48000, 16000, 48000, 16000, 20, 20),
-                    std::make_tuple(48000, 16000, 32000, 16000, 20, 20),
-                    std::make_tuple(48000, 16000, 16000, 16000, 20, 0),
+    ::testing::Values(std::make_tuple(48000, 48000, 48000, 48000, 20, 0),
+                      std::make_tuple(48000, 48000, 32000, 48000, 20, 30),
+                      std::make_tuple(48000, 48000, 16000, 48000, 20, 20),
+                      std::make_tuple(48000, 44100, 48000, 44100, 15, 20),
+                      std::make_tuple(48000, 44100, 32000, 44100, 15, 15),
+                      std::make_tuple(48000, 44100, 16000, 44100, 15, 15),
+                      std::make_tuple(48000, 32000, 48000, 32000, 20, 35),
+                      std::make_tuple(48000, 32000, 32000, 32000, 20, 0),
+                      std::make_tuple(48000, 32000, 16000, 32000, 20, 20),
+                      std::make_tuple(48000, 16000, 48000, 16000, 20, 20),
+                      std::make_tuple(48000, 16000, 32000, 16000, 20, 20),
+                      std::make_tuple(48000, 16000, 16000, 16000, 20, 0),
 
-                    std::make_tuple(44100, 48000, 48000, 48000, 15, 0),
-                    std::make_tuple(44100, 48000, 32000, 48000, 15, 30),
-                    std::make_tuple(44100, 48000, 16000, 48000, 15, 20),
-                    std::make_tuple(44100, 44100, 48000, 44100, 15, 20),
-                    std::make_tuple(44100, 44100, 32000, 44100, 15, 15),
-                    std::make_tuple(44100, 44100, 16000, 44100, 15, 15),
-                    std::make_tuple(44100, 32000, 48000, 32000, 20, 35),
-                    std::make_tuple(44100, 32000, 32000, 32000, 20, 0),
-                    std::make_tuple(44100, 32000, 16000, 32000, 20, 20),
-                    std::make_tuple(44100, 16000, 48000, 16000, 20, 20),
-                    std::make_tuple(44100, 16000, 32000, 16000, 20, 20),
-                    std::make_tuple(44100, 16000, 16000, 16000, 20, 0),
+                      std::make_tuple(44100, 48000, 48000, 48000, 15, 0),
+                      std::make_tuple(44100, 48000, 32000, 48000, 15, 30),
+                      std::make_tuple(44100, 48000, 16000, 48000, 15, 20),
+                      std::make_tuple(44100, 44100, 48000, 44100, 15, 20),
+                      std::make_tuple(44100, 44100, 32000, 44100, 15, 15),
+                      std::make_tuple(44100, 44100, 16000, 44100, 15, 15),
+                      std::make_tuple(44100, 32000, 48000, 32000, 20, 35),
+                      std::make_tuple(44100, 32000, 32000, 32000, 20, 0),
+                      std::make_tuple(44100, 32000, 16000, 32000, 20, 20),
+                      std::make_tuple(44100, 16000, 48000, 16000, 20, 20),
+                      std::make_tuple(44100, 16000, 32000, 16000, 20, 20),
+                      std::make_tuple(44100, 16000, 16000, 16000, 20, 0),
 
-                    std::make_tuple(32000, 48000, 48000, 48000, 35, 0),
-                    std::make_tuple(32000, 48000, 32000, 48000, 65, 30),
-                    std::make_tuple(32000, 48000, 16000, 48000, 40, 20),
-                    std::make_tuple(32000, 44100, 48000, 44100, 20, 20),
-                    std::make_tuple(32000, 44100, 32000, 44100, 20, 15),
-                    std::make_tuple(32000, 44100, 16000, 44100, 20, 15),
-                    std::make_tuple(32000, 32000, 48000, 32000, 35, 35),
-                    std::make_tuple(32000, 32000, 32000, 32000, 0, 0),
-                    std::make_tuple(32000, 32000, 16000, 32000, 40, 20),
-                    std::make_tuple(32000, 16000, 48000, 16000, 20, 20),
-                    std::make_tuple(32000, 16000, 32000, 16000, 20, 20),
-                    std::make_tuple(32000, 16000, 16000, 16000, 20, 0),
+                      std::make_tuple(32000, 48000, 48000, 48000, 35, 0),
+                      std::make_tuple(32000, 48000, 32000, 48000, 65, 30),
+                      std::make_tuple(32000, 48000, 16000, 48000, 40, 20),
+                      std::make_tuple(32000, 44100, 48000, 44100, 20, 20),
+                      std::make_tuple(32000, 44100, 32000, 44100, 20, 15),
+                      std::make_tuple(32000, 44100, 16000, 44100, 20, 15),
+                      std::make_tuple(32000, 32000, 48000, 32000, 35, 35),
+                      std::make_tuple(32000, 32000, 32000, 32000, 0, 0),
+                      std::make_tuple(32000, 32000, 16000, 32000, 40, 20),
+                      std::make_tuple(32000, 16000, 48000, 16000, 20, 20),
+                      std::make_tuple(32000, 16000, 32000, 16000, 20, 20),
+                      std::make_tuple(32000, 16000, 16000, 16000, 20, 0),
 
-                    std::make_tuple(16000, 48000, 48000, 48000, 25, 0),
-                    std::make_tuple(16000, 48000, 32000, 48000, 25, 30),
-                    std::make_tuple(16000, 48000, 16000, 48000, 25, 20),
-                    std::make_tuple(16000, 44100, 48000, 44100, 15, 20),
-                    std::make_tuple(16000, 44100, 32000, 44100, 15, 15),
-                    std::make_tuple(16000, 44100, 16000, 44100, 15, 15),
-                    std::make_tuple(16000, 32000, 48000, 32000, 25, 35),
-                    std::make_tuple(16000, 32000, 32000, 32000, 25, 0),
-                    std::make_tuple(16000, 32000, 16000, 32000, 25, 20),
-                    std::make_tuple(16000, 16000, 48000, 16000, 35, 20),
-                    std::make_tuple(16000, 16000, 32000, 16000, 35, 20),
-                    std::make_tuple(16000, 16000, 16000, 16000, 0, 0)));
+                      std::make_tuple(16000, 48000, 48000, 48000, 25, 0),
+                      std::make_tuple(16000, 48000, 32000, 48000, 25, 30),
+                      std::make_tuple(16000, 48000, 16000, 48000, 25, 20),
+                      std::make_tuple(16000, 44100, 48000, 44100, 15, 20),
+                      std::make_tuple(16000, 44100, 32000, 44100, 15, 15),
+                      std::make_tuple(16000, 44100, 16000, 44100, 15, 15),
+                      std::make_tuple(16000, 32000, 48000, 32000, 25, 35),
+                      std::make_tuple(16000, 32000, 32000, 32000, 25, 0),
+                      std::make_tuple(16000, 32000, 16000, 32000, 25, 20),
+                      std::make_tuple(16000, 16000, 48000, 16000, 35, 20),
+                      std::make_tuple(16000, 16000, 32000, 16000, 35, 20),
+                      std::make_tuple(16000, 16000, 16000, 16000, 0, 0)));
 #endif
 
 }  // namespace
@@ -2582,7 +2582,7 @@
 TEST(ApmConfiguration, EnablePostProcessing) {
   // Verify that apm uses a capture post processing module if one is provided.
   auto mock_post_processor_ptr =
-      new testing::NiceMock<test::MockCustomProcessing>();
+      new ::testing::NiceMock<test::MockCustomProcessing>();
   auto mock_post_processor =
       std::unique_ptr<CustomProcessing>(mock_post_processor_ptr);
   rtc::scoped_refptr<AudioProcessing> apm =
@@ -2594,14 +2594,14 @@
   audio.num_channels_ = 1;
   SetFrameSampleRate(&audio, AudioProcessing::NativeRate::kSampleRate16kHz);
 
-  EXPECT_CALL(*mock_post_processor_ptr, Process(testing::_)).Times(1);
+  EXPECT_CALL(*mock_post_processor_ptr, Process(::testing::_)).Times(1);
   apm->ProcessStream(&audio);
 }
 
 TEST(ApmConfiguration, EnablePreProcessing) {
   // Verify that apm uses a capture post processing module if one is provided.
   auto mock_pre_processor_ptr =
-      new testing::NiceMock<test::MockCustomProcessing>();
+      new ::testing::NiceMock<test::MockCustomProcessing>();
   auto mock_pre_processor =
       std::unique_ptr<CustomProcessing>(mock_pre_processor_ptr);
   rtc::scoped_refptr<AudioProcessing> apm =
@@ -2613,14 +2613,14 @@
   audio.num_channels_ = 1;
   SetFrameSampleRate(&audio, AudioProcessing::NativeRate::kSampleRate16kHz);
 
-  EXPECT_CALL(*mock_pre_processor_ptr, Process(testing::_)).Times(1);
+  EXPECT_CALL(*mock_pre_processor_ptr, Process(::testing::_)).Times(1);
   apm->ProcessReverseStream(&audio);
 }
 
 TEST(ApmConfiguration, EnableCaptureAnalyzer) {
   // Verify that apm uses a capture analyzer if one is provided.
   auto mock_capture_analyzer_ptr =
-      new testing::NiceMock<test::MockCustomAudioAnalyzer>();
+      new ::testing::NiceMock<test::MockCustomAudioAnalyzer>();
   auto mock_capture_analyzer =
       std::unique_ptr<CustomAudioAnalyzer>(mock_capture_analyzer_ptr);
   rtc::scoped_refptr<AudioProcessing> apm =
@@ -2632,13 +2632,13 @@
   audio.num_channels_ = 1;
   SetFrameSampleRate(&audio, AudioProcessing::NativeRate::kSampleRate16kHz);
 
-  EXPECT_CALL(*mock_capture_analyzer_ptr, Analyze(testing::_)).Times(1);
+  EXPECT_CALL(*mock_capture_analyzer_ptr, Analyze(::testing::_)).Times(1);
   apm->ProcessStream(&audio);
 }
 
 TEST(ApmConfiguration, PreProcessingReceivesRuntimeSettings) {
   auto mock_pre_processor_ptr =
-      new testing::NiceMock<test::MockCustomProcessing>();
+      new ::testing::NiceMock<test::MockCustomProcessing>();
   auto mock_pre_processor =
       std::unique_ptr<CustomProcessing>(mock_pre_processor_ptr);
   rtc::scoped_refptr<AudioProcessing> apm =
@@ -2654,7 +2654,8 @@
   audio.num_channels_ = 1;
   SetFrameSampleRate(&audio, AudioProcessing::NativeRate::kSampleRate16kHz);
 
-  EXPECT_CALL(*mock_pre_processor_ptr, SetRuntimeSetting(testing::_)).Times(1);
+  EXPECT_CALL(*mock_pre_processor_ptr, SetRuntimeSetting(::testing::_))
+      .Times(1);
   apm->ProcessReverseStream(&audio);
 }
 
@@ -2662,9 +2663,9 @@
  public:
   std::unique_ptr<EchoControl> Create(int sample_rate_hz) {
     auto ec = new test::MockEchoControl();
-    EXPECT_CALL(*ec, AnalyzeRender(testing::_)).Times(1);
-    EXPECT_CALL(*ec, AnalyzeCapture(testing::_)).Times(2);
-    EXPECT_CALL(*ec, ProcessCapture(testing::_, testing::_)).Times(2);
+    EXPECT_CALL(*ec, AnalyzeRender(::testing::_)).Times(1);
+    EXPECT_CALL(*ec, AnalyzeCapture(::testing::_)).Times(2);
+    EXPECT_CALL(*ec, ProcessCapture(::testing::_, ::testing::_)).Times(2);
     return std::unique_ptr<EchoControl>(ec);
   }
 };
diff --git a/modules/audio_processing/gain_control_config_proxy_unittest.cc b/modules/audio_processing/gain_control_config_proxy_unittest.cc
index e5204e8..931c99f 100644
--- a/modules/audio_processing/gain_control_config_proxy_unittest.cc
+++ b/modules/audio_processing/gain_control_config_proxy_unittest.cc
@@ -16,23 +16,23 @@
 #include "test/gtest.h"
 
 namespace webrtc {
-class GainControlConfigProxyTest : public testing::Test {
+class GainControlConfigProxyTest : public ::testing::Test {
  protected:
   GainControlConfigProxyTest()
       : apm_(new rtc::RefCountedObject<
-             testing::StrictMock<test::MockAudioProcessing>>()),
+             ::testing::StrictMock<test::MockAudioProcessing>>()),
         agc_(),
         proxy_(&lock_, apm_, &agc_) {
     EXPECT_CALL(*apm_, GetConfig())
-        .WillRepeatedly(testing::ReturnPointee(&apm_config_));
-    EXPECT_CALL(*apm_, ApplyConfig(testing::_))
-        .WillRepeatedly(testing::SaveArg<0>(&apm_config_));
+        .WillRepeatedly(::testing::ReturnPointee(&apm_config_));
+    EXPECT_CALL(*apm_, ApplyConfig(::testing::_))
+        .WillRepeatedly(::testing::SaveArg<0>(&apm_config_));
   }
 
   GainControl* proxy() { return &proxy_; }
 
   rtc::scoped_refptr<testing::StrictMock<test::MockAudioProcessing>> apm_;
-  testing::StrictMock<test::MockGainControl> agc_;
+  ::testing::StrictMock<test::MockGainControl> agc_;
   AudioProcessing::Config apm_config_;
 
  private:
@@ -48,7 +48,7 @@
 
 TEST_F(GainControlConfigProxyTest, StreamAnalogLevel) {
   EXPECT_CALL(*apm_, recommended_stream_analog_level())
-      .WillOnce(testing::Return(100));
+      .WillOnce(::testing::Return(100));
   EXPECT_EQ(100, proxy()->stream_analog_level());
 }
 
@@ -82,8 +82,8 @@
 
 TEST_F(GainControlConfigProxyTest, SetCompressionGainDb) {
   AudioProcessing::RuntimeSetting setting;
-  EXPECT_CALL(*apm_, SetRuntimeSetting(testing::_))
-      .WillOnce(testing::SaveArg<0>(&setting));
+  EXPECT_CALL(*apm_, SetRuntimeSetting(::testing::_))
+      .WillOnce(::testing::SaveArg<0>(&setting));
   proxy()->set_compression_gain_db(17);
   EXPECT_EQ(AudioProcessing::RuntimeSetting::Type::kCaptureCompressionGain,
             setting.type());
@@ -107,53 +107,53 @@
 
 TEST_F(GainControlConfigProxyTest, GetEnabled) {
   EXPECT_CALL(agc_, is_enabled())
-      .WillOnce(testing::Return(true))
-      .WillOnce(testing::Return(false));
+      .WillOnce(::testing::Return(true))
+      .WillOnce(::testing::Return(false));
   EXPECT_TRUE(proxy()->is_enabled());
   EXPECT_FALSE(proxy()->is_enabled());
 }
 
 TEST_F(GainControlConfigProxyTest, GetLimiterEnabled) {
   EXPECT_CALL(agc_, is_enabled())
-      .WillOnce(testing::Return(true))
-      .WillOnce(testing::Return(false));
+      .WillOnce(::testing::Return(true))
+      .WillOnce(::testing::Return(false));
   EXPECT_TRUE(proxy()->is_enabled());
   EXPECT_FALSE(proxy()->is_enabled());
 }
 
 TEST_F(GainControlConfigProxyTest, GetCompressionGainDb) {
-  EXPECT_CALL(agc_, compression_gain_db()).WillOnce(testing::Return(17));
+  EXPECT_CALL(agc_, compression_gain_db()).WillOnce(::testing::Return(17));
   EXPECT_EQ(17, proxy()->compression_gain_db());
 }
 
 TEST_F(GainControlConfigProxyTest, GetTargetLevelDbfs) {
-  EXPECT_CALL(agc_, target_level_dbfs()).WillOnce(testing::Return(17));
+  EXPECT_CALL(agc_, target_level_dbfs()).WillOnce(::testing::Return(17));
   EXPECT_EQ(17, proxy()->target_level_dbfs());
 }
 
 TEST_F(GainControlConfigProxyTest, GetAnalogLevelMinimum) {
-  EXPECT_CALL(agc_, analog_level_minimum()).WillOnce(testing::Return(17));
+  EXPECT_CALL(agc_, analog_level_minimum()).WillOnce(::testing::Return(17));
   EXPECT_EQ(17, proxy()->analog_level_minimum());
 }
 
 TEST_F(GainControlConfigProxyTest, GetAnalogLevelMaximum) {
-  EXPECT_CALL(agc_, analog_level_maximum()).WillOnce(testing::Return(17));
+  EXPECT_CALL(agc_, analog_level_maximum()).WillOnce(::testing::Return(17));
   EXPECT_EQ(17, proxy()->analog_level_maximum());
 }
 
 TEST_F(GainControlConfigProxyTest, GetStreamIsSaturated) {
   EXPECT_CALL(agc_, stream_is_saturated())
-      .WillOnce(testing::Return(true))
-      .WillOnce(testing::Return(false));
+      .WillOnce(::testing::Return(true))
+      .WillOnce(::testing::Return(false));
   EXPECT_TRUE(proxy()->stream_is_saturated());
   EXPECT_FALSE(proxy()->stream_is_saturated());
 }
 
 TEST_F(GainControlConfigProxyTest, GetMode) {
   EXPECT_CALL(agc_, mode())
-      .WillOnce(testing::Return(GainControl::Mode::kAdaptiveAnalog))
-      .WillOnce(testing::Return(GainControl::Mode::kAdaptiveDigital))
-      .WillOnce(testing::Return(GainControl::Mode::kFixedDigital));
+      .WillOnce(::testing::Return(GainControl::Mode::kAdaptiveAnalog))
+      .WillOnce(::testing::Return(GainControl::Mode::kAdaptiveDigital))
+      .WillOnce(::testing::Return(GainControl::Mode::kFixedDigital));
   EXPECT_EQ(GainControl::Mode::kAdaptiveAnalog, proxy()->mode());
   EXPECT_EQ(GainControl::Mode::kAdaptiveDigital, proxy()->mode());
   EXPECT_EQ(GainControl::Mode::kFixedDigital, proxy()->mode());
diff --git a/modules/audio_processing/gain_controller2_unittest.cc b/modules/audio_processing/gain_controller2_unittest.cc
index 258832a..46256d8 100644
--- a/modules/audio_processing/gain_controller2_unittest.cc
+++ b/modules/audio_processing/gain_controller2_unittest.cc
@@ -202,8 +202,8 @@
 };
 
 class FixedDigitalTest
-    : public testing::Test,
-      public testing::WithParamInterface<FixedDigitalTestParams> {};
+    : public ::testing::Test,
+      public ::testing::WithParamInterface<FixedDigitalTestParams> {};
 
 TEST_P(FixedDigitalTest, CheckSaturationBehaviorWithLimiter) {
   const float kInputLevel = 32767.f;
diff --git a/modules/audio_processing/include/mock_audio_processing.h b/modules/audio_processing/include/mock_audio_processing.h
index 7504b51..141a8ac 100644
--- a/modules/audio_processing/include/mock_audio_processing.h
+++ b/modules/audio_processing/include/mock_audio_processing.h
@@ -103,13 +103,13 @@
   MOCK_CONST_METHOD0(frame_size_ms, int());
 };
 
-class MockAudioProcessing : public testing::NiceMock<AudioProcessing> {
+class MockAudioProcessing : public ::testing::NiceMock<AudioProcessing> {
  public:
   MockAudioProcessing()
-      : gain_control_(new testing::NiceMock<MockGainControl>()),
-        level_estimator_(new testing::NiceMock<MockLevelEstimator>()),
-        noise_suppression_(new testing::NiceMock<MockNoiseSuppression>()),
-        voice_detection_(new testing::NiceMock<MockVoiceDetection>()) {}
+      : gain_control_(new ::testing::NiceMock<MockGainControl>()),
+        level_estimator_(new ::testing::NiceMock<MockLevelEstimator>()),
+        noise_suppression_(new ::testing::NiceMock<MockNoiseSuppression>()),
+        voice_detection_(new ::testing::NiceMock<MockVoiceDetection>()) {}
 
   virtual ~MockAudioProcessing() {}
 
diff --git a/modules/audio_processing/test/conversational_speech/generator_unittest.cc b/modules/audio_processing/test/conversational_speech/generator_unittest.cc
index aacf2a2..cad2656 100644
--- a/modules/audio_processing/test/conversational_speech/generator_unittest.cc
+++ b/modules/audio_processing/test/conversational_speech/generator_unittest.cc
@@ -167,7 +167,7 @@
 
 }  // namespace
 
-using testing::_;
+using ::testing::_;
 
 TEST(ConversationalSpeechTest, Settings) {
   const conversational_speech::Config config(
@@ -223,7 +223,7 @@
   auto mock_wavreader_factory = CreateMockWavReaderFactory();
 
   // There are two unique audio tracks to read.
-  EXPECT_CALL(*mock_wavreader_factory, Create(testing::_)).Times(2);
+  EXPECT_CALL(*mock_wavreader_factory, Create(::testing::_)).Times(2);
 
   MultiEndCall multiend_call(
       timing, audiotracks_path, std::move(mock_wavreader_factory));
@@ -237,7 +237,7 @@
   auto mock_wavreader_factory = CreateMockWavReaderFactory();
 
   // There is one unique audio track to read.
-  EXPECT_CALL(*mock_wavreader_factory, Create(testing::_)).Times(1);
+  EXPECT_CALL(*mock_wavreader_factory, Create(::testing::_)).Times(1);
 
   MultiEndCall multiend_call(
       timing, audiotracks_path, std::move(mock_wavreader_factory));
@@ -252,7 +252,7 @@
   auto mock_wavreader_factory = CreateMockWavReaderFactory();
 
   // There are two unique audio tracks to read.
-  EXPECT_CALL(*mock_wavreader_factory, Create(testing::_)).Times(2);
+  EXPECT_CALL(*mock_wavreader_factory, Create(::testing::_)).Times(2);
 
   MultiEndCall multiend_call(
       timing, audiotracks_path, std::move(mock_wavreader_factory));
diff --git a/modules/audio_processing/test/conversational_speech/mock_wavreader.cc b/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
index 58d68e6..1263e93 100644
--- a/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
+++ b/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
@@ -14,7 +14,7 @@
 namespace test {
 namespace conversational_speech {
 
-using testing::Return;
+using ::testing::Return;
 
 MockWavReader::MockWavReader(int sample_rate,
                              size_t num_channels,
diff --git a/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc b/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
index a45e3bb..96b5894 100644
--- a/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
+++ b/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
@@ -18,8 +18,8 @@
 namespace test {
 namespace conversational_speech {
 
-using testing::_;
-using testing::Invoke;
+using ::testing::_;
+using ::testing::Invoke;
 
 MockWavReaderFactory::MockWavReaderFactory(
     const Params& default_params,
diff --git a/modules/audio_processing/test/debug_dump_test.cc b/modules/audio_processing/test/debug_dump_test.cc
index 3684495..ff08e5d 100644
--- a/modules/audio_processing/test/debug_dump_test.cc
+++ b/modules/audio_processing/test/debug_dump_test.cc
@@ -375,9 +375,9 @@
     if (event->type() == audioproc::Event::CONFIG) {
       const audioproc::Config* msg = &event->config();
       ASSERT_TRUE(msg->has_experiments_description());
-      EXPECT_PRED_FORMAT2(testing::IsSubstring, "RefinedAdaptiveFilter",
+      EXPECT_PRED_FORMAT2(::testing::IsSubstring, "RefinedAdaptiveFilter",
                           msg->experiments_description().c_str());
-      EXPECT_PRED_FORMAT2(testing::IsSubstring, "Legacy AEC",
+      EXPECT_PRED_FORMAT2(::testing::IsSubstring, "Legacy AEC",
                           msg->experiments_description().c_str());
     }
   }
@@ -404,11 +404,11 @@
     if (event->type() == audioproc::Event::CONFIG) {
       const audioproc::Config* msg = &event->config();
       ASSERT_TRUE(msg->has_experiments_description());
-      EXPECT_PRED_FORMAT2(testing::IsSubstring, "EchoController",
+      EXPECT_PRED_FORMAT2(::testing::IsSubstring, "EchoController",
                           msg->experiments_description().c_str());
-      EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "Legacy AEC",
+      EXPECT_PRED_FORMAT2(::testing::IsNotSubstring, "Legacy AEC",
                           msg->experiments_description().c_str());
-      EXPECT_PRED_FORMAT2(testing::IsSubstring, "AgcClippingLevelExperiment",
+      EXPECT_PRED_FORMAT2(::testing::IsSubstring, "AgcClippingLevelExperiment",
                           msg->experiments_description().c_str());
     }
   }
@@ -434,9 +434,10 @@
     if (event->type() == audioproc::Event::CONFIG) {
       const audioproc::Config* msg = &event->config();
       ASSERT_TRUE(msg->has_experiments_description());
-      EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "EchoController",
+      EXPECT_PRED_FORMAT2(::testing::IsNotSubstring, "EchoController",
                           msg->experiments_description().c_str());
-      EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "AgcClippingLevelExperiment",
+      EXPECT_PRED_FORMAT2(::testing::IsNotSubstring,
+                          "AgcClippingLevelExperiment",
                           msg->experiments_description().c_str());
     }
   }
@@ -461,9 +462,9 @@
     if (event->type() == audioproc::Event::CONFIG) {
       const audioproc::Config* msg = &event->config();
       ASSERT_TRUE(msg->has_experiments_description());
-      EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "Legacy AEC",
+      EXPECT_PRED_FORMAT2(::testing::IsNotSubstring, "Legacy AEC",
                           msg->experiments_description().c_str());
-      EXPECT_PRED_FORMAT2(testing::IsSubstring, "EchoController",
+      EXPECT_PRED_FORMAT2(::testing::IsSubstring, "EchoController",
                           msg->experiments_description().c_str());
     }
   }
@@ -488,7 +489,7 @@
     if (event->type() == audioproc::Event::CONFIG) {
       const audioproc::Config* msg = &event->config();
       ASSERT_TRUE(msg->has_experiments_description());
-      EXPECT_PRED_FORMAT2(testing::IsSubstring, "AgcClippingLevelExperiment",
+      EXPECT_PRED_FORMAT2(::testing::IsSubstring, "AgcClippingLevelExperiment",
                           msg->experiments_description().c_str());
     }
   }
diff --git a/modules/audio_processing/utility/pffft_wrapper_unittest.cc b/modules/audio_processing/utility/pffft_wrapper_unittest.cc
index a3d6f35..9aed548 100644
--- a/modules/audio_processing/utility/pffft_wrapper_unittest.cc
+++ b/modules/audio_processing/utility/pffft_wrapper_unittest.cc
@@ -125,7 +125,7 @@
 
 #if !defined(NDEBUG) && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
 
-class PffftInvalidSizeTest : public testing::Test,
+class PffftInvalidSizeTest : public ::testing::Test,
                              public ::testing::WithParamInterface<size_t> {};
 
 TEST_P(PffftInvalidSizeTest, DoNotCreateRealWrapper) {
diff --git a/modules/bitrate_controller/bitrate_controller_unittest.cc b/modules/bitrate_controller/bitrate_controller_unittest.cc
index cdb9f30..0f86210 100644
--- a/modules/bitrate_controller/bitrate_controller_unittest.cc
+++ b/modules/bitrate_controller/bitrate_controller_unittest.cc
@@ -94,7 +94,7 @@
   TestBitrateObserver bitrate_observer_;
   std::unique_ptr<BitrateController> controller_;
   RtcpBandwidthObserver* bandwidth_observer_;
-  testing::NiceMock<webrtc::MockRtcEventLog> event_log_;
+  ::testing::NiceMock<webrtc::MockRtcEventLog> event_log_;
 };
 
 TEST_F(BitrateControllerTest, DefaultMinMaxBitrate) {
diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc b/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
index 2b01e17..0b0185c 100644
--- a/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
+++ b/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
@@ -34,7 +34,7 @@
 }
 
 void TestProbing(bool use_delay_based) {
-  testing::NiceMock<MockRtcEventLog> event_log;
+  ::testing::NiceMock<MockRtcEventLog> event_log;
   SendSideBandwidthEstimation bwe(&event_log);
   int64_t now_ms = 0;
   bwe.SetMinMaxBitrate(DataRate::bps(100000), DataRate::bps(1500000));
diff --git a/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc b/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
index bf6f99f..f8b3570 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
+++ b/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
@@ -17,15 +17,15 @@
 #include "test/gtest.h"
 #include "test/scenario/scenario.h"
 
-using testing::Field;
-using testing::Matcher;
-using testing::AllOf;
-using testing::Ge;
-using testing::Le;
-using testing::NiceMock;
-using testing::Property;
-using testing::StrictMock;
-using testing::_;
+using ::testing::_;
+using ::testing::AllOf;
+using ::testing::Field;
+using ::testing::Ge;
+using ::testing::Le;
+using ::testing::Matcher;
+using ::testing::NiceMock;
+using ::testing::Property;
+using ::testing::StrictMock;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc
index 3061730..df6ad54 100644
--- a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc
+++ b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc
@@ -19,10 +19,10 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
-using testing::NiceMock;
-using testing::InSequence;
-using testing::Return;
+using ::testing::_;
+using ::testing::InSequence;
+using ::testing::NiceMock;
+using ::testing::Return;
 
 namespace webrtc {
 
diff --git a/modules/congestion_controller/goog_cc/alr_detector_unittest.cc b/modules/congestion_controller/goog_cc/alr_detector_unittest.cc
index 4252685..2c8232c 100644
--- a/modules/congestion_controller/goog_cc/alr_detector_unittest.cc
+++ b/modules/congestion_controller/goog_cc/alr_detector_unittest.cc
@@ -69,7 +69,7 @@
 };
 }  // namespace
 
-class AlrDetectorTest : public testing::Test {
+class AlrDetectorTest : public ::testing::Test {
  public:
   void SetUp() override {
     alr_detector_.SetEstimatedBitrate(kEstimatedBitrateBps);
diff --git a/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc b/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc
index 9be5b21..bd9f7e1 100644
--- a/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc
+++ b/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc
@@ -13,7 +13,7 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
+using ::testing::_;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
index 000ff9e..1831f5d 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
@@ -16,11 +16,11 @@
 #include "test/gtest.h"
 #include "test/scenario/scenario.h"
 
-using testing::Field;
-using testing::Matcher;
-using testing::NiceMock;
-using testing::Property;
-using testing::_;
+using ::testing::_;
+using ::testing::Field;
+using ::testing::Matcher;
+using ::testing::NiceMock;
+using ::testing::Property;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
index 46b661c..df806c2 100644
--- a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
+++ b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
@@ -21,12 +21,12 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
-using testing::AtLeast;
-using testing::Field;
-using testing::Matcher;
-using testing::NiceMock;
-using testing::Return;
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::Field;
+using ::testing::Matcher;
+using ::testing::NiceMock;
+using ::testing::Return;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/congestion_controller/pcc/bitrate_controller_unittest.cc b/modules/congestion_controller/pcc/bitrate_controller_unittest.cc
index 7811ab0..3f80e21 100644
--- a/modules/congestion_controller/pcc/bitrate_controller_unittest.cc
+++ b/modules/congestion_controller/pcc/bitrate_controller_unittest.cc
@@ -109,10 +109,10 @@
 TEST(PccBitrateControllerTest, NoChangesWhenUtilityFunctionDoesntChange) {
   std::unique_ptr<MockUtilityFunction> mock_utility_function =
       absl::make_unique<MockUtilityFunction>();
-  EXPECT_CALL(*mock_utility_function, Compute(testing::_))
+  EXPECT_CALL(*mock_utility_function, Compute(::testing::_))
       .Times(2)
-      .WillOnce(testing::Return(100))
-      .WillOnce(testing::Return(100));
+      .WillOnce(::testing::Return(100))
+      .WillOnce(::testing::Return(100));
 
   PccBitrateController bitrate_controller(
       kInitialConversionFactor, kInitialDynamicBoundary,
@@ -144,10 +144,10 @@
   const double kSecondMonitorIntervalUtility =
       2 * kTargetSendingRate.bps() * kEpsilon;
 
-  EXPECT_CALL(*mock_utility_function, Compute(testing::_))
+  EXPECT_CALL(*mock_utility_function, Compute(::testing::_))
       .Times(2)
-      .WillOnce(testing::Return(kFirstMonitorIntervalUtility))
-      .WillOnce(testing::Return(kSecondMonitorIntervalUtility));
+      .WillOnce(::testing::Return(kFirstMonitorIntervalUtility))
+      .WillOnce(::testing::Return(kSecondMonitorIntervalUtility));
 
   PccBitrateController bitrate_controller(
       kInitialConversionFactor, kInitialDynamicBoundary,
@@ -182,12 +182,12 @@
       10 * kInitialDynamicBoundary * kTargetSendingRate.bps() * 2 *
       kTargetSendingRate.bps() * kEpsilon;
 
-  EXPECT_CALL(*mock_utility_function, Compute(testing::_))
+  EXPECT_CALL(*mock_utility_function, Compute(::testing::_))
       .Times(4)
-      .WillOnce(testing::Return(kFirstMonitorIntervalUtility))
-      .WillOnce(testing::Return(kSecondMonitorIntervalUtility))
-      .WillOnce(testing::Return(kFirstMonitorIntervalUtility))
-      .WillOnce(testing::Return(kSecondMonitorIntervalUtility));
+      .WillOnce(::testing::Return(kFirstMonitorIntervalUtility))
+      .WillOnce(::testing::Return(kSecondMonitorIntervalUtility))
+      .WillOnce(::testing::Return(kFirstMonitorIntervalUtility))
+      .WillOnce(::testing::Return(kSecondMonitorIntervalUtility));
 
   PccBitrateController bitrate_controller(
       kInitialConversionFactor, kInitialDynamicBoundary,
@@ -220,16 +220,16 @@
   std::unique_ptr<MockUtilityFunction> mock_utility_function =
       absl::make_unique<MockUtilityFunction>();
   constexpr double kFirstUtilityFunction = 1000;
-  EXPECT_CALL(*mock_utility_function, Compute(testing::_))
+  EXPECT_CALL(*mock_utility_function, Compute(::testing::_))
       .Times(4)
       // For first 3 calls we expect to stay in the SLOW_START mode and double
       // the sending rate since the utility function increases its value. For
       // the last call utility function decreases its value, this means that
       // we should not double the sending rate and exit SLOW_START mode.
-      .WillOnce(testing::Return(kFirstUtilityFunction))
-      .WillOnce(testing::Return(kFirstUtilityFunction + 1))
-      .WillOnce(testing::Return(kFirstUtilityFunction + 2))
-      .WillOnce(testing::Return(kFirstUtilityFunction + 1));
+      .WillOnce(::testing::Return(kFirstUtilityFunction))
+      .WillOnce(::testing::Return(kFirstUtilityFunction + 1))
+      .WillOnce(::testing::Return(kFirstUtilityFunction + 2))
+      .WillOnce(::testing::Return(kFirstUtilityFunction + 1));
 
   PccBitrateController bitrate_controller(
       kInitialConversionFactor, kInitialDynamicBoundary,
@@ -260,12 +260,12 @@
   const double kSecondMiUtilityFunction =
       2 * kTargetSendingRate.bps() * kEpsilon;
 
-  EXPECT_CALL(*mock_utility_function, Compute(testing::_))
+  EXPECT_CALL(*mock_utility_function, Compute(::testing::_))
       .Times(4)
-      .WillOnce(testing::Return(kFirstMiUtilityFunction))
-      .WillOnce(testing::Return(kSecondMiUtilityFunction))
-      .WillOnce(testing::Return(kFirstMiUtilityFunction))
-      .WillOnce(testing::Return(kSecondMiUtilityFunction));
+      .WillOnce(::testing::Return(kFirstMiUtilityFunction))
+      .WillOnce(::testing::Return(kSecondMiUtilityFunction))
+      .WillOnce(::testing::Return(kFirstMiUtilityFunction))
+      .WillOnce(::testing::Return(kSecondMiUtilityFunction));
   std::vector<PccMonitorInterval> monitor_block{
       PccMonitorInterval(kTargetSendingRate * (1 + kEpsilon), kStartTime,
                          kIntervalDuration),
diff --git a/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc b/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
index cb4e680..f7ee78c 100644
--- a/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
+++ b/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
@@ -17,12 +17,12 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::Field;
-using testing::Matcher;
-using testing::AllOf;
-using testing::Ge;
-using testing::Le;
-using testing::Property;
+using ::testing::AllOf;
+using ::testing::Field;
+using ::testing::Ge;
+using ::testing::Le;
+using ::testing::Matcher;
+using ::testing::Property;
 
 namespace webrtc {
 namespace test {
diff --git a/modules/congestion_controller/receive_side_congestion_controller_unittest.cc b/modules/congestion_controller/receive_side_congestion_controller_unittest.cc
index 4b5a66f..632b762 100644
--- a/modules/congestion_controller/receive_side_congestion_controller_unittest.cc
+++ b/modules/congestion_controller/receive_side_congestion_controller_unittest.cc
@@ -14,12 +14,12 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
-using testing::AtLeast;
-using testing::NiceMock;
-using testing::Return;
-using testing::SaveArg;
-using testing::StrictMock;
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::SaveArg;
+using ::testing::StrictMock;
 
 namespace webrtc {
 
diff --git a/modules/congestion_controller/send_side_congestion_controller_unittest.cc b/modules/congestion_controller/send_side_congestion_controller_unittest.cc
index e959b53..f617e56 100644
--- a/modules/congestion_controller/send_side_congestion_controller_unittest.cc
+++ b/modules/congestion_controller/send_side_congestion_controller_unittest.cc
@@ -24,13 +24,13 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
-using testing::AtLeast;
-using testing::Ge;
-using testing::NiceMock;
-using testing::Return;
-using testing::SaveArg;
-using testing::StrictMock;
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::Ge;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::SaveArg;
+using ::testing::StrictMock;
 
 namespace webrtc {
 
@@ -216,7 +216,7 @@
 
 TEST_F(LegacySendSideCongestionControllerTest, OnNetworkRouteChanged) {
   int new_bitrate = 200000;
-  testing::Mock::VerifyAndClearExpectations(pacer_.get());
+  ::testing::Mock::VerifyAndClearExpectations(pacer_.get());
   EXPECT_CALL(observer_, OnNetworkChanged(new_bitrate, _, _, _));
   EXPECT_CALL(*pacer_, SetEstimatedBitrate(new_bitrate));
   rtc::NetworkRoute route;
@@ -236,7 +236,7 @@
 
 TEST_F(LegacySendSideCongestionControllerTest, OldFeedback) {
   int new_bitrate = 200000;
-  testing::Mock::VerifyAndClearExpectations(pacer_.get());
+  ::testing::Mock::VerifyAndClearExpectations(pacer_.get());
   EXPECT_CALL(observer_, OnNetworkChanged(new_bitrate, _, _, _));
   EXPECT_CALL(*pacer_, SetEstimatedBitrate(new_bitrate));
 
@@ -326,7 +326,7 @@
   clock_.AdvanceTimeMilliseconds(25);
   controller_->Process();
 
-  EXPECT_CALL(observer_, OnNetworkChanged(_, _, _, testing::Ne(0)));
+  EXPECT_CALL(observer_, OnNetworkChanged(_, _, _, ::testing::Ne(0)));
   EXPECT_CALL(*pacer_, SetEstimatedBitrate(_));
   bandwidth_observer_->OnReceivedEstimatedBitrate(kInitialBitrateBps * 2);
   clock_.AdvanceTimeMilliseconds(25);
@@ -334,7 +334,7 @@
 }
 
 TEST_F(LegacySendSideCongestionControllerTest, ProbeOnRouteChange) {
-  testing::Mock::VerifyAndClearExpectations(pacer_.get());
+  ::testing::Mock::VerifyAndClearExpectations(pacer_.get());
   EXPECT_CALL(*pacer_, CreateProbeCluster(kInitialBitrateBps * 6, _));
   EXPECT_CALL(*pacer_, CreateProbeCluster(kInitialBitrateBps * 12, _));
   EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _, _));
diff --git a/modules/desktop_capture/blank_detector_desktop_capturer_wrapper_unittest.cc b/modules/desktop_capture/blank_detector_desktop_capturer_wrapper_unittest.cc
index d2393a2..25a81ed 100644
--- a/modules/desktop_capture/blank_detector_desktop_capturer_wrapper_unittest.cc
+++ b/modules/desktop_capture/blank_detector_desktop_capturer_wrapper_unittest.cc
@@ -24,7 +24,7 @@
 namespace webrtc {
 
 class BlankDetectorDesktopCapturerWrapperTest
-    : public testing::Test,
+    : public ::testing::Test,
       public DesktopCapturer::Callback {
  public:
   BlankDetectorDesktopCapturerWrapperTest();
diff --git a/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc b/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
index f1a2860..ac4fd0a 100644
--- a/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
+++ b/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
@@ -173,7 +173,7 @@
 
 }  // namespace
 
-class DesktopAndCursorComposerTest : public testing::Test,
+class DesktopAndCursorComposerTest : public ::testing::Test,
                                      public DesktopCapturer::Callback {
  public:
   DesktopAndCursorComposerTest()
diff --git a/modules/desktop_capture/desktop_capturer_differ_wrapper_unittest.cc b/modules/desktop_capture/desktop_capturer_differ_wrapper_unittest.cc
index 0ae46f5..d16390d 100644
--- a/modules/desktop_capture/desktop_capturer_differ_wrapper_unittest.cc
+++ b/modules/desktop_capture/desktop_capturer_differ_wrapper_unittest.cc
@@ -117,21 +117,22 @@
                               const T<DesktopRect, Rect...>& updated_region,
                               bool check_result,
                               bool exactly_match) {
-  EXPECT_CALL(*callback,
-              OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS, testing::_))
+  EXPECT_CALL(*callback, OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS,
+                                            ::testing::_))
       .Times(1)
-      .WillOnce(testing::Invoke([&updated_region, check_result, exactly_match](
-                                    DesktopCapturer::Result result,
-                                    std::unique_ptr<DesktopFrame>* frame) {
-        ASSERT_EQ(result, DesktopCapturer::Result::SUCCESS);
-        if (check_result) {
-          if (exactly_match) {
-            AssertUpdatedRegionIs(**frame, updated_region);
-          } else {
-            AssertUpdatedRegionCovers(**frame, updated_region);
-          }
-        }
-      }));
+      .WillOnce(
+          ::testing::Invoke([&updated_region, check_result, exactly_match](
+                                DesktopCapturer::Result result,
+                                std::unique_ptr<DesktopFrame>* frame) {
+            ASSERT_EQ(result, DesktopCapturer::Result::SUCCESS);
+            if (check_result) {
+              if (exactly_match) {
+                AssertUpdatedRegionIs(**frame, updated_region);
+              } else {
+                AssertUpdatedRegionCovers(**frame, updated_region);
+              }
+            }
+          }));
   for (const auto& rect : updated_region) {
     frame_painter->updated_region()->AddRect(rect);
   }
@@ -143,8 +144,8 @@
 // DesktopFrame into black.
 void ExecuteCapturer(DesktopCapturerDifferWrapper* capturer,
                      MockDesktopCapturerCallback* callback) {
-  EXPECT_CALL(*callback,
-              OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS, testing::_))
+  EXPECT_CALL(*callback, OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS,
+                                            ::testing::_))
       .Times(1);
   capturer->CaptureFrame();
 }
@@ -168,11 +169,11 @@
 
   capturer.Start(&callback);
 
-  EXPECT_CALL(callback,
-              OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS, testing::_))
+  EXPECT_CALL(callback, OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS,
+                                           ::testing::_))
       .Times(1)
-      .WillOnce(testing::Invoke([](DesktopCapturer::Result result,
-                                   std::unique_ptr<DesktopFrame>* frame) {
+      .WillOnce(::testing::Invoke([](DesktopCapturer::Result result,
+                                     std::unique_ptr<DesktopFrame>* frame) {
         ASSERT_EQ(result, DesktopCapturer::Result::SUCCESS);
         AssertUpdatedRegionIs(**frame,
                               {DesktopRect::MakeSize((*frame)->size())});
diff --git a/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc b/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc
index bc5715d..36fa69d 100644
--- a/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc
+++ b/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc
@@ -65,7 +65,7 @@
 
 }  // namespace
 
-class FallbackDesktopCapturerWrapperTest : public testing::Test,
+class FallbackDesktopCapturerWrapperTest : public ::testing::Test,
                                            public DesktopCapturer::Callback {
  public:
   FallbackDesktopCapturerWrapperTest();
diff --git a/modules/desktop_capture/mouse_cursor_monitor_unittest.cc b/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
index 2d1039a..c42ab35 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
+++ b/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
@@ -22,7 +22,7 @@
 
 namespace webrtc {
 
-class MouseCursorMonitorTest : public testing::Test,
+class MouseCursorMonitorTest : public ::testing::Test,
                                public MouseCursorMonitor::Callback {
  public:
   MouseCursorMonitorTest() : position_received_(false) {}
diff --git a/modules/desktop_capture/screen_capturer_helper_unittest.cc b/modules/desktop_capture/screen_capturer_helper_unittest.cc
index 1ce4959..165bbe4 100644
--- a/modules/desktop_capture/screen_capturer_helper_unittest.cc
+++ b/modules/desktop_capture/screen_capturer_helper_unittest.cc
@@ -14,7 +14,7 @@
 
 namespace webrtc {
 
-class ScreenCapturerHelperTest : public testing::Test {
+class ScreenCapturerHelperTest : public ::testing::Test {
  protected:
   ScreenCapturerHelper capturer_helper_;
 };
diff --git a/modules/desktop_capture/screen_capturer_integration_test.cc b/modules/desktop_capture/screen_capturer_integration_test.cc
index cb0e475..f9745b9 100644
--- a/modules/desktop_capture/screen_capturer_integration_test.cc
+++ b/modules/desktop_capture/screen_capturer_integration_test.cc
@@ -78,7 +78,7 @@
 
 }  // namespace
 
-class ScreenCapturerIntegrationTest : public testing::Test {
+class ScreenCapturerIntegrationTest : public ::testing::Test {
  public:
   void SetUp() override {
     capturer_ = DesktopCapturer::CreateScreenCapturer(
@@ -270,7 +270,7 @@
       EXPECT_CALL(callback_, OnCaptureResultPtr(_, _))
           .WillOnce(SaveCaptureResult(&result, &frame));
       capturer->CaptureFrame();
-      testing::Mock::VerifyAndClearExpectations(&callback_);
+      ::testing::Mock::VerifyAndClearExpectations(&callback_);
       if (result == DesktopCapturer::Result::SUCCESS) {
         EXPECT_TRUE(frame);
         return frame;
diff --git a/modules/desktop_capture/screen_capturer_mac_unittest.cc b/modules/desktop_capture/screen_capturer_mac_unittest.cc
index 812f230..96e8440 100644
--- a/modules/desktop_capture/screen_capturer_mac_unittest.cc
+++ b/modules/desktop_capture/screen_capturer_mac_unittest.cc
@@ -28,7 +28,7 @@
 
 namespace webrtc {
 
-class ScreenCapturerMacTest : public testing::Test {
+class ScreenCapturerMacTest : public ::testing::Test {
  public:
   // Verifies that the whole screen is initially dirty.
   void CaptureDoneCallback1(DesktopCapturer::Result result,
diff --git a/modules/desktop_capture/screen_capturer_unittest.cc b/modules/desktop_capture/screen_capturer_unittest.cc
index a0b7cc5..4d1dc6d 100644
--- a/modules/desktop_capture/screen_capturer_unittest.cc
+++ b/modules/desktop_capture/screen_capturer_unittest.cc
@@ -30,7 +30,7 @@
 
 namespace webrtc {
 
-class ScreenCapturerTest : public testing::Test {
+class ScreenCapturerTest : public ::testing::Test {
  public:
   void SetUp() override {
     capturer_ = DesktopCapturer::CreateScreenCapturer(
diff --git a/modules/desktop_capture/window_capturer_unittest.cc b/modules/desktop_capture/window_capturer_unittest.cc
index 05b6963..a806ada 100644
--- a/modules/desktop_capture/window_capturer_unittest.cc
+++ b/modules/desktop_capture/window_capturer_unittest.cc
@@ -21,7 +21,7 @@
 
 namespace webrtc {
 
-class WindowCapturerTest : public testing::Test,
+class WindowCapturerTest : public ::testing::Test,
                            public DesktopCapturer::Callback {
  public:
   void SetUp() override {
diff --git a/modules/pacing/paced_sender_unittest.cc b/modules/pacing/paced_sender_unittest.cc
index 158a5fb..234a29f 100644
--- a/modules/pacing/paced_sender_unittest.cc
+++ b/modules/pacing/paced_sender_unittest.cc
@@ -19,9 +19,9 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
-using testing::Field;
-using testing::Return;
+using ::testing::_;
+using ::testing::Field;
+using ::testing::Return;
 
 namespace {
 constexpr unsigned kFirstClusterBps = 900000;
@@ -106,7 +106,7 @@
   int padding_sent_;
 };
 
-class PacedSenderTest : public testing::TestWithParam<std::string> {
+class PacedSenderTest : public ::testing::TestWithParam<std::string> {
  protected:
   PacedSenderTest() : clock_(123456) {
     srand(0);
@@ -141,7 +141,7 @@
   std::unique_ptr<PacedSender> send_bucket_;
 };
 
-class PacedSenderFieldTrialTest : public testing::Test {
+class PacedSenderFieldTrialTest : public ::testing::Test {
  protected:
   struct MediaStream {
     const RtpPacketSender::Priority priority;
@@ -215,7 +215,7 @@
   ProcessNext(&pacer);
   ProcessNext(&pacer);
   // Audio packet unblocked when congestion window clear.
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
   pacer.UpdateOutstandingData(0);
   EXPECT_CALL(callback_, TimeToSendPacket).WillOnce(Return(true));
   ProcessNext(&pacer);
@@ -251,7 +251,7 @@
   InsertPacket(&pacer, &audio);
   ProcessNext(&pacer);
   ProcessNext(&pacer);
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
   // Audio packet unblocked when the budget has recovered.
   EXPECT_CALL(callback_, TimeToSendPacket).WillOnce(Return(true));
   ProcessNext(&pacer);
@@ -699,7 +699,7 @@
     clock_.AdvanceTimeMilliseconds(5);
     send_bucket_->Process();
   }
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
   EXPECT_CALL(callback_, TimeToSendPacket(_, _, _, _, _)).Times(0);
   EXPECT_CALL(callback_, TimeToSendPadding(_, _)).Times(0);
 
@@ -714,7 +714,7 @@
     send_bucket_->Process();
     expected_time_until_padding -= 5;
   }
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
   EXPECT_CALL(callback_, TimeToSendPadding(1, _)).Times(1);
   clock_.AdvanceTimeMilliseconds(5);
   send_bucket_->Process();
@@ -781,7 +781,7 @@
     clock_.AdvanceTimeMilliseconds(5);
     send_bucket_->Process();
   }
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
   EXPECT_CALL(callback_, TimeToSendPacket(_, _, _, _, _)).Times(0);
   int unacked_packets = 0;
   for (int duration = 0; duration < kCongestionTimeMs; duration += 5) {
@@ -792,7 +792,7 @@
     clock_.AdvanceTimeMilliseconds(5);
     send_bucket_->Process();
   }
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
 
   // First mark half of the congested packets as cleared and make sure that just
   // as many are sent
@@ -808,7 +808,7 @@
     send_bucket_->Process();
   }
   unacked_packets -= ack_count;
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
 
   // Second make sure all packets are sent if sent packets are continuously
   // marked as acked.
@@ -882,11 +882,11 @@
     clock_.AdvanceTimeMilliseconds(5);
     expected_time_until_send -= 5;
   }
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
   EXPECT_CALL(callback_, TimeToSendPadding(1, _)).Times(1);
   clock_.AdvanceTimeMilliseconds(5);
   send_bucket_->Process();
-  testing::Mock::VerifyAndClearExpectations(&callback_);
+  ::testing::Mock::VerifyAndClearExpectations(&callback_);
 
   // Expect high prio packets to come out first followed by normal
   // prio packets and low prio packets (all in capture order).
diff --git a/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc b/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc
index e66b9c9..2dafdbf 100644
--- a/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc
+++ b/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc
@@ -83,7 +83,7 @@
   }
 
   SimulatedClock clock_;
-  testing::StrictMock<MockTransportFeedbackSender> router_;
+  ::testing::StrictMock<MockTransportFeedbackSender> router_;
   RemoteEstimatorProxy proxy_;
 };
 
diff --git a/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc b/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc
index d19e575..805bc64 100644
--- a/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc
@@ -79,7 +79,7 @@
   std::unique_ptr<ForwardErrorCorrection> erasure_code_;
 
   FlexfecPacketGenerator packet_generator_;
-  testing::StrictMock<MockRecoveredPacketReceiver> recovered_packet_receiver_;
+  ::testing::StrictMock<MockRecoveredPacketReceiver> recovered_packet_receiver_;
 };
 
 void FlexfecReceiverTest::PacketizeFrame(size_t num_media_packets,
diff --git a/modules/rtp_rtcp/source/rtcp_packet/bye_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/bye_unittest.cc
index 00944b3..448c2d4 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/bye_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/bye_unittest.cc
@@ -14,7 +14,7 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAre;
+using ::testing::ElementsAre;
 using webrtc::rtcp::Bye;
 
 namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report_unittest.cc
index 7598fef..3fd7d20 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report_unittest.cc
@@ -14,8 +14,8 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAre;
-using testing::IsEmpty;
+using ::testing::ElementsAre;
+using ::testing::IsEmpty;
 using webrtc::rtcp::ExtendedJitterReport;
 
 namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/extended_reports_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/extended_reports_unittest.cc
index 7052787..a302a5b 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/extended_reports_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/extended_reports_unittest.cc
@@ -15,10 +15,10 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAre;
-using testing::ElementsAreArray;
-using testing::make_tuple;
-using testing::SizeIs;
+using ::testing::ElementsAre;
+using ::testing::ElementsAreArray;
+using ::testing::make_tuple;
+using ::testing::SizeIs;
 using webrtc::rtcp::Dlrr;
 using webrtc::rtcp::ExtendedReports;
 using webrtc::rtcp::ReceiveTimeInfo;
diff --git a/modules/rtp_rtcp/source/rtcp_packet/fir_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/fir_unittest.cc
index d9eb465..01593e1 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/fir_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/fir_unittest.cc
@@ -14,12 +14,12 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::AllOf;
-using testing::ElementsAre;
-using testing::ElementsAreArray;
-using testing::Eq;
-using testing::Field;
-using testing::make_tuple;
+using ::testing::AllOf;
+using ::testing::ElementsAre;
+using ::testing::ElementsAreArray;
+using ::testing::Eq;
+using ::testing::Field;
+using ::testing::make_tuple;
 using webrtc::rtcp::Fir;
 
 namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc
index 67e614d..c971e22 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc
@@ -14,8 +14,8 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAreArray;
-using testing::make_tuple;
+using ::testing::ElementsAreArray;
+using ::testing::make_tuple;
 using webrtc::rtcp::Pli;
 
 namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request_unittest.cc
index f10f93e..d0e40fd 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request_unittest.cc
@@ -14,8 +14,8 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAreArray;
-using testing::make_tuple;
+using ::testing::ElementsAreArray;
+using ::testing::make_tuple;
 using webrtc::rtcp::RapidResyncRequest;
 
 namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/receiver_report_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/receiver_report_unittest.cc
index fb434d9..23ea496 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/receiver_report_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/receiver_report_unittest.cc
@@ -16,9 +16,9 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAreArray;
-using testing::IsEmpty;
-using testing::make_tuple;
+using ::testing::ElementsAreArray;
+using ::testing::IsEmpty;
+using ::testing::make_tuple;
 using webrtc::rtcp::ReceiverReport;
 using webrtc::rtcp::ReportBlock;
 
diff --git a/modules/rtp_rtcp/source/rtcp_packet/remb_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/remb_unittest.cc
index c939d9b..ed5f48f 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/remb_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/remb_unittest.cc
@@ -14,9 +14,9 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAreArray;
-using testing::IsEmpty;
-using testing::make_tuple;
+using ::testing::ElementsAreArray;
+using ::testing::IsEmpty;
+using ::testing::make_tuple;
 using webrtc::rtcp::Remb;
 
 namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/sender_report_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/sender_report_unittest.cc
index a0c6e72..37f268e 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/sender_report_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/sender_report_unittest.cc
@@ -16,8 +16,8 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAreArray;
-using testing::make_tuple;
+using ::testing::ElementsAreArray;
+using ::testing::make_tuple;
 using webrtc::rtcp::ReportBlock;
 using webrtc::rtcp::SenderReport;
 
diff --git a/modules/rtp_rtcp/source/rtcp_packet/tmmbn_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/tmmbn_unittest.cc
index e5d2e0b..3a37bb1 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/tmmbn_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/tmmbn_unittest.cc
@@ -14,9 +14,9 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAreArray;
-using testing::IsEmpty;
-using testing::make_tuple;
+using ::testing::ElementsAreArray;
+using ::testing::IsEmpty;
+using ::testing::make_tuple;
 using webrtc::rtcp::TmmbItem;
 using webrtc::rtcp::Tmmbn;
 
diff --git a/modules/rtp_rtcp/source/rtcp_packet/tmmbr_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/tmmbr_unittest.cc
index 63fa911..a320f23 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/tmmbr_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/tmmbr_unittest.cc
@@ -14,9 +14,9 @@
 #include "test/gtest.h"
 #include "test/rtcp_packet_parser.h"
 
-using testing::ElementsAreArray;
-using testing::IsEmpty;
-using testing::make_tuple;
+using ::testing::ElementsAreArray;
+using ::testing::IsEmpty;
+using ::testing::make_tuple;
 using webrtc::rtcp::TmmbItem;
 using webrtc::rtcp::Tmmbr;
 
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index 11a71a0..3d9550b 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -201,11 +201,12 @@
   }
 
   SimulatedClock fake_clock_;
-  testing::NiceMock<MockRtcEventLog> mock_rtc_event_log_;
+  ::testing::NiceMock<MockRtcEventLog> mock_rtc_event_log_;
   MockRtpPacketSender mock_paced_sender_;
-  testing::StrictMock<MockTransportSequenceNumberAllocator> seq_num_allocator_;
-  testing::StrictMock<MockSendPacketObserver> send_packet_observer_;
-  testing::StrictMock<MockTransportFeedbackObserver> feedback_observer_;
+  ::testing::StrictMock<MockTransportSequenceNumberAllocator>
+      seq_num_allocator_;
+  ::testing::StrictMock<MockSendPacketObserver> send_packet_observer_;
+  ::testing::StrictMock<MockTransportFeedbackObserver> feedback_observer_;
   RateLimiter retransmission_rate_limiter_;
   std::unique_ptr<RTPSender> rtp_sender_;
   LoopbackTransportTest transport_;
@@ -346,14 +347,14 @@
 
   const size_t kPaddingSize = 59;
   EXPECT_CALL(transport, SendRtp(_, kPaddingSize + kRtpHeaderSize, _))
-      .WillOnce(testing::Return(true));
+      .WillOnce(::testing::Return(true));
   EXPECT_EQ(kPaddingSize,
             rtp_sender_->TimeToSendPadding(kPaddingSize, PacedPacketInfo()));
 
   // Requested padding size is too small, will send a larger one.
   const size_t kMinPaddingSize = 50;
   EXPECT_CALL(transport, SendRtp(_, kMinPaddingSize + kRtpHeaderSize, _))
-      .WillOnce(testing::Return(true));
+      .WillOnce(::testing::Return(true));
   EXPECT_EQ(kMinPaddingSize, rtp_sender_->TimeToSendPadding(kMinPaddingSize - 5,
                                                             PacedPacketInfo()));
 }
@@ -376,7 +377,7 @@
 TEST_P(RtpSenderTestWithoutPacer,
        TransportFeedbackObserverGetsCorrectByteCount) {
   constexpr int kRtpOverheadBytesPerPacket = 12 + 8;
-  testing::NiceMock<MockOverheadObserver> mock_overhead_observer;
+  ::testing::NiceMock<MockOverheadObserver> mock_overhead_observer;
   rtp_sender_.reset(
       new RTPSender(false, &fake_clock_, &transport_, nullptr, absl::nullopt,
                     &seq_num_allocator_, &feedback_observer_, nullptr, nullptr,
@@ -388,7 +389,7 @@
                    kRtpExtensionTransportSequenceNumber,
                    kTransportSequenceNumberExtensionId));
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
 
   const size_t expected_bytes =
       GetParam() ? sizeof(kPayloadData) + kRtpOverheadBytesPerPacket
@@ -417,7 +418,7 @@
                    kTransportSequenceNumberExtensionId));
 
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
   EXPECT_CALL(send_packet_observer_,
               OnSendPacket(kTransportSequenceNumber, _, _))
       .Times(1);
@@ -457,7 +458,7 @@
   rtp_sender_->RegisterRtpHeaderExtension(kRtpExtensionTransportSequenceNumber,
                                           kTransportSequenceNumberExtensionId);
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
   EXPECT_CALL(send_packet_observer_, OnSendPacket).Times(1);
   SendGenericPacket();
   EXPECT_TRUE(transport_.last_options_.included_in_feedback);
@@ -470,7 +471,7 @@
   rtp_sender_->RegisterRtpHeaderExtension(kRtpExtensionTransportSequenceNumber,
                                           kTransportSequenceNumberExtensionId);
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
   EXPECT_CALL(send_packet_observer_, OnSendPacket).Times(1);
   SendGenericPacket();
   EXPECT_TRUE(transport_.last_options_.included_in_allocation);
@@ -493,7 +494,7 @@
 }
 
 TEST_P(RtpSenderTestWithoutPacer, OnSendSideDelayUpdated) {
-  testing::StrictMock<MockSendSideDelayObserver> send_side_delay_observer_;
+  ::testing::StrictMock<MockSendSideDelayObserver> send_side_delay_observer_;
   rtp_sender_.reset(
       new RTPSender(false, &fake_clock_, &transport_, nullptr, absl::nullopt,
                     nullptr, nullptr, nullptr, &send_side_delay_observer_,
@@ -567,7 +568,7 @@
                    kRtpExtensionTransportSequenceNumber,
                    kTransportSequenceNumberExtensionId));
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
   EXPECT_CALL(send_packet_observer_,
               OnSendPacket(kTransportSequenceNumber, _, _))
       .Times(1);
@@ -591,7 +592,7 @@
 
   EXPECT_CALL(mock_paced_sender_, InsertPacket(_, kSsrc, kSeqNum, _, _, _));
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
   EXPECT_CALL(send_packet_observer_,
               OnSendPacket(kTransportSequenceNumber, _, _))
       .Times(1);
@@ -928,7 +929,7 @@
               OnSendPacket(kTransportSequenceNumber, _, _))
       .Times(1);
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
   EXPECT_CALL(mock_paced_sender_, InsertPacket(_, kSsrc, kSeqNum, _, _, _))
       .Times(1);
 
@@ -948,7 +949,7 @@
 
   EXPECT_CALL(send_packet_observer_, OnSendPacket(_, _, _)).Times(0);
   EXPECT_CALL(seq_num_allocator_, AllocateSequenceNumber())
-      .WillOnce(testing::Return(kTransportSequenceNumber));
+      .WillOnce(::testing::Return(kTransportSequenceNumber));
   EXPECT_CALL(mock_paced_sender_, InsertPacket(_, kSsrc, kSeqNum, _, _, _))
       .Times(1);
 
@@ -1024,7 +1025,7 @@
   // Send 10 packets of increasing size.
   for (size_t i = 0; i < kNumPayloadSizes; ++i) {
     int64_t capture_time_ms = fake_clock_.TimeInMilliseconds();
-    EXPECT_CALL(transport, SendRtp(_, _, _)).WillOnce(testing::Return(true));
+    EXPECT_CALL(transport, SendRtp(_, _, _)).WillOnce(::testing::Return(true));
     SendPacket(capture_time_ms, kPayloadSizes[i]);
     rtp_sender_->TimeToSendPacket(kSsrc, seq_num++, capture_time_ms, false,
                                   PacedPacketInfo());
@@ -1037,15 +1038,15 @@
 
   // The amount of padding to send it too small to send a payload packet.
   EXPECT_CALL(transport, SendRtp(_, kMaxPaddingSize + rtp_header_len, _))
-      .WillOnce(testing::Return(true));
+      .WillOnce(::testing::Return(true));
   EXPECT_EQ(kMaxPaddingSize,
             rtp_sender_->TimeToSendPadding(49, PacedPacketInfo()));
 
   PacketOptions options;
   EXPECT_CALL(transport,
               SendRtp(_, kPayloadSizes[0] + rtp_header_len + kRtxHeaderSize, _))
-      .WillOnce(
-          testing::DoAll(testing::SaveArg<2>(&options), testing::Return(true)));
+      .WillOnce(::testing::DoAll(::testing::SaveArg<2>(&options),
+                                 ::testing::Return(true)));
   EXPECT_EQ(kPayloadSizes[0],
             rtp_sender_->TimeToSendPadding(500, PacedPacketInfo()));
   EXPECT_TRUE(options.is_retransmit);
@@ -1054,12 +1055,12 @@
                                  kPayloadSizes[kNumPayloadSizes - 1] +
                                      rtp_header_len + kRtxHeaderSize,
                                  _))
-      .WillOnce(testing::Return(true));
+      .WillOnce(::testing::Return(true));
 
   options.is_retransmit = false;
   EXPECT_CALL(transport, SendRtp(_, kMaxPaddingSize + rtp_header_len, _))
-      .WillOnce(
-          testing::DoAll(testing::SaveArg<2>(&options), testing::Return(true)));
+      .WillOnce(::testing::DoAll(::testing::SaveArg<2>(&options),
+                                 ::testing::Return(true)));
   EXPECT_EQ(kPayloadSizes[kNumPayloadSizes - 1] + kMaxPaddingSize,
             rtp_sender_->TimeToSendPadding(999, PacedPacketInfo()));
   EXPECT_FALSE(options.is_retransmit);
@@ -1146,7 +1147,7 @@
   uint16_t flexfec_seq_num;
   EXPECT_CALL(mock_paced_sender_, InsertPacket(RtpPacketSender::kLowPriority,
                                                kFlexfecSsrc, _, _, _, false))
-      .WillOnce(testing::SaveArg<2>(&flexfec_seq_num));
+      .WillOnce(::testing::SaveArg<2>(&flexfec_seq_num));
 
   RTPVideoHeader video_header;
   EXPECT_TRUE(rtp_sender_video.SendVideo(
@@ -1248,7 +1249,7 @@
   uint16_t flexfec_seq_num;
   EXPECT_CALL(mock_paced_sender_, InsertPacket(RtpPacketSender::kLowPriority,
                                                kFlexfecSsrc, _, _, _, false))
-      .WillOnce(testing::SaveArg<2>(&flexfec_seq_num));
+      .WillOnce(::testing::SaveArg<2>(&flexfec_seq_num));
   EXPECT_CALL(mock_paced_sender_,
               InsertPacket(RtpPacketSender::kLowPriority, kMediaSsrc,
                            kSeqNum + 1, _, _, false));
diff --git a/modules/video_capture/test/video_capture_unittest.cc b/modules/video_capture/test/video_capture_unittest.cc
index 283c13f..8b97076 100644
--- a/modules/video_capture/test/video_capture_unittest.cc
+++ b/modules/video_capture/test/video_capture_unittest.cc
@@ -145,7 +145,7 @@
   webrtc::VideoRotation rotate_frame_;
 };
 
-class VideoCaptureTest : public testing::Test {
+class VideoCaptureTest : public ::testing::Test {
  public:
   VideoCaptureTest() : number_of_devices_(0) {}
 
diff --git a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
index fa10bfb..37346f5 100644
--- a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
+++ b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
@@ -44,8 +44,8 @@
 #include "test/gtest.h"
 #include "test/video_codec_settings.h"
 
-using testing::_;
-using testing::Return;
+using ::testing::_;
+using ::testing::Return;
 
 namespace webrtc {
 
@@ -53,9 +53,9 @@
 const VideoCodecType kMultiplexAssociatedCodecType =
     PayloadStringToCodecType(kMultiplexAssociatedCodecName);
 
-class TestMultiplexAdapter
-    : public VideoCodecUnitTest,
-      public testing::WithParamInterface<bool /* supports_augmenting_data */> {
+class TestMultiplexAdapter : public VideoCodecUnitTest,
+                             public ::testing::WithParamInterface<
+                                 bool /* supports_augmenting_data */> {
  public:
   TestMultiplexAdapter()
       : decoder_factory_(new webrtc::MockVideoDecoderFactory),
diff --git a/modules/video_coding/codecs/test/videoprocessor_unittest.cc b/modules/video_coding/codecs/test/videoprocessor_unittest.cc
index 394ff23..842ad7e 100644
--- a/modules/video_coding/codecs/test/videoprocessor_unittest.cc
+++ b/modules/video_coding/codecs/test/videoprocessor_unittest.cc
@@ -39,7 +39,7 @@
 
 }  // namespace
 
-class VideoProcessorTest : public testing::Test {
+class VideoProcessorTest : public ::testing::Test {
  protected:
   VideoProcessorTest() : q_("VP queue") {
     config_.SetCodecSettings(cricket::kVp8CodecName, 1, 1, 1, false, false,
diff --git a/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
index 705d60f..a9248bd 100644
--- a/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
+++ b/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
@@ -27,11 +27,11 @@
 
 namespace webrtc {
 
-using testing::_;
-using testing::ElementsAreArray;
-using testing::Invoke;
-using testing::NiceMock;
-using testing::Return;
+using ::testing::_;
+using ::testing::ElementsAreArray;
+using ::testing::Invoke;
+using ::testing::NiceMock;
+using ::testing::Return;
 using EncoderInfo = webrtc::VideoEncoder::EncoderInfo;
 using FramerateFractions =
     absl::InlinedVector<uint8_t, webrtc::kMaxTemporalStreams>;
diff --git a/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc b/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc
index 8495b21..fba7f9f 100644
--- a/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc
+++ b/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc
@@ -197,8 +197,8 @@
 }
 
 class SvcRateAllocatorTestParametrizedContentType
-    : public testing::Test,
-      public testing::WithParamInterface<bool> {
+    : public ::testing::Test,
+      public ::testing::WithParamInterface<bool> {
  public:
   SvcRateAllocatorTestParametrizedContentType()
       : is_screen_sharing_(GetParam()) {}
diff --git a/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc b/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
index 913bc01..87f991d 100644
--- a/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
+++ b/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
@@ -24,7 +24,7 @@
 
 namespace webrtc {
 
-using testing::ElementsAreArray;
+using ::testing::ElementsAreArray;
 using EncoderInfo = webrtc::VideoEncoder::EncoderInfo;
 using FramerateFractions =
     absl::InlinedVector<uint8_t, webrtc::kMaxTemporalStreams>;
diff --git a/modules/video_coding/frame_buffer2_unittest.cc b/modules/video_coding/frame_buffer2_unittest.cc
index 5348269..0fb2572 100644
--- a/modules/video_coding/frame_buffer2_unittest.cc
+++ b/modules/video_coding/frame_buffer2_unittest.cc
@@ -25,8 +25,8 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::_;
-using testing::Return;
+using ::testing::_;
+using ::testing::Return;
 
 namespace webrtc {
 namespace video_coding {
diff --git a/modules/video_coding/h264_sprop_parameter_sets_unittest.cc b/modules/video_coding/h264_sprop_parameter_sets_unittest.cc
index 6cd7590..ae26313 100644
--- a/modules/video_coding/h264_sprop_parameter_sets_unittest.cc
+++ b/modules/video_coding/h264_sprop_parameter_sets_unittest.cc
@@ -16,7 +16,7 @@
 
 namespace webrtc {
 
-class H264SpropParameterSetsTest : public testing::Test {
+class H264SpropParameterSetsTest : public ::testing::Test {
  public:
   H264SpropParameterSets h264_sprop;
 };
diff --git a/modules/video_coding/utility/simulcast_test_fixture_impl.cc b/modules/video_coding/utility/simulcast_test_fixture_impl.cc
index 8eb2daa..b745fae 100644
--- a/modules/video_coding/utility/simulcast_test_fixture_impl.cc
+++ b/modules/video_coding/utility/simulcast_test_fixture_impl.cc
@@ -854,9 +854,9 @@
   EXPECT_CALL(encoder_callback, OnEncodedImage(_, _, _))
       .Times(3)
       .WillRepeatedly(
-          testing::Invoke([&](const EncodedImage& encoded_image,
-                              const CodecSpecificInfo* codec_specific_info,
-                              const RTPFragmentationHeader* fragmentation) {
+          ::testing::Invoke([&](const EncodedImage& encoded_image,
+                                const CodecSpecificInfo* codec_specific_info,
+                                const RTPFragmentationHeader* fragmentation) {
             EXPECT_EQ(encoded_image._frameType, VideoFrameType::kVideoFrameKey);
 
             size_t index = encoded_image.SpatialIndex().value_or(0);
@@ -873,27 +873,27 @@
   EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL));
 
   EXPECT_CALL(decoder_callback, Decoded(_, _, _))
-      .WillOnce(testing::Invoke([](VideoFrame& decodedImage,
-                                   absl::optional<int32_t> decode_time_ms,
-                                   absl::optional<uint8_t> qp) {
+      .WillOnce(::testing::Invoke([](VideoFrame& decodedImage,
+                                     absl::optional<int32_t> decode_time_ms,
+                                     absl::optional<uint8_t> qp) {
         EXPECT_EQ(decodedImage.width(), kDefaultWidth / 4);
         EXPECT_EQ(decodedImage.height(), kDefaultHeight / 4);
       }));
   EXPECT_EQ(0, decoder_->Decode(encoded_frame[0], false, NULL, 0));
 
   EXPECT_CALL(decoder_callback, Decoded(_, _, _))
-      .WillOnce(testing::Invoke([](VideoFrame& decodedImage,
-                                   absl::optional<int32_t> decode_time_ms,
-                                   absl::optional<uint8_t> qp) {
+      .WillOnce(::testing::Invoke([](VideoFrame& decodedImage,
+                                     absl::optional<int32_t> decode_time_ms,
+                                     absl::optional<uint8_t> qp) {
         EXPECT_EQ(decodedImage.width(), kDefaultWidth / 2);
         EXPECT_EQ(decodedImage.height(), kDefaultHeight / 2);
       }));
   EXPECT_EQ(0, decoder_->Decode(encoded_frame[1], false, NULL, 0));
 
   EXPECT_CALL(decoder_callback, Decoded(_, _, _))
-      .WillOnce(testing::Invoke([](VideoFrame& decodedImage,
-                                   absl::optional<int32_t> decode_time_ms,
-                                   absl::optional<uint8_t> qp) {
+      .WillOnce(::testing::Invoke([](VideoFrame& decodedImage,
+                                     absl::optional<int32_t> decode_time_ms,
+                                     absl::optional<uint8_t> qp) {
         EXPECT_EQ(decodedImage.width(), kDefaultWidth);
         EXPECT_EQ(decodedImage.height(), kDefaultHeight);
       }));
diff --git a/p2p/base/async_stun_tcp_socket_unittest.cc b/p2p/base/async_stun_tcp_socket_unittest.cc
index 70fddda..5634534 100644
--- a/p2p/base/async_stun_tcp_socket_unittest.cc
+++ b/p2p/base/async_stun_tcp_socket_unittest.cc
@@ -56,7 +56,7 @@
 static const rtc::SocketAddress kClientAddr("11.11.11.11", 0);
 static const rtc::SocketAddress kServerAddr("22.22.22.22", 0);
 
-class AsyncStunTCPSocketTest : public testing::Test,
+class AsyncStunTCPSocketTest : public ::testing::Test,
                                public sigslot::has_slots<> {
  protected:
   AsyncStunTCPSocketTest()
diff --git a/p2p/base/basic_async_resolver_factory_unittest.cc b/p2p/base/basic_async_resolver_factory_unittest.cc
index 020226f..0c21c68 100644
--- a/p2p/base/basic_async_resolver_factory_unittest.cc
+++ b/p2p/base/basic_async_resolver_factory_unittest.cc
@@ -17,7 +17,7 @@
 
 namespace webrtc {
 
-class BasicAsyncResolverFactoryTest : public testing::Test,
+class BasicAsyncResolverFactoryTest : public ::testing::Test,
                                       public sigslot::has_slots<> {
  public:
   void TestCreate() {
diff --git a/p2p/base/dtls_transport_unittest.cc b/p2p/base/dtls_transport_unittest.cc
index f85965d..b71d65e 100644
--- a/p2p/base/dtls_transport_unittest.cc
+++ b/p2p/base/dtls_transport_unittest.cc
@@ -297,7 +297,7 @@
 };
 
 // Base class for DtlsTransportTest and DtlsEventOrderingTest, which
-// inherit from different variants of testing::Test.
+// inherit from different variants of ::testing::Test.
 //
 // Note that this test always uses a FakeClock, due to the |fake_clock_| member
 // variable.
diff --git a/p2p/base/mock_ice_transport.h b/p2p/base/mock_ice_transport.h
index 77716b2..6aeb950 100644
--- a/p2p/base/mock_ice_transport.h
+++ b/p2p/base/mock_ice_transport.h
@@ -19,8 +19,8 @@
 #include "rtc_base/gunit.h"
 #include "test/gmock.h"
 
-using testing::_;
-using testing::Return;
+using ::testing::_;
+using ::testing::Return;
 
 namespace cricket {
 
diff --git a/p2p/base/p2p_transport_channel_unittest.cc b/p2p/base/p2p_transport_channel_unittest.cc
index 775545b..f97d631 100644
--- a/p2p/base/p2p_transport_channel_unittest.cc
+++ b/p2p/base/p2p_transport_channel_unittest.cc
@@ -187,7 +187,7 @@
 // and that the result is what we expect.
 // Note that this class is a base class for use by other tests, who will provide
 // specialized test behavior.
-class P2PTransportChannelTestBase : public testing::Test,
+class P2PTransportChannelTestBase : public ::testing::Test,
                                     public rtc::MessageHandler,
                                     public sigslot::has_slots<> {
  public:
@@ -3074,7 +3074,7 @@
 
 // A collection of tests which tests a single P2PTransportChannel by sending
 // pings.
-class P2PTransportChannelPingTest : public testing::Test,
+class P2PTransportChannelPingTest : public ::testing::Test,
                                     public sigslot::has_slots<> {
  public:
   P2PTransportChannelPingTest()
diff --git a/p2p/base/port_allocator_unittest.cc b/p2p/base/port_allocator_unittest.cc
index c828102..a9edbec 100644
--- a/p2p/base/port_allocator_unittest.cc
+++ b/p2p/base/port_allocator_unittest.cc
@@ -24,7 +24,7 @@
 static const char kTurnUsername[] = "test";
 static const char kTurnPassword[] = "test";
 
-class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> {
+class PortAllocatorTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   PortAllocatorTest()
       : vss_(new rtc::VirtualSocketServer()), main_(vss_.get()) {
diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc
index 8857a97..fb2b4ef 100644
--- a/p2p/base/port_unittest.cc
+++ b/p2p/base/port_unittest.cc
@@ -397,7 +397,7 @@
   bool connection_ready_to_send_ = false;
 };
 
-class PortTest : public testing::Test, public sigslot::has_slots<> {
+class PortTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   PortTest()
       : ss_(new rtc::VirtualSocketServer()),
diff --git a/p2p/base/pseudo_tcp_unittest.cc b/p2p/base/pseudo_tcp_unittest.cc
index b542911..c0f4a89 100644
--- a/p2p/base/pseudo_tcp_unittest.cc
+++ b/p2p/base/pseudo_tcp_unittest.cc
@@ -42,7 +42,7 @@
   void disableWindowScale() { PseudoTcp::disableWindowScale(); }
 };
 
-class PseudoTcpTestBase : public testing::Test,
+class PseudoTcpTestBase : public ::testing::Test,
                           public rtc::MessageHandler,
                           public cricket::IPseudoTcpNotify {
  public:
diff --git a/p2p/base/regathering_controller_unittest.cc b/p2p/base/regathering_controller_unittest.cc
index db1f1bd..c86aa1a 100644
--- a/p2p/base/regathering_controller_unittest.cc
+++ b/p2p/base/regathering_controller_unittest.cc
@@ -44,7 +44,7 @@
 
 namespace webrtc {
 
-class RegatheringControllerTest : public testing::Test,
+class RegatheringControllerTest : public ::testing::Test,
                                   public sigslot::has_slots<> {
  public:
   RegatheringControllerTest()
diff --git a/p2p/base/relay_port_unittest.cc b/p2p/base/relay_port_unittest.cc
index 5f410e6..ce01c15 100644
--- a/p2p/base/relay_port_unittest.cc
+++ b/p2p/base/relay_port_unittest.cc
@@ -41,7 +41,7 @@
 // RelayPort and created sockets by listening for signals such as,
 // SignalConnectFailure, SignalConnectTimeout, SignalSocketClosed and
 // SignalReadPacket.
-class RelayPortTest : public testing::Test, public sigslot::has_slots<> {
+class RelayPortTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   RelayPortTest()
       : virtual_socket_server_(new rtc::VirtualSocketServer()),
diff --git a/p2p/base/relay_server_unittest.cc b/p2p/base/relay_server_unittest.cc
index a64cf4f..48e750f 100644
--- a/p2p/base/relay_server_unittest.cc
+++ b/p2p/base/relay_server_unittest.cc
@@ -43,7 +43,7 @@
 
 }  // namespace
 
-class RelayServerTest : public testing::Test {
+class RelayServerTest : public ::testing::Test {
  public:
   RelayServerTest()
       : ss_(new rtc::VirtualSocketServer()),
diff --git a/p2p/base/stun_port_unittest.cc b/p2p/base/stun_port_unittest.cc
index 7e7e2de..a23c063 100644
--- a/p2p/base/stun_port_unittest.cc
+++ b/p2p/base/stun_port_unittest.cc
@@ -41,7 +41,7 @@
 static const int kHighCostPortKeepaliveLifetimeMs = 2 * 60 * 1000;
 
 // Tests connecting a StunPort to a fake STUN server (cricket::StunServer)
-class StunPortTestBase : public testing::Test, public sigslot::has_slots<> {
+class StunPortTestBase : public ::testing::Test, public sigslot::has_slots<> {
  public:
   StunPortTestBase()
       : ss_(new rtc::VirtualSocketServer()),
@@ -419,17 +419,18 @@
   EXPECT_CALL(*socket, SetOption(_, _)).WillRepeatedly(Return(0));
 
   // If DSCP is not set on the socket, stun packets should have no value.
-  EXPECT_CALL(*socket, SendTo(_, _, _,
-                              testing::Field(&rtc::PacketOptions::dscp,
-                                             testing::Eq(rtc::DSCP_NO_CHANGE))))
+  EXPECT_CALL(*socket,
+              SendTo(_, _, _,
+                     ::testing::Field(&rtc::PacketOptions::dscp,
+                                      ::testing::Eq(rtc::DSCP_NO_CHANGE))))
       .WillOnce(Return(100));
   PrepareAddress();
 
   // Once it is set transport wide, they should inherit that value.
   port()->SetOption(rtc::Socket::OPT_DSCP, rtc::DSCP_AF41);
   EXPECT_CALL(*socket, SendTo(_, _, _,
-                              testing::Field(&rtc::PacketOptions::dscp,
-                                             testing::Eq(rtc::DSCP_AF41))))
+                              ::testing::Field(&rtc::PacketOptions::dscp,
+                                               ::testing::Eq(rtc::DSCP_AF41))))
       .WillRepeatedly(Return(100));
   EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock);
 }
diff --git a/p2p/base/stun_request_unittest.cc b/p2p/base/stun_request_unittest.cc
index e2ac57f..47d2d41 100644
--- a/p2p/base/stun_request_unittest.cc
+++ b/p2p/base/stun_request_unittest.cc
@@ -19,7 +19,7 @@
 
 namespace cricket {
 
-class StunRequestTest : public testing::Test, public sigslot::has_slots<> {
+class StunRequestTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   StunRequestTest()
       : manager_(rtc::Thread::Current()),
diff --git a/p2p/base/stun_server_unittest.cc b/p2p/base/stun_server_unittest.cc
index b5cc1df..efc1cd2 100644
--- a/p2p/base/stun_server_unittest.cc
+++ b/p2p/base/stun_server_unittest.cc
@@ -29,7 +29,7 @@
 const rtc::SocketAddress client_addr("1.2.3.4", 1234);
 }  // namespace
 
-class StunServerTest : public testing::Test {
+class StunServerTest : public ::testing::Test {
  public:
   StunServerTest() : ss_(new rtc::VirtualSocketServer()), network_(ss_.get()) {}
   virtual void SetUp() {
diff --git a/p2p/base/tcp_port_unittest.cc b/p2p/base/tcp_port_unittest.cc
index b5b1f64..4c11470 100644
--- a/p2p/base/tcp_port_unittest.cc
+++ b/p2p/base/tcp_port_unittest.cc
@@ -55,7 +55,7 @@
   bool connection_destroyed_ = false;
 };
 
-class TCPPortTest : public testing::Test, public sigslot::has_slots<> {
+class TCPPortTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   TCPPortTest()
       : ss_(new rtc::VirtualSocketServer()),
diff --git a/p2p/base/transport_description_factory_unittest.cc b/p2p/base/transport_description_factory_unittest.cc
index cf04964..875d140 100644
--- a/p2p/base/transport_description_factory_unittest.cc
+++ b/p2p/base/transport_description_factory_unittest.cc
@@ -30,7 +30,7 @@
 using ::testing::Contains;
 using ::testing::Not;
 
-class TransportDescriptionFactoryTest : public testing::Test {
+class TransportDescriptionFactoryTest : public ::testing::Test {
  public:
   TransportDescriptionFactoryTest()
       : ice_credentials_({}),
diff --git a/p2p/base/turn_port_unittest.cc b/p2p/base/turn_port_unittest.cc
index 80af11d..b21a257 100644
--- a/p2p/base/turn_port_unittest.cc
+++ b/p2p/base/turn_port_unittest.cc
@@ -144,7 +144,7 @@
 
 // Note: This test uses a fake clock with a simulated network round trip
 // (between local port and TURN server) of kSimulatedRtt.
-class TurnPortTest : public testing::Test,
+class TurnPortTest : public ::testing::Test,
                      public sigslot::has_slots<>,
                      public rtc::MessageHandler {
  public:
diff --git a/p2p/base/turn_server_unittest.cc b/p2p/base/turn_server_unittest.cc
index 4080cec..f115be1 100644
--- a/p2p/base/turn_server_unittest.cc
+++ b/p2p/base/turn_server_unittest.cc
@@ -19,7 +19,7 @@
 
 namespace cricket {
 
-class TurnServerConnectionTest : public testing::Test {
+class TurnServerConnectionTest : public ::testing::Test {
  public:
   TurnServerConnectionTest() : thread_(&vss_) {}
 
diff --git a/p2p/client/basic_port_allocator_unittest.cc b/p2p/client/basic_port_allocator_unittest.cc
index e9fd506..1682e9d 100644
--- a/p2p/client/basic_port_allocator_unittest.cc
+++ b/p2p/client/basic_port_allocator_unittest.cc
@@ -145,7 +145,7 @@
   return os;
 }
 
-class BasicPortAllocatorTestBase : public testing::Test,
+class BasicPortAllocatorTestBase : public ::testing::Test,
                                    public sigslot::has_slots<> {
  public:
   BasicPortAllocatorTestBase()
diff --git a/p2p/stunprober/stun_prober_unittest.cc b/p2p/stunprober/stun_prober_unittest.cc
index c54f453..e192598 100644
--- a/p2p/stunprober/stun_prober_unittest.cc
+++ b/p2p/stunprober/stun_prober_unittest.cc
@@ -35,7 +35,7 @@
 
 }  // namespace
 
-class StunProberTest : public testing::Test {
+class StunProberTest : public ::testing::Test {
  public:
   StunProberTest()
       : ss_(new rtc::VirtualSocketServer()),
diff --git a/pc/channel_manager_unittest.cc b/pc/channel_manager_unittest.cc
index 03c68ea..8a20f40 100644
--- a/pc/channel_manager_unittest.cc
+++ b/pc/channel_manager_unittest.cc
@@ -40,7 +40,7 @@
     VideoCodec(99, "H264"), VideoCodec(100, "VP8"), VideoCodec(96, "rtx"),
 };
 
-class ChannelManagerTest : public testing::Test {
+class ChannelManagerTest : public ::testing::Test {
  protected:
   ChannelManagerTest()
       : network_(rtc::Thread::CreateWithSocketServer()),
diff --git a/pc/channel_unittest.cc b/pc/channel_unittest.cc
index edcea88..9c5f82b 100644
--- a/pc/channel_unittest.cc
+++ b/pc/channel_unittest.cc
@@ -101,7 +101,7 @@
 
 // Base class for Voice/Video/RtpDataChannel tests
 template <class T>
-class ChannelTest : public testing::Test, public sigslot::has_slots<> {
+class ChannelTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   enum Flags {
     RTCP_MUX = 0x1,
diff --git a/pc/data_channel_unittest.cc b/pc/data_channel_unittest.cc
index 7ce40fb..52c54e7 100644
--- a/pc/data_channel_unittest.cc
+++ b/pc/data_channel_unittest.cc
@@ -62,7 +62,7 @@
 // TODO(deadbeef): The fact that these tests use a fake provider makes them not
 // too valuable. Should rewrite using the
 // peerconnection_datachannel_unittest.cc infrastructure.
-class SctpDataChannelTest : public testing::Test {
+class SctpDataChannelTest : public ::testing::Test {
  protected:
   SctpDataChannelTest()
       : provider_(new FakeDataChannelProvider()),
@@ -613,7 +613,7 @@
                  webrtc_data_channel_->state(), kDefaultTimeout);
 }
 
-class SctpSidAllocatorTest : public testing::Test {
+class SctpSidAllocatorTest : public ::testing::Test {
  protected:
   SctpSidAllocator allocator_;
 };
diff --git a/pc/dtls_srtp_transport_unittest.cc b/pc/dtls_srtp_transport_unittest.cc
index abf1b2d..d4ad5fa 100644
--- a/pc/dtls_srtp_transport_unittest.cc
+++ b/pc/dtls_srtp_transport_unittest.cc
@@ -39,7 +39,7 @@
 
 const int kRtpAuthTagLen = 10;
 
-class DtlsSrtpTransportTest : public testing::Test,
+class DtlsSrtpTransportTest : public ::testing::Test,
                               public sigslot::has_slots<> {
  protected:
   DtlsSrtpTransportTest() {}
diff --git a/pc/dtls_transport_unittest.cc b/pc/dtls_transport_unittest.cc
index 508e557..0c27c1b 100644
--- a/pc/dtls_transport_unittest.cc
+++ b/pc/dtls_transport_unittest.cc
@@ -47,7 +47,7 @@
   std::vector<DtlsTransportState> states_;
 };
 
-class DtlsTransportTest : public testing::Test {
+class DtlsTransportTest : public ::testing::Test {
  public:
   DtlsTransport* transport() { return transport_.get(); }
   DtlsTransportObserverInterface* observer() { return &observer_; }
diff --git a/pc/dtmf_sender_unittest.cc b/pc/dtmf_sender_unittest.cc
index b98b035..069833a 100644
--- a/pc/dtmf_sender_unittest.cc
+++ b/pc/dtmf_sender_unittest.cc
@@ -114,7 +114,7 @@
   sigslot::signal0<> SignalDestroyed;
 };
 
-class DtmfSenderTest : public testing::Test {
+class DtmfSenderTest : public ::testing::Test {
  protected:
   DtmfSenderTest()
       : observer_(new rtc::RefCountedObject<FakeDtmfObserver>()),
diff --git a/pc/ice_server_parsing_unittest.cc b/pc/ice_server_parsing_unittest.cc
index 9f1b817..2262903 100644
--- a/pc/ice_server_parsing_unittest.cc
+++ b/pc/ice_server_parsing_unittest.cc
@@ -19,7 +19,7 @@
 
 namespace webrtc {
 
-class IceServerParsingTest : public testing::Test {
+class IceServerParsingTest : public ::testing::Test {
  public:
   // Convenience functions for parsing a single URL. Result is stored in
   // |stun_servers_| and |turn_servers_|.
diff --git a/pc/ice_transport_unittest.cc b/pc/ice_transport_unittest.cc
index 8d668de..62d7953 100644
--- a/pc/ice_transport_unittest.cc
+++ b/pc/ice_transport_unittest.cc
@@ -24,7 +24,7 @@
 
 namespace webrtc {
 
-class IceTransportTest : public testing::Test {};
+class IceTransportTest : public ::testing::Test {};
 
 TEST_F(IceTransportTest, CreateNonSelfDeletingTransport) {
   auto cricket_transport =
diff --git a/pc/jsep_session_description_unittest.cc b/pc/jsep_session_description_unittest.cc
index 6ac1a00..674b6e7 100644
--- a/pc/jsep_session_description_unittest.cc
+++ b/pc/jsep_session_description_unittest.cc
@@ -82,7 +82,7 @@
   return desc;
 }
 
-class JsepSessionDescriptionTest : public testing::Test {
+class JsepSessionDescriptionTest : public ::testing::Test {
  protected:
   virtual void SetUp() {
     int port = 1234;
diff --git a/pc/jsep_transport_controller_unittest.cc b/pc/jsep_transport_controller_unittest.cc
index 64da95b..b18f85a 100644
--- a/pc/jsep_transport_controller_unittest.cc
+++ b/pc/jsep_transport_controller_unittest.cc
@@ -78,7 +78,7 @@
 };
 
 class JsepTransportControllerTest : public JsepTransportController::Observer,
-                                    public testing::Test,
+                                    public ::testing::Test,
                                     public sigslot::has_slots<> {
  public:
   JsepTransportControllerTest() : signaling_thread_(rtc::Thread::Current()) {
diff --git a/pc/jsep_transport_unittest.cc b/pc/jsep_transport_unittest.cc
index 9ed079b..ac17d6f 100644
--- a/pc/jsep_transport_unittest.cc
+++ b/pc/jsep_transport_unittest.cc
@@ -40,7 +40,7 @@
   SdpType remote_type;
 };
 
-class JsepTransport2Test : public testing::Test, public sigslot::has_slots<> {
+class JsepTransport2Test : public ::testing::Test, public sigslot::has_slots<> {
  protected:
   std::unique_ptr<webrtc::SrtpTransport> CreateSdesTransport(
       rtc::PacketTransportInternal* rtp_packet_transport,
@@ -156,7 +156,7 @@
 // The parameterized tests cover both cases when RTCP mux is enable and
 // disabled.
 class JsepTransport2WithRtcpMux : public JsepTransport2Test,
-                                  public testing::WithParamInterface<bool> {};
+                                  public ::testing::WithParamInterface<bool> {};
 
 // This test verifies the ICE parameters are properly applied to the transports.
 TEST_P(JsepTransport2WithRtcpMux, SetIceParameters) {
@@ -640,7 +640,7 @@
 
 INSTANTIATE_TEST_SUITE_P(JsepTransport2Test,
                          JsepTransport2WithRtcpMux,
-                         testing::Bool());
+                         ::testing::Bool());
 
 // Test that a reoffer in the opposite direction is successful as long as the
 // role isn't changing. Doesn't test every possible combination like the test
diff --git a/pc/media_session_unittest.cc b/pc/media_session_unittest.cc
index 7c0a7de..efd2318 100644
--- a/pc/media_session_unittest.cc
+++ b/pc/media_session_unittest.cc
@@ -82,17 +82,17 @@
 using rtc::CS_AES_CM_128_HMAC_SHA1_32;
 using rtc::CS_AES_CM_128_HMAC_SHA1_80;
 using rtc::UniqueRandomIdGenerator;
-using testing::Contains;
-using testing::Each;
-using testing::ElementsAreArray;
-using testing::Eq;
-using testing::Field;
-using testing::IsEmpty;
-using testing::IsFalse;
-using testing::Ne;
-using testing::Not;
-using testing::Pointwise;
-using testing::SizeIs;
+using ::testing::Contains;
+using ::testing::Each;
+using ::testing::ElementsAreArray;
+using ::testing::Eq;
+using ::testing::Field;
+using ::testing::IsEmpty;
+using ::testing::IsFalse;
+using ::testing::Ne;
+using ::testing::Not;
+using ::testing::Pointwise;
+using ::testing::SizeIs;
 using webrtc::RtpExtension;
 using webrtc::RtpTransceiverDirection;
 
@@ -405,7 +405,7 @@
 // was designed for Plan B SDP, where only one audio "m=" section and one video
 // "m=" section could be generated, and ordering couldn't be controlled. Many of
 // these tests may be obsolete as a result, and should be refactored or removed.
-class MediaSessionDescriptionFactoryTest : public testing::Test {
+class MediaSessionDescriptionFactoryTest : public ::testing::Test {
  public:
   MediaSessionDescriptionFactoryTest()
       : f1_(&tdf1_, &ssrc_generator1), f2_(&tdf2_, &ssrc_generator2) {
diff --git a/pc/media_stream_unittest.cc b/pc/media_stream_unittest.cc
index 4b25e78..b49481e 100644
--- a/pc/media_stream_unittest.cc
+++ b/pc/media_stream_unittest.cc
@@ -50,7 +50,7 @@
   NotifierInterface* notifier_;
 };
 
-class MediaStreamTest : public testing::Test {
+class MediaStreamTest : public ::testing::Test {
  protected:
   virtual void SetUp() {
     stream_ = MediaStream::Create(kStreamId1);
diff --git a/pc/peer_connection_end_to_end_unittest.cc b/pc/peer_connection_end_to_end_unittest.cc
index a303199..4cd59c8 100644
--- a/pc/peer_connection_end_to_end_unittest.cc
+++ b/pc/peer_connection_end_to_end_unittest.cc
@@ -33,11 +33,11 @@
 #include "test/mock_audio_decoder_factory.h"
 #include "test/mock_audio_encoder_factory.h"
 
-using testing::AtLeast;
-using testing::Invoke;
-using testing::StrictMock;
-using testing::Values;
-using testing::_;
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::Invoke;
+using ::testing::StrictMock;
+using ::testing::Values;
 
 using webrtc::DataChannelInterface;
 using webrtc::MediaStreamInterface;
@@ -51,7 +51,7 @@
 }  // namespace
 
 class PeerConnectionEndToEndBaseTest : public sigslot::has_slots<>,
-                                       public testing::Test {
+                                       public ::testing::Test {
  public:
   typedef std::vector<rtc::scoped_refptr<DataChannelInterface>> DataChannelList;
 
diff --git a/pc/peer_connection_factory_unittest.cc b/pc/peer_connection_factory_unittest.cc
index 41a5408..a19e430 100644
--- a/pc/peer_connection_factory_unittest.cc
+++ b/pc/peer_connection_factory_unittest.cc
@@ -98,7 +98,7 @@
 
 }  // namespace
 
-class PeerConnectionFactoryTest : public testing::Test {
+class PeerConnectionFactoryTest : public ::testing::Test {
   void SetUp() {
 #ifdef WEBRTC_ANDROID
     webrtc::InitializeAndroidObjects();
diff --git a/pc/peer_connection_ice_unittest.cc b/pc/peer_connection_ice_unittest.cc
index 807a8e1..03c1128 100644
--- a/pc/peer_connection_ice_unittest.cc
+++ b/pc/peer_connection_ice_unittest.cc
@@ -975,7 +975,7 @@
                          Values(SdpSemantics::kPlanB,
                                 SdpSemantics::kUnifiedPlan));
 
-class PeerConnectionIceConfigTest : public testing::Test {
+class PeerConnectionIceConfigTest : public ::testing::Test {
  protected:
   void SetUp() override {
     pc_factory_ = CreatePeerConnectionFactory(
diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc
index 58c3439..8aa7675 100644
--- a/pc/peer_connection_integrationtest.cc
+++ b/pc/peer_connection_integrationtest.cc
@@ -1123,7 +1123,7 @@
 // virtual network, fake A/V capture and fake encoder/decoders. The
 // PeerConnections share the threads/socket servers, but use separate versions
 // of everything else (including "PeerConnectionFactory"s).
-class PeerConnectionIntegrationBaseTest : public testing::Test {
+class PeerConnectionIntegrationBaseTest : public ::testing::Test {
  public:
   explicit PeerConnectionIntegrationBaseTest(SdpSemantics sdp_semantics)
       : sdp_semantics_(sdp_semantics),
@@ -4841,8 +4841,8 @@
   ConnectFakeSignaling();
 
   auto output = absl::make_unique<testing::NiceMock<MockRtcEventLogOutput>>();
-  ON_CALL(*output, IsActive()).WillByDefault(testing::Return(true));
-  ON_CALL(*output, Write(::testing::_)).WillByDefault(testing::Return(true));
+  ON_CALL(*output, IsActive()).WillByDefault(::testing::Return(true));
+  ON_CALL(*output, Write(::testing::_)).WillByDefault(::testing::Return(true));
   EXPECT_CALL(*output, Write(::testing::_)).Times(::testing::AtLeast(1));
   EXPECT_TRUE(caller()->pc()->StartRtcEventLog(
       std::move(output), webrtc::RtcEventLog::kImmediateOutput));
diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc
index edede25..21f6a05 100644
--- a/pc/peer_connection_interface_unittest.cc
+++ b/pc/peer_connection_interface_unittest.cc
@@ -667,7 +667,7 @@
 };
 
 // TODO(steveanton): Convert to use the new PeerConnectionWrapper.
-class PeerConnectionInterfaceBaseTest : public testing::Test {
+class PeerConnectionInterfaceBaseTest : public ::testing::Test {
  protected:
   explicit PeerConnectionInterfaceBaseTest(SdpSemantics sdp_semantics)
       : vss_(new rtc::VirtualSocketServer()),
@@ -3959,7 +3959,7 @@
                          Values(SdpSemantics::kPlanB,
                                 SdpSemantics::kUnifiedPlan));
 
-class PeerConnectionMediaConfigTest : public testing::Test {
+class PeerConnectionMediaConfigTest : public ::testing::Test {
  protected:
   void SetUp() override {
     pcf_ = PeerConnectionFactoryForTest::CreatePeerConnectionFactoryForTest();
diff --git a/pc/peer_connection_jsep_unittest.cc b/pc/peer_connection_jsep_unittest.cc
index 868ff67..26d702b 100644
--- a/pc/peer_connection_jsep_unittest.cc
+++ b/pc/peer_connection_jsep_unittest.cc
@@ -710,7 +710,7 @@
 // - The new transceiver is associated with the new MID value.
 class RecycleMediaSectionTest
     : public PeerConnectionJsepTest,
-      public testing::WithParamInterface<
+      public ::testing::WithParamInterface<
           std::tuple<cricket::MediaType, cricket::MediaType>> {
  protected:
   RecycleMediaSectionTest() {
diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc
index 48c14e3..c03bab4 100644
--- a/pc/peer_connection_rtp_unittest.cc
+++ b/pc/peer_connection_rtp_unittest.cc
@@ -87,7 +87,7 @@
   MethodFunctor on_success_;
 };
 
-class PeerConnectionRtpBaseTest : public testing::Test {
+class PeerConnectionRtpBaseTest : public ::testing::Test {
  public:
   explicit PeerConnectionRtpBaseTest(SdpSemantics sdp_semantics)
       : sdp_semantics_(sdp_semantics),
diff --git a/pc/peer_connection_simulcast_unittest.cc b/pc/peer_connection_simulcast_unittest.cc
index 3efc6cb..5eaa501 100644
--- a/pc/peer_connection_simulcast_unittest.cc
+++ b/pc/peer_connection_simulcast_unittest.cc
@@ -87,7 +87,7 @@
 }  // namespace
 namespace webrtc {
 
-class PeerConnectionSimulcastTests : public testing::Test {
+class PeerConnectionSimulcastTests : public ::testing::Test {
  public:
   PeerConnectionSimulcastTests()
       : pc_factory_(
diff --git a/pc/playout_latency_unittest.cc b/pc/playout_latency_unittest.cc
index c991254..db139f4 100644
--- a/pc/playout_latency_unittest.cc
+++ b/pc/playout_latency_unittest.cc
@@ -27,7 +27,7 @@
 
 namespace webrtc {
 
-class PlayoutLatencyTest : public testing::Test {
+class PlayoutLatencyTest : public ::testing::Test {
  public:
   PlayoutLatencyTest()
       : latency_(
diff --git a/pc/proxy_unittest.cc b/pc/proxy_unittest.cc
index f9b7063..a00b47f 100644
--- a/pc/proxy_unittest.cc
+++ b/pc/proxy_unittest.cc
@@ -87,7 +87,7 @@
 END_PROXY_MAP()
 #undef FakeProxy
 
-class SignalingProxyTest : public testing::Test {
+class SignalingProxyTest : public ::testing::Test {
  public:
   // Checks that the functions are called on the right thread.
   void CheckSignalingThread() { EXPECT_TRUE(signaling_thread_->IsCurrent()); }
@@ -173,7 +173,7 @@
   EXPECT_EQ("Method2", fake_signaling_proxy_->Method2(arg1, arg2));
 }
 
-class ProxyTest : public testing::Test {
+class ProxyTest : public ::testing::Test {
  public:
   // Checks that the functions are called on the right thread.
   void CheckSignalingThread() { EXPECT_TRUE(signaling_thread_->IsCurrent()); }
@@ -274,7 +274,7 @@
 PROXY_METHOD0(void, Bar)
 END_PROXY_MAP()
 
-class OwnedProxyTest : public testing::Test {
+class OwnedProxyTest : public ::testing::Test {
  public:
   OwnedProxyTest()
       : signaling_thread_(rtc::Thread::Create()),
diff --git a/pc/rtc_stats_collector_unittest.cc b/pc/rtc_stats_collector_unittest.cc
index 5b0d164..7e843a6 100644
--- a/pc/rtc_stats_collector_unittest.cc
+++ b/pc/rtc_stats_collector_unittest.cc
@@ -38,9 +38,9 @@
 #include "rtc_base/logging.h"
 #include "rtc_base/time_utils.h"
 
-using testing::AtLeast;
-using testing::Invoke;
-using testing::Return;
+using ::testing::AtLeast;
+using ::testing::Invoke;
+using ::testing::Return;
 
 namespace webrtc {
 
@@ -496,7 +496,7 @@
   rtc::scoped_refptr<RTCStatsCollector> stats_collector_;
 };
 
-class RTCStatsCollectorTest : public testing::Test {
+class RTCStatsCollectorTest : public ::testing::Test {
  public:
   RTCStatsCollectorTest()
       : pc_(new rtc::RefCountedObject<FakePeerConnectionForStats>()),
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index 174e78e..6935769 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -103,7 +103,7 @@
 RTCStatsReportTraceListener* RTCStatsReportTraceListener::traced_report_ =
     nullptr;
 
-class RTCStatsIntegrationTest : public testing::Test {
+class RTCStatsIntegrationTest : public ::testing::Test {
  public:
   RTCStatsIntegrationTest()
       : network_thread_(new rtc::Thread(&virtual_socket_server_)),
diff --git a/pc/rtc_stats_traversal_unittest.cc b/pc/rtc_stats_traversal_unittest.cc
index c08d293..c7d0971 100644
--- a/pc/rtc_stats_traversal_unittest.cc
+++ b/pc/rtc_stats_traversal_unittest.cc
@@ -22,7 +22,7 @@
 
 namespace webrtc {
 
-class RTCStatsTraversalTest : public testing::Test {
+class RTCStatsTraversalTest : public ::testing::Test {
  public:
   RTCStatsTraversalTest() {
     transport_ = new RTCTransportStats("transport", 0);
diff --git a/pc/rtp_sender_receiver_unittest.cc b/pc/rtp_sender_receiver_unittest.cc
index e6d0083..38f414c 100644
--- a/pc/rtp_sender_receiver_unittest.cc
+++ b/pc/rtp_sender_receiver_unittest.cc
@@ -87,8 +87,8 @@
 namespace webrtc {
 
 class RtpSenderReceiverTest
-    : public testing::Test,
-      public testing::WithParamInterface<std::pair<RidList, RidList>>,
+    : public ::testing::Test,
+      public ::testing::WithParamInterface<std::pair<RidList, RidList>>,
       public sigslot::has_slots<> {
  public:
   RtpSenderReceiverTest()
diff --git a/pc/sctp_transport_unittest.cc b/pc/sctp_transport_unittest.cc
index e2bdf44..3771b2c 100644
--- a/pc/sctp_transport_unittest.cc
+++ b/pc/sctp_transport_unittest.cc
@@ -76,7 +76,7 @@
   std::vector<SctpTransportState> states_;
 };
 
-class SctpTransportTest : public testing::Test {
+class SctpTransportTest : public ::testing::Test {
  public:
   SctpTransport* transport() { return transport_.get(); }
   SctpTransportObserverInterface* observer() { return &observer_; }
diff --git a/pc/sctp_utils_unittest.cc b/pc/sctp_utils_unittest.cc
index 01f5434..70c6277 100644
--- a/pc/sctp_utils_unittest.cc
+++ b/pc/sctp_utils_unittest.cc
@@ -16,7 +16,7 @@
 #include "rtc_base/copy_on_write_buffer.h"
 #include "test/gtest.h"
 
-class SctpUtilsTest : public testing::Test {
+class SctpUtilsTest : public ::testing::Test {
  public:
   void VerifyOpenMessageFormat(const rtc::CopyOnWriteBuffer& packet,
                                const std::string& label,
diff --git a/pc/srtp_filter_unittest.cc b/pc/srtp_filter_unittest.cc
index d7368d1..7964002 100644
--- a/pc/srtp_filter_unittest.cc
+++ b/pc/srtp_filter_unittest.cc
@@ -62,7 +62,7 @@
                                                          kTestKeyParamsGcm4,
                                                          "");
 
-class SrtpFilterTest : public testing::Test {
+class SrtpFilterTest : public ::testing::Test {
  protected:
   SrtpFilterTest() {}
   static std::vector<CryptoParams> MakeVector(const CryptoParams& params) {
diff --git a/pc/srtp_session_unittest.cc b/pc/srtp_session_unittest.cc
index 8ca5997..8feceb4 100644
--- a/pc/srtp_session_unittest.cc
+++ b/pc/srtp_session_unittest.cc
@@ -29,7 +29,7 @@
 
 std::vector<int> kEncryptedHeaderExtensionIds;
 
-class SrtpSessionTest : public testing::Test {
+class SrtpSessionTest : public ::testing::Test {
  public:
   SrtpSessionTest() { webrtc::metrics::Reset(); }
 
diff --git a/pc/srtp_transport_unittest.cc b/pc/srtp_transport_unittest.cc
index f3fab89..a12d2c5 100644
--- a/pc/srtp_transport_unittest.cc
+++ b/pc/srtp_transport_unittest.cc
@@ -42,7 +42,7 @@
     "rqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA";
 static const int kTestKeyGcm256Len = 44;  // 256 bits key + 96 bits salt.
 
-class SrtpTransportTest : public testing::Test, public sigslot::has_slots<> {
+class SrtpTransportTest : public ::testing::Test, public sigslot::has_slots<> {
  protected:
   SrtpTransportTest() {
     bool rtcp_mux_enabled = true;
@@ -336,7 +336,7 @@
 
 class SrtpTransportTestWithExternalAuth
     : public SrtpTransportTest,
-      public testing::WithParamInterface<bool> {};
+      public ::testing::WithParamInterface<bool> {};
 
 TEST_P(SrtpTransportTestWithExternalAuth,
        SendAndRecvPacket_AES_CM_128_HMAC_SHA1_80) {
diff --git a/pc/stats_collector_unittest.cc b/pc/stats_collector_unittest.cc
index 7ebac7f..3118ef9 100644
--- a/pc/stats_collector_unittest.cc
+++ b/pc/stats_collector_unittest.cc
@@ -590,7 +590,7 @@
   double time_now_;
 };
 
-class StatsCollectorTest : public testing::Test {
+class StatsCollectorTest : public ::testing::Test {
  protected:
   rtc::scoped_refptr<FakePeerConnectionForStats> CreatePeerConnection() {
     return new rtc::RefCountedObject<FakePeerConnectionForStats>();
diff --git a/pc/test/fake_audio_capture_module_unittest.cc b/pc/test/fake_audio_capture_module_unittest.cc
index 0130af1..c8be683 100644
--- a/pc/test/fake_audio_capture_module_unittest.cc
+++ b/pc/test/fake_audio_capture_module_unittest.cc
@@ -18,7 +18,7 @@
 #include "rtc_base/gunit.h"
 #include "test/gtest.h"
 
-class FakeAdmTest : public testing::Test, public webrtc::AudioTransport {
+class FakeAdmTest : public ::testing::Test, public webrtc::AudioTransport {
  protected:
   static const int kMsInSecond = 1000;
 
diff --git a/pc/test/mock_data_channel.h b/pc/test/mock_data_channel.h
index 2db0c36..3385ec2 100644
--- a/pc/test/mock_data_channel.h
+++ b/pc/test/mock_data_channel.h
@@ -31,17 +31,17 @@
                   uint32_t messages_received,
                   uint64_t bytes_received)
       : rtc::RefCountedObject<DataChannel>(nullptr, cricket::DCT_NONE, label) {
-    EXPECT_CALL(*this, id()).WillRepeatedly(testing::Return(id));
-    EXPECT_CALL(*this, state()).WillRepeatedly(testing::Return(state));
-    EXPECT_CALL(*this, protocol()).WillRepeatedly(testing::Return(protocol));
+    EXPECT_CALL(*this, id()).WillRepeatedly(::testing::Return(id));
+    EXPECT_CALL(*this, state()).WillRepeatedly(::testing::Return(state));
+    EXPECT_CALL(*this, protocol()).WillRepeatedly(::testing::Return(protocol));
     EXPECT_CALL(*this, messages_sent())
-        .WillRepeatedly(testing::Return(messages_sent));
+        .WillRepeatedly(::testing::Return(messages_sent));
     EXPECT_CALL(*this, bytes_sent())
-        .WillRepeatedly(testing::Return(bytes_sent));
+        .WillRepeatedly(::testing::Return(bytes_sent));
     EXPECT_CALL(*this, messages_received())
-        .WillRepeatedly(testing::Return(messages_received));
+        .WillRepeatedly(::testing::Return(messages_received));
     EXPECT_CALL(*this, bytes_received())
-        .WillRepeatedly(testing::Return(bytes_received));
+        .WillRepeatedly(::testing::Return(bytes_received));
   }
   MOCK_CONST_METHOD0(id, int());
   MOCK_CONST_METHOD0(state, DataState());
diff --git a/pc/track_media_info_map_unittest.cc b/pc/track_media_info_map_unittest.cc
index 9edd60e..3b0022c 100644
--- a/pc/track_media_info_map_unittest.cc
+++ b/pc/track_media_info_map_unittest.cc
@@ -55,13 +55,13 @@
   rtc::scoped_refptr<MockRtpSenderInternal> sender(
       new rtc::RefCountedObject<MockRtpSenderInternal>());
   EXPECT_CALL(*sender, track())
-      .WillRepeatedly(testing::Return(std::move(track)));
-  EXPECT_CALL(*sender, ssrc()).WillRepeatedly(testing::Return(first_ssrc));
+      .WillRepeatedly(::testing::Return(std::move(track)));
+  EXPECT_CALL(*sender, ssrc()).WillRepeatedly(::testing::Return(first_ssrc));
   EXPECT_CALL(*sender, media_type())
-      .WillRepeatedly(testing::Return(media_type));
+      .WillRepeatedly(::testing::Return(media_type));
   EXPECT_CALL(*sender, GetParameters())
-      .WillRepeatedly(testing::Return(CreateRtpParametersWithSsrcs(ssrcs)));
-  EXPECT_CALL(*sender, AttachmentId()).WillRepeatedly(testing::Return(1));
+      .WillRepeatedly(::testing::Return(CreateRtpParametersWithSsrcs(ssrcs)));
+  EXPECT_CALL(*sender, AttachmentId()).WillRepeatedly(::testing::Return(1));
   return sender;
 }
 
@@ -72,16 +72,16 @@
   rtc::scoped_refptr<MockRtpReceiverInternal> receiver(
       new rtc::RefCountedObject<MockRtpReceiverInternal>());
   EXPECT_CALL(*receiver, track())
-      .WillRepeatedly(testing::Return(std::move(track)));
+      .WillRepeatedly(::testing::Return(std::move(track)));
   EXPECT_CALL(*receiver, media_type())
-      .WillRepeatedly(testing::Return(media_type));
+      .WillRepeatedly(::testing::Return(media_type));
   EXPECT_CALL(*receiver, GetParameters())
-      .WillRepeatedly(testing::Return(CreateRtpParametersWithSsrcs(ssrcs)));
-  EXPECT_CALL(*receiver, AttachmentId()).WillRepeatedly(testing::Return(1));
+      .WillRepeatedly(::testing::Return(CreateRtpParametersWithSsrcs(ssrcs)));
+  EXPECT_CALL(*receiver, AttachmentId()).WillRepeatedly(::testing::Return(1));
   return receiver;
 }
 
-class TrackMediaInfoMapTest : public testing::Test {
+class TrackMediaInfoMapTest : public ::testing::Test {
  public:
   TrackMediaInfoMapTest()
       : voice_media_info_(new cricket::VoiceMediaInfo()),
diff --git a/pc/video_track_unittest.cc b/pc/video_track_unittest.cc
index c9f9bcb..fc05f66 100644
--- a/pc/video_track_unittest.cc
+++ b/pc/video_track_unittest.cc
@@ -27,7 +27,7 @@
 using webrtc::VideoTrackInterface;
 using webrtc::VideoTrackSource;
 
-class VideoTrackTest : public testing::Test {
+class VideoTrackTest : public ::testing::Test {
  public:
   VideoTrackTest() : frame_source_(640, 480, rtc::kNumMicrosecsPerSec / 30) {
     static const char kVideoTrackId[] = "track_id";
diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc
index 6b38689..a700a5a 100644
--- a/pc/webrtc_sdp_unittest.cc
+++ b/pc/webrtc_sdp_unittest.cc
@@ -998,7 +998,7 @@
 
 // WebRtcSdpTest
 
-class WebRtcSdpTest : public testing::Test {
+class WebRtcSdpTest : public ::testing::Test {
  public:
   WebRtcSdpTest() : jdesc_(kDummyType) {
 #ifdef WEBRTC_ANDROID
@@ -2989,7 +2989,7 @@
 }
 
 class WebRtcSdpExtmapTest : public WebRtcSdpTest,
-                            public testing::WithParamInterface<bool> {};
+                            public ::testing::WithParamInterface<bool> {};
 
 TEST_P(WebRtcSdpExtmapTest,
        DeserializeSessionDescriptionWithSessionLevelExtmap) {
diff --git a/rtc_base/async_tcp_socket_unittest.cc b/rtc_base/async_tcp_socket_unittest.cc
index 69b5392..4fa9d92 100644
--- a/rtc_base/async_tcp_socket_unittest.cc
+++ b/rtc_base/async_tcp_socket_unittest.cc
@@ -17,7 +17,7 @@
 
 namespace rtc {
 
-class AsyncTCPSocketTest : public testing::Test, public sigslot::has_slots<> {
+class AsyncTCPSocketTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   AsyncTCPSocketTest()
       : vss_(new rtc::VirtualSocketServer()),
diff --git a/rtc_base/async_udp_socket_unittest.cc b/rtc_base/async_udp_socket_unittest.cc
index 0484c3a..7ef7c86 100644
--- a/rtc_base/async_udp_socket_unittest.cc
+++ b/rtc_base/async_udp_socket_unittest.cc
@@ -18,7 +18,7 @@
 
 namespace rtc {
 
-class AsyncUdpSocketTest : public testing::Test, public sigslot::has_slots<> {
+class AsyncUdpSocketTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   AsyncUdpSocketTest()
       : pss_(new rtc::PhysicalSocketServer),
diff --git a/rtc_base/helpers_unittest.cc b/rtc_base/helpers_unittest.cc
index 1feb9de..8d8f900 100644
--- a/rtc_base/helpers_unittest.cc
+++ b/rtc_base/helpers_unittest.cc
@@ -17,7 +17,7 @@
 
 namespace rtc {
 
-class RandomTest : public testing::Test {};
+class RandomTest : public ::testing::Test {};
 
 TEST_F(RandomTest, TestCreateRandomId) {
   CreateRandomId();
diff --git a/rtc_base/message_queue_unittest.cc b/rtc_base/message_queue_unittest.cc
index 657949c..b7c32e3 100644
--- a/rtc_base/message_queue_unittest.cc
+++ b/rtc_base/message_queue_unittest.cc
@@ -26,7 +26,7 @@
 namespace rtc {
 namespace {
 
-class MessageQueueTest : public testing::Test, public MessageQueue {
+class MessageQueueTest : public ::testing::Test, public MessageQueue {
  public:
   MessageQueueTest() : MessageQueue(SocketServer::CreateDefault(), true) {}
   bool IsLocked_Worker() {
diff --git a/rtc_base/nat_unittest.cc b/rtc_base/nat_unittest.cc
index 7a0761e..79f6ea2 100644
--- a/rtc_base/nat_unittest.cc
+++ b/rtc_base/nat_unittest.cc
@@ -321,7 +321,7 @@
   }
 }
 
-class NatTcpTest : public testing::Test, public sigslot::has_slots<> {
+class NatTcpTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   NatTcpTest()
       : int_addr_("192.168.0.1", 0),
diff --git a/rtc_base/network_unittest.cc b/rtc_base/network_unittest.cc
index 08ffb6e..b35b9f4 100644
--- a/rtc_base/network_unittest.cc
+++ b/rtc_base/network_unittest.cc
@@ -81,7 +81,7 @@
 
 }  // namespace
 
-class NetworkTest : public testing::Test, public sigslot::has_slots<> {
+class NetworkTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   NetworkTest() : callback_called_(false) {}
 
diff --git a/rtc_base/null_socket_server_unittest.cc b/rtc_base/null_socket_server_unittest.cc
index 8268911..961ab6a 100644
--- a/rtc_base/null_socket_server_unittest.cc
+++ b/rtc_base/null_socket_server_unittest.cc
@@ -25,7 +25,7 @@
 
 static const uint32_t kTimeout = 5000U;
 
-class NullSocketServerTest : public testing::Test, public MessageHandler {
+class NullSocketServerTest : public ::testing::Test, public MessageHandler {
  protected:
   void OnMessage(Message* message) override { ss_.WakeUp(); }
 
diff --git a/rtc_base/numerics/sample_counter_unittest.cc b/rtc_base/numerics/sample_counter_unittest.cc
index e87c809..14b0573 100644
--- a/rtc_base/numerics/sample_counter_unittest.cc
+++ b/rtc_base/numerics/sample_counter_unittest.cc
@@ -15,7 +15,7 @@
 #include "test/gmock.h"
 #include "test/gtest.h"
 
-using testing::Eq;
+using ::testing::Eq;
 
 namespace rtc {
 
diff --git a/rtc_base/physical_socket_server_unittest.cc b/rtc_base/physical_socket_server_unittest.cc
index aed8bf3..611fb18 100644
--- a/rtc_base/physical_socket_server_unittest.cc
+++ b/rtc_base/physical_socket_server_unittest.cc
@@ -499,7 +499,7 @@
   server_->set_network_binder(nullptr);
 }
 
-class PosixSignalDeliveryTest : public testing::Test {
+class PosixSignalDeliveryTest : public ::testing::Test {
  public:
   static void RecordSignal(int signum) {
     signals_received_.push_back(signum);
diff --git a/rtc_base/proxy_unittest.cc b/rtc_base/proxy_unittest.cc
index 229891d..59d637a 100644
--- a/rtc_base/proxy_unittest.cc
+++ b/rtc_base/proxy_unittest.cc
@@ -25,7 +25,7 @@
 static const SocketAddress kBogusProxyIntAddr("1.2.3.4", 999);
 
 // Sets up a virtual socket server and a SOCKS5 proxy server.
-class ProxyTest : public testing::Test {
+class ProxyTest : public ::testing::Test {
  public:
   ProxyTest() : ss_(new rtc::VirtualSocketServer()), thread_(ss_.get()) {
     socks_.reset(new rtc::SocksProxyServer(ss_.get(), kSocksProxyIntAddr,
diff --git a/rtc_base/rtc_certificate_generator_unittest.cc b/rtc_base/rtc_certificate_generator_unittest.cc
index 69c8597..959e65a 100644
--- a/rtc_base/rtc_certificate_generator_unittest.cc
+++ b/rtc_base/rtc_certificate_generator_unittest.cc
@@ -67,7 +67,7 @@
   bool generate_async_completed_;
 };
 
-class RTCCertificateGeneratorTest : public testing::Test {
+class RTCCertificateGeneratorTest : public ::testing::Test {
  public:
   RTCCertificateGeneratorTest()
       : fixture_(new RefCountedObject<RTCCertificateGeneratorFixture>()) {}
diff --git a/rtc_base/rtc_certificate_unittest.cc b/rtc_base/rtc_certificate_unittest.cc
index ab242bb..62e9e2c 100644
--- a/rtc_base/rtc_certificate_unittest.cc
+++ b/rtc_base/rtc_certificate_unittest.cc
@@ -27,7 +27,7 @@
 
 }  // namespace
 
-class RTCCertificateTest : public testing::Test {
+class RTCCertificateTest : public ::testing::Test {
  protected:
   scoped_refptr<RTCCertificate> GenerateECDSA() {
     std::unique_ptr<SSLIdentity> identity(
diff --git a/rtc_base/signal_thread_unittest.cc b/rtc_base/signal_thread_unittest.cc
index 2bc0dda..c333ff7 100644
--- a/rtc_base/signal_thread_unittest.cc
+++ b/rtc_base/signal_thread_unittest.cc
@@ -23,7 +23,7 @@
 // 10 seconds.
 static const int kTimeout = 10000;
 
-class SignalThreadTest : public testing::Test, public sigslot::has_slots<> {
+class SignalThreadTest : public ::testing::Test, public sigslot::has_slots<> {
  public:
   class SlowSignalThread : public SignalThread {
    public:
diff --git a/rtc_base/sigslot_unittest.cc b/rtc_base/sigslot_unittest.cc
index 8edab7c..317cd62 100644
--- a/rtc_base/sigslot_unittest.cc
+++ b/rtc_base/sigslot_unittest.cc
@@ -24,7 +24,7 @@
   return true;
 }
 
-class SigslotDefault : public testing::Test, public sigslot::has_slots<> {
+class SigslotDefault : public ::testing::Test, public sigslot::has_slots<> {
  protected:
   sigslot::signal0<> signal_;
 };
@@ -64,7 +64,7 @@
 
 template <class slot_policy = sigslot::single_threaded,
           class mt_signal_policy = sigslot::multi_threaded_local>
-class SigslotSlotTest : public testing::Test {
+class SigslotSlotTest : public ::testing::Test {
  protected:
   SigslotSlotTest() {
     mt_signal_policy mt_policy;
diff --git a/rtc_base/socket_unittest.h b/rtc_base/socket_unittest.h
index db226c4..5197ccd 100644
--- a/rtc_base/socket_unittest.h
+++ b/rtc_base/socket_unittest.h
@@ -19,7 +19,7 @@
 // Generic socket tests, to be used when testing individual socketservers.
 // Derive your specific test class from SocketTest, install your
 // socketserver, and call the SocketTest test methods.
-class SocketTest : public testing::Test {
+class SocketTest : public ::testing::Test {
  protected:
   SocketTest()
       : kIPv4Loopback(INADDR_LOOPBACK),
diff --git a/rtc_base/ssl_adapter_unittest.cc b/rtc_base/ssl_adapter_unittest.cc
index b459496..d723bf1 100644
--- a/rtc_base/ssl_adapter_unittest.cc
+++ b/rtc_base/ssl_adapter_unittest.cc
@@ -293,7 +293,7 @@
   std::string data_;
 };
 
-class SSLAdapterTestBase : public testing::Test, public sigslot::has_slots<> {
+class SSLAdapterTestBase : public ::testing::Test, public sigslot::has_slots<> {
  public:
   explicit SSLAdapterTestBase(const rtc::SSLMode& ssl_mode,
                               const rtc::KeyParams& key_params)
diff --git a/rtc_base/ssl_identity_unittest.cc b/rtc_base/ssl_identity_unittest.cc
index 748041e..8e4d02d 100644
--- a/rtc_base/ssl_identity_unittest.cc
+++ b/rtc_base/ssl_identity_unittest.cc
@@ -191,7 +191,7 @@
   return info;
 }
 
-class SSLIdentityTest : public testing::Test {
+class SSLIdentityTest : public ::testing::Test {
  public:
   void SetUp() override {
     identity_rsa1_.reset(SSLIdentity::Generate("test1", rtc::KT_RSA));
@@ -476,7 +476,7 @@
   }
 }
 
-class SSLIdentityExpirationTest : public testing::Test {
+class SSLIdentityExpirationTest : public ::testing::Test {
  public:
   SSLIdentityExpirationTest() {
     // Set use of the test RNG to get deterministic expiration timestamp.
diff --git a/rtc_base/ssl_stream_adapter_unittest.cc b/rtc_base/ssl_stream_adapter_unittest.cc
index 7319c01..d9cfe1b 100644
--- a/rtc_base/ssl_stream_adapter_unittest.cc
+++ b/rtc_base/ssl_stream_adapter_unittest.cc
@@ -277,7 +277,7 @@
 static const int kBufferCapacity = 1;
 static const size_t kDefaultBufferSize = 2048;
 
-class SSLStreamAdapterTestBase : public testing::Test,
+class SSLStreamAdapterTestBase : public ::testing::Test,
                                  public sigslot::has_slots<> {
  public:
   SSLStreamAdapterTestBase(
diff --git a/rtc_base/string_encode_unittest.cc b/rtc_base/string_encode_unittest.cc
index cc72e43..d4fe2c5 100644
--- a/rtc_base/string_encode_unittest.cc
+++ b/rtc_base/string_encode_unittest.cc
@@ -17,7 +17,7 @@
 
 namespace rtc {
 
-class HexEncodeTest : public testing::Test {
+class HexEncodeTest : public ::testing::Test {
  public:
   HexEncodeTest() : enc_res_(0), dec_res_(0) {
     for (size_t i = 0; i < sizeof(data_); ++i) {
diff --git a/rtc_base/strings/string_builder_unittest.cc b/rtc_base/strings/string_builder_unittest.cc
index 6d8b9f2..84717ad 100644
--- a/rtc_base/strings/string_builder_unittest.cc
+++ b/rtc_base/strings/string_builder_unittest.cc
@@ -67,7 +67,7 @@
   EXPECT_DEATH(sb << msg, "");
 #else
   sb << msg;
-  EXPECT_THAT(sb.str(), testing::StrEq("Thi"));
+  EXPECT_THAT(sb.str(), ::testing::StrEq("Thi"));
 #endif
 }
 
@@ -80,7 +80,7 @@
   EXPECT_DEATH(sb << msg, "");
 #else
   sb << msg;
-  EXPECT_THAT(sb.str(), testing::StrEq("12A"));
+  EXPECT_THAT(sb.str(), ::testing::StrEq("12A"));
 #endif
 }
 
@@ -96,7 +96,7 @@
   // the append has no effect or that it's truncated at the point where the
   // buffer ends.
   EXPECT_THAT(sb.str(),
-              testing::AnyOf(testing::StrEq(""), testing::StrEq("-12")));
+              ::testing::AnyOf(::testing::StrEq(""), ::testing::StrEq("-12")));
 #endif
 }
 
@@ -109,7 +109,7 @@
 #else
   sb << num;
   EXPECT_THAT(sb.str(),
-              testing::AnyOf(testing::StrEq(""), testing::StrEq("123.")));
+              ::testing::AnyOf(::testing::StrEq(""), ::testing::StrEq("123.")));
 #endif
 }
 
@@ -122,7 +122,7 @@
   EXPECT_DEATH(sb << msg, "");
 #else
   sb << msg;
-  EXPECT_THAT(sb.str(), testing::StrEq("123"));
+  EXPECT_THAT(sb.str(), ::testing::StrEq("123"));
 #endif
 }
 
@@ -135,7 +135,7 @@
   EXPECT_DEATH(sb << num, "");
 #else
   sb << num;
-  EXPECT_THAT(sb.str(), testing::StrEq("xyz"));
+  EXPECT_THAT(sb.str(), ::testing::StrEq("xyz"));
 #endif
 }
 
@@ -157,7 +157,7 @@
   sb << 1 << ":" << 2.1 << ":" << 2.2f << ":" << 78187493520ll << ":"
      << 78187493520ul;
   EXPECT_THAT(sb.str(),
-              testing::MatchesRegex("1:2.10*:2.20*:78187493520:78187493520"));
+              ::testing::MatchesRegex("1:2.10*:2.20*:78187493520:78187493520"));
 }
 
 TEST(StringBuilder, Format) {
diff --git a/rtc_base/synchronization/yield_policy_unittest.cc b/rtc_base/synchronization/yield_policy_unittest.cc
index d7e352b..1220808 100644
--- a/rtc_base/synchronization/yield_policy_unittest.cc
+++ b/rtc_base/synchronization/yield_policy_unittest.cc
@@ -23,7 +23,7 @@
 };
 }  // namespace
 TEST(YieldPolicyTest, HandlerReceivesYieldSignalWhenSet) {
-  testing::StrictMock<MockYieldHandler> handler;
+  ::testing::StrictMock<MockYieldHandler> handler;
   {
     Event event;
     EXPECT_CALL(handler, YieldExecution()).Times(1);
@@ -42,7 +42,7 @@
 TEST(YieldPolicyTest, IsThreadLocal) {
   Event events[3];
   std::thread other_thread([&]() {
-    testing::StrictMock<MockYieldHandler> local_handler;
+    ::testing::StrictMock<MockYieldHandler> local_handler;
     // The local handler is never called as we never Wait on this thread.
     EXPECT_CALL(local_handler, YieldExecution()).Times(0);
     ScopedYieldPolicy policy(&local_handler);
@@ -58,7 +58,7 @@
   events[1].Wait(Event::kForever);
 
   // We can set a policy that's active on this thread independently.
-  testing::StrictMock<MockYieldHandler> main_handler;
+  ::testing::StrictMock<MockYieldHandler> main_handler;
   EXPECT_CALL(main_handler, YieldExecution()).Times(1);
   ScopedYieldPolicy policy(&main_handler);
   events[2].Wait(Event::kForever);
diff --git a/rtc_base/thread_unittest.cc b/rtc_base/thread_unittest.cc
index 63edcf8..800f1b1 100644
--- a/rtc_base/thread_unittest.cc
+++ b/rtc_base/thread_unittest.cc
@@ -425,7 +425,7 @@
   delete thread2;
 }
 
-class AsyncInvokeTest : public testing::Test {
+class AsyncInvokeTest : public ::testing::Test {
  public:
   void IntCallback(int value) {
     EXPECT_EQ(expected_thread_, Thread::Current());
@@ -572,7 +572,7 @@
   EXPECT_TRUE(flag2.get());
 }
 
-class GuardedAsyncInvokeTest : public testing::Test {
+class GuardedAsyncInvokeTest : public ::testing::Test {
  public:
   void IntCallback(int value) {
     EXPECT_EQ(expected_thread_, Thread::Current());
diff --git a/rtc_base/time_utils_unittest.cc b/rtc_base/time_utils_unittest.cc
index b4cefb7..b736ad8 100644
--- a/rtc_base/time_utils_unittest.cc
+++ b/rtc_base/time_utils_unittest.cc
@@ -64,7 +64,7 @@
   EXPECT_EQ(-ts_diff, rtc::TimeDiff(ts_earlier, ts_later));
 }
 
-class TimestampWrapAroundHandlerTest : public testing::Test {
+class TimestampWrapAroundHandlerTest : public ::testing::Test {
  public:
   TimestampWrapAroundHandlerTest() {}
 
@@ -117,7 +117,7 @@
             wraparound_handler_.Unwrap(static_cast<uint32_t>(ts & 0xffffffff)));
 }
 
-class TmToSeconds : public testing::Test {
+class TmToSeconds : public ::testing::Test {
  public:
   TmToSeconds() {
     // Set use of the test RNG to get deterministic expiration timestamp.
diff --git a/rtc_base/unittest_main.cc b/rtc_base/unittest_main.cc
index def0104..fe3e9e4 100644
--- a/rtc_base/unittest_main.cc
+++ b/rtc_base/unittest_main.cc
@@ -74,7 +74,7 @@
 #endif  // WEBRTC_WIN
 
 int main(int argc, char* argv[]) {
-  testing::InitGoogleTest(&argc, argv);
+  ::testing::InitGoogleTest(&argc, argv);
   rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, false);
   if (FLAG_help) {
     rtc::FlagList::Print(nullptr, false);
diff --git a/rtc_base/virtual_socket_unittest.cc b/rtc_base/virtual_socket_unittest.cc
index ac0af08..94def0d 100644
--- a/rtc_base/virtual_socket_unittest.cc
+++ b/rtc_base/virtual_socket_unittest.cc
@@ -162,7 +162,7 @@
 };
 
 // Note: This test uses a fake clock in addition to a virtual network.
-class VirtualSocketServerTest : public testing::Test {
+class VirtualSocketServerTest : public ::testing::Test {
  public:
   VirtualSocketServerTest()
       : ss_(&fake_clock_),
diff --git a/rtc_base/win32_unittest.cc b/rtc_base/win32_unittest.cc
index 913aa01..0e2abaa 100644
--- a/rtc_base/win32_unittest.cc
+++ b/rtc_base/win32_unittest.cc
@@ -20,7 +20,7 @@
 
 namespace rtc {
 
-class Win32Test : public testing::Test {
+class Win32Test : public ::testing::Test {
  public:
   Win32Test() {}
 };
diff --git a/test/mock_audio_decoder_factory.h b/test/mock_audio_decoder_factory.h
index e38b1d2..cdf2919 100644
--- a/test/mock_audio_decoder_factory.h
+++ b/test/mock_audio_decoder_factory.h
@@ -43,9 +43,9 @@
   // example.
   static rtc::scoped_refptr<webrtc::MockAudioDecoderFactory>
   CreateUnusedFactory() {
-    using testing::_;
-    using testing::AnyNumber;
-    using testing::Return;
+    using ::testing::_;
+    using ::testing::AnyNumber;
+    using ::testing::Return;
 
     rtc::scoped_refptr<webrtc::MockAudioDecoderFactory> factory =
         new rtc::RefCountedObject<webrtc::MockAudioDecoderFactory>;
@@ -63,10 +63,10 @@
   // call, since it supports no codecs.
   static rtc::scoped_refptr<webrtc::MockAudioDecoderFactory>
   CreateEmptyFactory() {
-    using testing::_;
-    using testing::AnyNumber;
-    using testing::Return;
-    using testing::SetArgPointee;
+    using ::testing::_;
+    using ::testing::AnyNumber;
+    using ::testing::Return;
+    using ::testing::SetArgPointee;
 
     rtc::scoped_refptr<webrtc::MockAudioDecoderFactory> factory =
         new rtc::RefCountedObject<webrtc::MockAudioDecoderFactory>;
diff --git a/test/mock_audio_encoder_factory.h b/test/mock_audio_encoder_factory.h
index 373bbb6..3e774a3 100644
--- a/test/mock_audio_encoder_factory.h
+++ b/test/mock_audio_encoder_factory.h
@@ -21,7 +21,8 @@
 
 namespace webrtc {
 
-class MockAudioEncoderFactory : public testing::NiceMock<AudioEncoderFactory> {
+class MockAudioEncoderFactory
+    : public ::testing::NiceMock<AudioEncoderFactory> {
  public:
   MOCK_METHOD0(GetSupportedEncoders, std::vector<AudioCodecSpec>());
   MOCK_METHOD1(QueryAudioEncoder,
@@ -46,9 +47,9 @@
   // example.
   static rtc::scoped_refptr<webrtc::MockAudioEncoderFactory>
   CreateUnusedFactory() {
-    using testing::_;
-    using testing::AnyNumber;
-    using testing::Return;
+    using ::testing::_;
+    using ::testing::AnyNumber;
+    using ::testing::Return;
 
     rtc::scoped_refptr<webrtc::MockAudioEncoderFactory> factory =
         new rtc::RefCountedObject<webrtc::MockAudioEncoderFactory>;
@@ -68,10 +69,10 @@
   // call, since it supports no codecs.
   static rtc::scoped_refptr<webrtc::MockAudioEncoderFactory>
   CreateEmptyFactory() {
-    using testing::_;
-    using testing::AnyNumber;
-    using testing::Return;
-    using testing::SetArgPointee;
+    using ::testing::_;
+    using ::testing::AnyNumber;
+    using ::testing::Return;
+    using ::testing::SetArgPointee;
 
     rtc::scoped_refptr<webrtc::MockAudioEncoderFactory> factory =
         new rtc::RefCountedObject<webrtc::MockAudioEncoderFactory>;
diff --git a/test/scenario/network/network_emulation_unittest.cc b/test/scenario/network/network_emulation_unittest.cc
index 5da9ce5..2ed4e6b 100644
--- a/test/scenario/network/network_emulation_unittest.cc
+++ b/test/scenario/network/network_emulation_unittest.cc
@@ -85,10 +85,10 @@
   }
 
   void SendPacketsAndValidateDelivery() {
-    EXPECT_CALL(r_e1_e2_, OnPacketReceived(testing::_)).Times(1);
-    EXPECT_CALL(r_e2_e1_, OnPacketReceived(testing::_)).Times(1);
-    EXPECT_CALL(r_e1_e3_, OnPacketReceived(testing::_)).Times(1);
-    EXPECT_CALL(r_e3_e1_, OnPacketReceived(testing::_)).Times(1);
+    EXPECT_CALL(r_e1_e2_, OnPacketReceived(::testing::_)).Times(1);
+    EXPECT_CALL(r_e2_e1_, OnPacketReceived(::testing::_)).Times(1);
+    EXPECT_CALL(r_e1_e3_, OnPacketReceived(::testing::_)).Times(1);
+    EXPECT_CALL(r_e3_e1_, OnPacketReceived(::testing::_)).Times(1);
 
     uint16_t common_send_port = 80;
     uint16_t r_e1_e2_port = e2_->BindReceiver(0, &r_e1_e2_).value();
@@ -148,7 +148,7 @@
 
 }  // namespace
 
-using testing::_;
+using ::testing::_;
 
 TEST(NetworkEmulationManagerTest, GeneratedIpv4AddressDoesNotCollide) {
   NetworkEmulationManagerImpl network_manager;
diff --git a/test/scenario/scenario_tests/bbr_performance.cc b/test/scenario/scenario_tests/bbr_performance.cc
index 57e1798..110bf4b 100644
--- a/test/scenario/scenario_tests/bbr_performance.cc
+++ b/test/scenario/scenario_tests/bbr_performance.cc
@@ -131,7 +131,7 @@
 }  // namespace
 class BbrScenarioTest
     : public ::testing::Test,
-      public testing::WithParamInterface<tuple<std::string, std::string>> {
+      public ::testing::WithParamInterface<tuple<std::string, std::string>> {
  public:
   BbrScenarioTest() {
     conf_.Parse(::testing::get<0>(GetParam()), ::testing::get<1>(GetParam()));
diff --git a/test/testsupport/copy_to_file_audio_capturer_unittest.cc b/test/testsupport/copy_to_file_audio_capturer_unittest.cc
index 13c2d00..6a4e194 100644
--- a/test/testsupport/copy_to_file_audio_capturer_unittest.cc
+++ b/test/testsupport/copy_to_file_audio_capturer_unittest.cc
@@ -21,7 +21,7 @@
 namespace webrtc {
 namespace test {
 
-class CopyToFileAudioCapturerTest : public testing::Test {
+class CopyToFileAudioCapturerTest : public ::testing::Test {
  protected:
   void SetUp() override {
     temp_filename_ = webrtc::test::TempFilename(
diff --git a/test/testsupport/file_utils_unittest.cc b/test/testsupport/file_utils_unittest.cc
index 49bc260..d4b4653 100644
--- a/test/testsupport/file_utils_unittest.cc
+++ b/test/testsupport/file_utils_unittest.cc
@@ -68,7 +68,7 @@
 // Test fixture to restore the working directory between each test, since some
 // of them change it with chdir during execution (not restored by the
 // gtest framework).
-class FileUtilsTest : public testing::Test {
+class FileUtilsTest : public ::testing::Test {
  protected:
   FileUtilsTest() {}
   ~FileUtilsTest() override {}
diff --git a/test/testsupport/perf_test_unittest.cc b/test/testsupport/perf_test_unittest.cc
index 6b08a07..ecc4258 100644
--- a/test/testsupport/perf_test_unittest.cc
+++ b/test/testsupport/perf_test_unittest.cc
@@ -71,7 +71,7 @@
 #define MAYBE_TestPrintResult TestPrintResult
 #endif
 TEST_F(PerfTest, MAYBE_TestPrintResult) {
-  testing::internal::CaptureStdout();
+  ::testing::internal::CaptureStdout();
   std::string expected;
 
   expected += "RESULT measurementmodifier: trace= 42 units\n";
@@ -87,7 +87,7 @@
   expected += "RESULT foobar: baz_vl= [1,2,3] units\n";
   PrintResultList("foo", "bar", "baz_vl", kListOfScalars, "units", false);
 
-  EXPECT_EQ(expected, testing::internal::GetCapturedStdout());
+  EXPECT_EQ(expected, ::testing::internal::GetCapturedStdout());
 }
 
 TEST_F(PerfTest, TestGetPerfResultsJSON) {
diff --git a/test/testsupport/video_frame_writer_unittest.cc b/test/testsupport/video_frame_writer_unittest.cc
index 8ab931b..e4a72dd 100644
--- a/test/testsupport/video_frame_writer_unittest.cc
+++ b/test/testsupport/video_frame_writer_unittest.cc
@@ -86,7 +86,7 @@
 
 }  // namespace
 
-class VideoFrameWriterTest : public testing::Test {
+class VideoFrameWriterTest : public ::testing::Test {
  protected:
   VideoFrameWriterTest() = default;
   ~VideoFrameWriterTest() override = default;
diff --git a/test/testsupport/y4m_frame_reader_unittest.cc b/test/testsupport/y4m_frame_reader_unittest.cc
index 72b421d..b69a363 100644
--- a/test/testsupport/y4m_frame_reader_unittest.cc
+++ b/test/testsupport/y4m_frame_reader_unittest.cc
@@ -35,7 +35,7 @@
 
 }  // namespace
 
-class Y4mFrameReaderTest : public testing::Test {
+class Y4mFrameReaderTest : public ::testing::Test {
  protected:
   Y4mFrameReaderTest() = default;
   ~Y4mFrameReaderTest() override = default;
diff --git a/test/testsupport/y4m_frame_writer_unittest.cc b/test/testsupport/y4m_frame_writer_unittest.cc
index f1de242..7ed84cb 100644
--- a/test/testsupport/y4m_frame_writer_unittest.cc
+++ b/test/testsupport/y4m_frame_writer_unittest.cc
@@ -31,7 +31,7 @@
 const std::string kFrameHeader = "FRAME\n";
 }  // namespace
 
-class Y4mFrameWriterTest : public testing::Test {
+class Y4mFrameWriterTest : public ::testing::Test {
  protected:
   Y4mFrameWriterTest() = default;
   ~Y4mFrameWriterTest() override = default;
diff --git a/test/testsupport/yuv_frame_reader_unittest.cc b/test/testsupport/yuv_frame_reader_unittest.cc
index 9e16307..a193742 100644
--- a/test/testsupport/yuv_frame_reader_unittest.cc
+++ b/test/testsupport/yuv_frame_reader_unittest.cc
@@ -31,7 +31,7 @@
 const size_t kFrameLength = 3 * kFrameWidth * kFrameHeight / 2;  // I420.
 }  // namespace
 
-class YuvFrameReaderTest : public testing::Test {
+class YuvFrameReaderTest : public ::testing::Test {
  protected:
   YuvFrameReaderTest() = default;
   ~YuvFrameReaderTest() override = default;
diff --git a/test/testsupport/yuv_frame_writer_unittest.cc b/test/testsupport/yuv_frame_writer_unittest.cc
index 12094bb..33980bd 100644
--- a/test/testsupport/yuv_frame_writer_unittest.cc
+++ b/test/testsupport/yuv_frame_writer_unittest.cc
@@ -27,7 +27,7 @@
 const size_t kFrameLength = 3 * kFrameWidth * kFrameHeight / 2;  // I420.
 }  // namespace
 
-class YuvFrameWriterTest : public testing::Test {
+class YuvFrameWriterTest : public ::testing::Test {
  protected:
   YuvFrameWriterTest() = default;
   ~YuvFrameWriterTest() override = default;
diff --git a/video/encoder_rtcp_feedback_unittest.cc b/video/encoder_rtcp_feedback_unittest.cc
index fd018ae..b49a0b9 100644
--- a/video/encoder_rtcp_feedback_unittest.cc
+++ b/video/encoder_rtcp_feedback_unittest.cc
@@ -32,7 +32,7 @@
   const uint32_t kSsrc = 1234;
 
   SimulatedClock simulated_clock_;
-  testing::StrictMock<MockVideoStreamEncoder> encoder_;
+  ::testing::StrictMock<MockVideoStreamEncoder> encoder_;
   EncoderRtcpFeedback encoder_rtcp_feedback_;
 };
 
diff --git a/video/end_to_end_tests/codec_tests.cc b/video/end_to_end_tests/codec_tests.cc
index eab9ef7..4149bef 100644
--- a/video/end_to_end_tests/codec_tests.cc
+++ b/video/end_to_end_tests/codec_tests.cc
@@ -35,7 +35,7 @@
 }  // namespace
 
 class CodecEndToEndTest : public test::CallTest,
-                          public testing::WithParamInterface<std::string> {
+                          public ::testing::WithParamInterface<std::string> {
  public:
   CodecEndToEndTest() : field_trial_(GetParam()) {
     RegisterRtpExtension(
@@ -233,7 +233,7 @@
 
 #if defined(WEBRTC_USE_H264)
 class EndToEndTestH264 : public test::CallTest,
-                         public testing::WithParamInterface<std::string> {
+                         public ::testing::WithParamInterface<std::string> {
  public:
   EndToEndTestH264() : field_trial_(GetParam()) {
     RegisterRtpExtension(RtpExtension(RtpExtension::kVideoRotationUri,
diff --git a/video/overuse_frame_detector_unittest.cc b/video/overuse_frame_detector_unittest.cc
index c9ba11c..ebabf11 100644
--- a/video/overuse_frame_detector_unittest.cc
+++ b/video/overuse_frame_detector_unittest.cc
@@ -250,7 +250,7 @@
   EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(1);
   TriggerOveruse(options_.high_threshold_consecutive_count);
   // usage < low => underuse
-  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(::testing::AtLeast(1));
   TriggerUnderuse();
 }
 
@@ -259,7 +259,7 @@
   EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(2);
   TriggerOveruse(options_.high_threshold_consecutive_count);
   TriggerOveruse(options_.high_threshold_consecutive_count);
-  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(::testing::AtLeast(1));
   TriggerUnderuse();
 }
 
@@ -370,7 +370,7 @@
 
 TEST_F(OveruseFrameDetectorTest, MeasuresMultipleConcurrentSamples) {
   overuse_detector_->SetOptions(options_);
-  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(::testing::AtLeast(1));
   static const int kIntervalUs = 33 * rtc::kNumMicrosecsPerMillisec;
   static const size_t kNumFramesEncodingDelay = 3;
   VideoFrame frame =
@@ -397,7 +397,7 @@
 TEST_F(OveruseFrameDetectorTest, UpdatesExistingSamples) {
   // >85% encoding time should trigger overuse.
   overuse_detector_->SetOptions(options_);
-  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(::testing::AtLeast(1));
   static const int kIntervalUs = 33 * rtc::kNumMicrosecsPerMillisec;
   static const int kDelayUs = 30 * rtc::kNumMicrosecsPerMillisec;
   VideoFrame frame =
@@ -576,7 +576,7 @@
 
   // EXPECT_CALL(mock_observer_, AdaptDown(_)).Times(0);
   // EXPECT_CALL(mock_observer_, AdaptUp(reason_))
-  //     .Times(testing::AtLeast(1));
+  //     .Times(::testing::AtLeast(1));
   overuse_detector_->SetOptions(options_);
 
   const int kNumFrames = 500;
@@ -605,7 +605,7 @@
   overuse_detector_->SetOptions(options_);
   EXPECT_CALL(mock_observer_, AdaptDown(_)).Times(0);
   // EXPECT_CALL(mock_observer_, AdaptUp(reason_))
-  //     .Times(testing::AtLeast(1));
+  //     .Times(::testing::AtLeast(1));
 
   const int kNumFrames = 500;
   const int kEncodeTimeUs = 100 * rtc::kNumMicrosecsPerMillisec;
@@ -728,7 +728,7 @@
   EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(1);
   TriggerOveruse(options_.high_threshold_consecutive_count);
   // usage < low => underuse
-  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(::testing::AtLeast(1));
   TriggerUnderuse();
 }
 
@@ -737,7 +737,7 @@
   EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(2);
   TriggerOveruse(options_.high_threshold_consecutive_count);
   TriggerOveruse(options_.high_threshold_consecutive_count);
-  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(::testing::AtLeast(1));
   TriggerUnderuse();
 }
 
@@ -848,7 +848,7 @@
 
 TEST_F(OveruseFrameDetectorTest2, MeasuresMultipleConcurrentSamples) {
   overuse_detector_->SetOptions(options_);
-  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(::testing::AtLeast(1));
   static const int kIntervalUs = 33 * rtc::kNumMicrosecsPerMillisec;
   static const size_t kNumFramesEncodingDelay = 3;
   VideoFrame frame =
@@ -875,7 +875,7 @@
 TEST_F(OveruseFrameDetectorTest2, UpdatesExistingSamples) {
   // >85% encoding time should trigger overuse.
   overuse_detector_->SetOptions(options_);
-  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptDown(reason_)).Times(::testing::AtLeast(1));
   static const int kIntervalUs = 33 * rtc::kNumMicrosecsPerMillisec;
   static const int kDelayUs = 30 * rtc::kNumMicrosecsPerMillisec;
   VideoFrame frame =
@@ -936,7 +936,7 @@
 TEST_F(OveruseFrameDetectorTest2, NoOveruseForLargeRandomFrameInterval) {
   overuse_detector_->SetOptions(options_);
   EXPECT_CALL(mock_observer_, AdaptDown(_)).Times(0);
-  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(::testing::AtLeast(1));
 
   const int kNumFrames = 500;
   const int kEncodeTimeUs = 100 * rtc::kNumMicrosecsPerMillisec;
@@ -956,7 +956,7 @@
 TEST_F(OveruseFrameDetectorTest2, NoOveruseForRandomFrameIntervalWithReset) {
   overuse_detector_->SetOptions(options_);
   EXPECT_CALL(mock_observer_, AdaptDown(_)).Times(0);
-  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(testing::AtLeast(1));
+  EXPECT_CALL(mock_observer_, AdaptUp(reason_)).Times(::testing::AtLeast(1));
 
   const int kNumFrames = 500;
   const int kEncodeTimeUs = 100 * rtc::kNumMicrosecsPerMillisec;
diff --git a/video/receive_statistics_proxy_unittest.cc b/video/receive_statistics_proxy_unittest.cc
index 6f04588..b8293aa 100644
--- a/video/receive_statistics_proxy_unittest.cc
+++ b/video/receive_statistics_proxy_unittest.cc
@@ -1031,7 +1031,7 @@
 
 class ReceiveStatisticsProxyTestWithFreezeDuration
     : public ReceiveStatisticsProxyTest,
-      public testing::WithParamInterface<
+      public ::testing::WithParamInterface<
           std::tuple<uint32_t, uint32_t, uint32_t>> {
  protected:
   const uint32_t frame_duration_ms_ = {std::get<0>(GetParam())};
diff --git a/video/rtp_video_stream_receiver_unittest.cc b/video/rtp_video_stream_receiver_unittest.cc
index 34519e3..5fb1a8c 100644
--- a/video/rtp_video_stream_receiver_unittest.cc
+++ b/video/rtp_video_stream_receiver_unittest.cc
@@ -118,7 +118,7 @@
 
 }  // namespace
 
-class RtpVideoStreamReceiverTest : public testing::Test {
+class RtpVideoStreamReceiverTest : public ::testing::Test {
  public:
   RtpVideoStreamReceiverTest() : RtpVideoStreamReceiverTest("") {}
   explicit RtpVideoStreamReceiverTest(std::string field_trials)
@@ -279,7 +279,7 @@
 
 class RtpVideoStreamReceiverTestH264
     : public RtpVideoStreamReceiverTest,
-      public testing::WithParamInterface<std::string> {
+      public ::testing::WithParamInterface<std::string> {
  protected:
   RtpVideoStreamReceiverTestH264() : RtpVideoStreamReceiverTest(GetParam()) {}
 };
diff --git a/video/video_receive_stream_unittest.cc b/video/video_receive_stream_unittest.cc
index 642143a..0284627 100644
--- a/video/video_receive_stream_unittest.cc
+++ b/video/video_receive_stream_unittest.cc
@@ -32,8 +32,8 @@
 namespace webrtc {
 namespace {
 
-using testing::_;
-using testing::Invoke;
+using ::testing::_;
+using ::testing::Invoke;
 
 constexpr int kDefaultTimeOutMs = 50;
 
@@ -70,7 +70,7 @@
 
 }  // namespace
 
-class VideoReceiveStreamTest : public testing::Test {
+class VideoReceiveStreamTest : public ::testing::Test {
  public:
   VideoReceiveStreamTest()
       : process_thread_(ProcessThread::Create("TestThread")),
diff --git a/video/video_send_stream_impl_unittest.cc b/video/video_send_stream_impl_unittest.cc
index fc0f785..a5e5cd4 100644
--- a/video/video_send_stream_impl_unittest.cc
+++ b/video/video_send_stream_impl_unittest.cc
@@ -32,10 +32,10 @@
 namespace webrtc {
 namespace internal {
 namespace {
-using testing::_;
-using testing::Invoke;
-using testing::NiceMock;
-using testing::Return;
+using ::testing::_;
+using ::testing::Invoke;
+using ::testing::NiceMock;
+using ::testing::Return;
 
 constexpr int64_t kDefaultInitialBitrateBps = 333000;
 const double kDefaultBitratePriority = 0.5;
@@ -105,11 +105,11 @@
                 CreateRtpVideoSender(_, _, _, _, _, _, _, _, _))
         .WillRepeatedly(Return(&rtp_video_sender_));
     EXPECT_CALL(rtp_video_sender_, SetActive(_))
-        .WillRepeatedly(testing::Invoke(
+        .WillRepeatedly(::testing::Invoke(
             [&](bool active) { rtp_video_sender_active_ = active; }));
     EXPECT_CALL(rtp_video_sender_, IsActive())
         .WillRepeatedly(
-            testing::Invoke([&]() { return rtp_video_sender_active_; }));
+            ::testing::Invoke([&]() { return rtp_video_sender_active_; }));
   }
   ~VideoSendStreamImplTest() {}
 
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index 39406c6..0793843 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -732,9 +732,9 @@
     } else {
       EXPECT_EQ(VideoSendStreamTest::kFakeVideoSendPayloadType,
                 header.payloadType);
-      EXPECT_THAT(testing::make_tuple(VideoSendStreamTest::kVideoSendSsrcs,
-                                      num_video_streams_),
-                  testing::Contains(header.ssrc));
+      EXPECT_THAT(::testing::make_tuple(VideoSendStreamTest::kVideoSendSsrcs,
+                                        num_video_streams_),
+                  ::testing::Contains(header.ssrc));
       sent_media_ = true;
     }
 
diff --git a/video/video_stream_encoder_unittest.cc b/video/video_stream_encoder_unittest.cc
index 71e8063..f9b2355 100644
--- a/video/video_stream_encoder_unittest.cc
+++ b/video/video_stream_encoder_unittest.cc
@@ -3697,14 +3697,14 @@
   WaitForEncodedFrame(1);
   EXPECT_THAT(
       fake_encoder_.LastFrameTypes(),
-      testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
+      ::testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
 
   // Insert delta frame.
   video_source_.IncomingCapturedFrame(CreateFrame(2, nullptr));
   WaitForEncodedFrame(2);
   EXPECT_THAT(
       fake_encoder_.LastFrameTypes(),
-      testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameDelta}));
+      ::testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameDelta}));
 
   // Request next frame be a key-frame.
   video_stream_encoder_->SendKeyFrame();
@@ -3712,7 +3712,7 @@
   WaitForEncodedFrame(3);
   EXPECT_THAT(
       fake_encoder_.LastFrameTypes(),
-      testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
+      ::testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
 
   video_stream_encoder_->Stop();
 }
@@ -3730,17 +3730,17 @@
   video_source_.IncomingCapturedFrame(CreateFrame(1, nullptr));
   WaitForEncodedFrame(1);
   EXPECT_THAT(fake_encoder_.LastFrameTypes(),
-              testing::ElementsAreArray({VideoFrameType::kVideoFrameKey,
-                                         VideoFrameType::kVideoFrameKey,
-                                         VideoFrameType::kVideoFrameKey}));
+              ::testing::ElementsAreArray({VideoFrameType::kVideoFrameKey,
+                                           VideoFrameType::kVideoFrameKey,
+                                           VideoFrameType::kVideoFrameKey}));
 
   // Insert delta frame.
   video_source_.IncomingCapturedFrame(CreateFrame(2, nullptr));
   WaitForEncodedFrame(2);
   EXPECT_THAT(fake_encoder_.LastFrameTypes(),
-              testing::ElementsAreArray({VideoFrameType::kVideoFrameDelta,
-                                         VideoFrameType::kVideoFrameDelta,
-                                         VideoFrameType::kVideoFrameDelta}));
+              ::testing::ElementsAreArray({VideoFrameType::kVideoFrameDelta,
+                                           VideoFrameType::kVideoFrameDelta,
+                                           VideoFrameType::kVideoFrameDelta}));
 
   // Request next frame be a key-frame.
   // Only first stream is configured to produce key-frame.
@@ -3748,9 +3748,9 @@
   video_source_.IncomingCapturedFrame(CreateFrame(3, nullptr));
   WaitForEncodedFrame(3);
   EXPECT_THAT(fake_encoder_.LastFrameTypes(),
-              testing::ElementsAreArray({VideoFrameType::kVideoFrameKey,
-                                         VideoFrameType::kVideoFrameDelta,
-                                         VideoFrameType::kVideoFrameDelta}));
+              ::testing::ElementsAreArray({VideoFrameType::kVideoFrameKey,
+                                           VideoFrameType::kVideoFrameDelta,
+                                           VideoFrameType::kVideoFrameDelta}));
 
   video_stream_encoder_->Stop();
 }
@@ -3768,7 +3768,7 @@
   EXPECT_TRUE(WaitForFrame(kDefaultTimeoutMs));
   EXPECT_THAT(
       fake_encoder_.LastFrameTypes(),
-      testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
+      ::testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
 
   const std::vector<VideoFrameType> kDeltaFrame = {
       VideoFrameType::kVideoFrameDelta};
@@ -3779,7 +3779,7 @@
   EXPECT_TRUE(WaitForFrame(kDefaultTimeoutMs));
   EXPECT_THAT(
       fake_encoder_.LastFrameTypes(),
-      testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameDelta}));
+      ::testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameDelta}));
 
   // Request key-frame. The forces a dummy frame down into the encoder.
   fake_encoder_.ExpectNullFrame();
@@ -3787,7 +3787,7 @@
   EXPECT_TRUE(WaitForFrame(kDefaultTimeoutMs));
   EXPECT_THAT(
       fake_encoder_.LastFrameTypes(),
-      testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
+      ::testing::ElementsAre(VideoFrameType{VideoFrameType::kVideoFrameKey}));
 
   video_stream_encoder_->Stop();
 }