RTCIceCandidatePairStats.nominated collected.

Connection::nominated() is updated to mean
(remote_nomination_ || acked_nomination_), which means both a
controlling and controlled agent can be said to be "nominated".
Previously this was (remote_nomination_ > 0) which only applies to the
controlling agent.

PortTest.TestNomination added to test nomination values and nomination
stat.

This value is surfaced through cricket::ConnectionInfo::nominated.
RTCStatsCollector uses this value in its collection of
RTCIceCandidatePairStats.

RTCStatsCollectorTest.CollectRTCIceCandidatePairStats updated to test
that ConnectionInfo::nominated is surfaced using mocks.
rtcstats_integrationtest.cc updated to expect nomination set without
using mocks.

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-nominated

BUG=webrtc:7062, webrtc:7204

Review-Url: https://codereview.webrtc.org/2709293004
Cr-Original-Commit-Position: refs/heads/master@{#16855}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 92eaec610490ab5f7aa66fae1edf964df1d68345
diff --git a/pc/rtcstatscollector_unittest.cc b/pc/rtcstatscollector_unittest.cc
index 3a4033b..e698cf5 100644
--- a/pc/rtcstatscollector_unittest.cc
+++ b/pc/rtcstatscollector_unittest.cc
@@ -1249,6 +1249,7 @@
   connection_info.sent_ping_responses = 1000;
   connection_info.state = cricket::IceCandidatePairState::IN_PROGRESS;
   connection_info.priority = 5555;
+  connection_info.nominated = false;
 
   cricket::TransportChannelStats transport_channel_stats;
   transport_channel_stats.component = cricket::ICE_CANDIDATE_COMPONENT_RTP;
@@ -1289,6 +1290,7 @@
       "RTCIceCandidate_" + remote_candidate->id();
   expected_pair.state = RTCStatsIceCandidatePairState::kInProgress;
   expected_pair.priority = 5555;
+  expected_pair.nominated = false;
   expected_pair.writable = true;
   expected_pair.bytes_sent = 42;
   expected_pair.bytes_received = 1234;
@@ -1307,6 +1309,22 @@
       report->Get(expected_pair.id())->cast_to<RTCIceCandidatePairStats>());
   EXPECT_TRUE(report->Get(*expected_pair.transport_id));
 
+  // Set nominated and "GetStats" again.
+  session_stats.transport_stats["transport"]
+      .channel_stats[0]
+      .connection_infos[0]
+      .nominated = true;
+  EXPECT_CALL(*video_media_channel, GetStats(_))
+      .WillOnce(DoAll(SetArgPointee<0>(video_media_info), Return(true)));
+  collector_->ClearCachedStatsReport();
+  report = GetStatsReport();
+  expected_pair.nominated = true;
+  ASSERT_TRUE(report->Get(expected_pair.id()));
+  EXPECT_EQ(
+      expected_pair,
+      report->Get(expected_pair.id())->cast_to<RTCIceCandidatePairStats>());
+  EXPECT_TRUE(report->Get(*expected_pair.transport_id));
+
   // Make pair the current pair, clear bandwidth and "GetStats" again.
   session_stats.transport_stats["transport"]
       .channel_stats[0]