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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp

Issue 2135143002: Implement SignedCertificateTimestamp::isolatedCopy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceResponse.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp b/third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1a20323e6b7ec7bbcebfc94b14374be2310db666
--- /dev/null
+++ b/third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp
@@ -0,0 +1,42 @@
+// Copyright 2016 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.
+
+#include "platform/network/ResourceResponse.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace blink {
+
+TEST(ResourceResponseTest, SignedCertificateTimestampIsolatedCopy)
+{
+ ResourceResponse::SignedCertificateTimestamp src(
+ "status",
+ "origin",
+ "logDescription",
+ "logId",
+ 7,
+ "hashAlgorithm",
+ "signatureAlgorithm",
+ "signatureData");
+
+ ResourceResponse::SignedCertificateTimestamp dest = src.isolatedCopy();
+
+ EXPECT_EQ(src.m_status, dest.m_status);
+ EXPECT_NE(src.m_status.impl(), dest.m_status.impl());
+ EXPECT_EQ(src.m_origin, dest.m_origin);
+ EXPECT_NE(src.m_origin.impl(), dest.m_origin.impl());
+ EXPECT_EQ(src.m_logDescription, dest.m_logDescription);
+ EXPECT_NE(src.m_logDescription.impl(), dest.m_logDescription.impl());
+ EXPECT_EQ(src.m_logId, dest.m_logId);
+ EXPECT_NE(src.m_logId.impl(), dest.m_logId.impl());
+ EXPECT_EQ(src.m_timestamp, dest.m_timestamp);
+ EXPECT_EQ(src.m_hashAlgorithm, dest.m_hashAlgorithm);
+ EXPECT_NE(src.m_hashAlgorithm.impl(), dest.m_hashAlgorithm.impl());
+ EXPECT_EQ(src.m_signatureAlgorithm, dest.m_signatureAlgorithm);
+ EXPECT_NE(src.m_signatureAlgorithm.impl(), dest.m_signatureAlgorithm.impl());
+ EXPECT_EQ(src.m_signatureData, dest.m_signatureData);
+ EXPECT_NE(src.m_signatureData.impl(), dest.m_signatureData.impl());
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceResponse.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698