Use Abseil container algorithms in pc/

Bug: None
Change-Id: If784461b54d95bdc6f8a7d4e5d1bbfa52d1a390e
Reviewed-on: https://webrtc-review.googlesource.com/c/119862
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26433}
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index 14fd366..afe7649 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -16,6 +16,7 @@
 #include <string>
 #include <vector>
 
+#include "absl/algorithm/container.h"
 #include "absl/strings/match.h"
 #include "api/audio_codecs/audio_decoder_factory.h"
 #include "api/audio_codecs/audio_encoder_factory.h"
@@ -41,8 +42,11 @@
 #include "rtc_base/thread.h"
 #include "rtc_base/trace_event.h"
 #include "rtc_base/virtual_socket_server.h"
+#include "test/gmock.h"
 #include "test/gtest.h"
 
+using ::testing::Contains;
+
 namespace webrtc {
 
 namespace {
@@ -402,8 +406,7 @@
       }
     }
     for (const char* missing : missing_stats) {
-      if (std::find(allowed_missing_stats.begin(), allowed_missing_stats.end(),
-                    missing) == allowed_missing_stats.end()) {
+      if (!absl::c_linear_search(allowed_missing_stats, missing)) {
         verify_successful = false;
         EXPECT_TRUE(false) << "Missing expected stats type: " << missing;
       }
@@ -897,13 +900,10 @@
     std::vector<const std::string*> neighbor_ids = GetStatsReferencedIds(stats);
     EXPECT_EQ(neighbor_ids.size(), expected_ids.size());
     for (const std::string* neighbor_id : neighbor_ids) {
-      EXPECT_TRUE(expected_ids.find(neighbor_id) != expected_ids.end())
-          << "Unexpected neighbor ID: " << *neighbor_id;
+      EXPECT_THAT(expected_ids, Contains(neighbor_id));
     }
     for (const std::string* expected_id : expected_ids) {
-      EXPECT_TRUE(std::find(neighbor_ids.begin(), neighbor_ids.end(),
-                            expected_id) != neighbor_ids.end())
-          << "Missing expected neighbor ID: " << *expected_id;
+      EXPECT_THAT(neighbor_ids, Contains(expected_id));
     }
   }
 }