src/net/dns/esni_content_unittest.cc
// Test that merging multiple addresss corresponding to a single key works.
Test that merging multiple addresss corresponding to a single key works.
Test that merging multiple addresss corresponding to a single key works .
TEST(EsniContentTest, MergeHostsForSingleKey) {
  EsniContent c1, c2;
  IPAddress address = MakeIPAddress();
  IPAddress second_address = MakeIPAddress();
  c1.AddKeyForAddress(address, "a");
  c2.AddKeyForAddress(second_address, "a");
  c1.MergeFrom(c2);
  EXPECT_THAT(c1.keys(), ::testing::UnorderedElementsAre("a"));
  EXPECT_THAT(
      c1.keys_for_addresses(),
      ::testing::UnorderedElementsAre(
          ::testing::Pair(address, ::testing::UnorderedElementsAre("a")),
          ::testing::Pair(second_address,
                          ::testing::UnorderedElementsAre("a"))));
}
TEST ( EsniContentTest , MergeHostsForSingleKey ) { EsniContent c1 , c2 ; IPAddress address = MakeIPAddress ( ) ; IPAddress second_address = MakeIPAddress ( ) ; c1 . AddKeyForAddress ( address , " " ) ; c2 . AddKeyForAddress ( second_address , " " ) ; c1 . MergeFrom ( c2 ) ; EXPECT_THAT ( c1 . keys ( ) , :: testing :: UnorderedElementsAre ( " " ) ) ; EXPECT_THAT ( c1 . keys_for_addresses ( ) , :: testing :: UnorderedElementsAre ( :: testing :: Pair ( address , :: testing :: UnorderedElementsAre ( " " ) ) , :: testing :: Pair ( second_address , :: testing :: UnorderedElementsAre ( " " ) ) ) ) ; }
Test that merging multiple addresss corresponding to a single key works.
Test that merging multiple addresss corresponding to a single key works .