Metrics for additional https records

This covers both the case where HTTPS is the qtype (and thus additional
records means the resolver is HTTPS-aware and doing followup queries for
us), and the case where HTTPS is not the qtype (and thus the record was
unsolicited).

Bug: 1138620
Change-Id: I532a29dac47bd2beaf479855b395e720ec54f16e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523425
Reviewed-by: Mark Pearson <[email protected]>
Reviewed-by: Michael Lippautz <[email protected]>
Reviewed-by: Dan McArdle <[email protected]>
Commit-Queue: Eric Orth <[email protected]>
Cr-Commit-Position: refs/heads/master@{#825845}
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index 0de0f38..1f1c4cb 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -151,7 +151,9 @@
 DnsResponse BuildTestDnsResponse(
     std::string name,
     uint16_t type,
-    const std::vector<DnsResourceRecord>& answers) {
+    const std::vector<DnsResourceRecord>& answers,
+    const std::vector<DnsResourceRecord>& authority,
+    const std::vector<DnsResourceRecord>& additional) {
   DCHECK(!name.empty());
 
   std::string dns_name;
@@ -159,8 +161,9 @@
 
   base::Optional<DnsQuery> query(base::in_place, 0, std::move(dns_name), type);
   return DnsResponse(0, true /* is_authoritative */, answers,
-                     {} /* authority_records */, {} /* additional_records */,
-                     query, dns_protocol::kRcodeNOERROR /* rcode */,
+                     authority /* authority_records */,
+                     additional /* additional_records */, query,
+                     dns_protocol::kRcodeNOERROR /* rcode */,
                      false /* validate_answers_match_query */);
 }