Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1421)

Unified Diff: net/http/transport_security_state_static_unittest.template

Issue 2680933009: Add unittests for HSTS decoding. (Closed)
Patch Set: Comment rsleevi. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/transport_security_state_static_unittest.template
diff --git a/net/http/transport_security_state_static_unittest.template b/net/http/transport_security_state_static_unittest.template
new file mode 100644
index 0000000000000000000000000000000000000000..e766145ec3f8595756a69408256ef761d447bc87
--- /dev/null
+++ b/net/http/transport_security_state_static_unittest.template
@@ -0,0 +1,48 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file is generated by net/tools/transport_security_state_generator/.
+// See transport_security_state_static.template for more information on the data
+// in this file.
+
+#include <stdint.h>
+
+#include "net/http/transport_security_state_source.h"
+
+enum SecondLevelDomainName [[DOMAIN_IDS]];
+
+[[SPKI_HASHES]]
+
+static const char* const kExpectCTReportURIs[] = [[EXPECT_CT_REPORT_URIS]];
+
+static const char* const kExpectStapleReportURIs[] = [[EXPECT_STAPLE_REPORT_URIS]];
+
+static const char* const kNoRejectedPublicKeys[] = {
+ NULL,
+};
+
+static const char kNoReportURI[] = "";
+
+[[ACCEPTABLE_CERTS]]
+
+static const struct net::TransportSecurityStateSource::Pinset kPinsets[] = [[PINSETS]];
+
+static const uint8_t kHSTSHuffmanTree[] = [[HUFFMAN_TREE]];
+
+static const uint8_t kPreloadedHSTSData[] = [[HSTS_TRIE]];
+
+static const unsigned kPreloadedHSTSBits = [[HSTS_TRIE_BITS]];
+static const unsigned kHSTSRootPosition = [[HSTS_TRIE_ROOT]];
+
+static const net::TransportSecurityStateSource kHSTSSource = {
+ kHSTSHuffmanTree,
+ sizeof(kHSTSHuffmanTree),
+ kPreloadedHSTSData,
+ kPreloadedHSTSBits,
+ kHSTSRootPosition,
+ kExpectCTReportURIs,
+ kExpectStapleReportURIs,
+ kPinsets,
+ arraysize(kPinsets)
+};
« no previous file with comments | « net/http/transport_security_state_static_unittest.pins ('k') | net/http/transport_security_state_static_unittest1.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698