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

Unified Diff: extensions/browser/api/cast_channel/cast_socket_unittest.cc

Issue 2084153003: Remove the test-only X509Certificate constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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 | « content/browser/loader/resource_loader_unittest.cc ('k') | extensions/extensions_unittests.isolate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/cast_channel/cast_socket_unittest.cc
diff --git a/extensions/browser/api/cast_channel/cast_socket_unittest.cc b/extensions/browser/api/cast_channel/cast_socket_unittest.cc
index e0433b924c5ed975919257922514a0b181e1c344..08b18acf01a56c27b35bf7c3d68164d83f4ea61d 100644
--- a/extensions/browser/api/cast_channel/cast_socket_unittest.cc
+++ b/extensions/browser/api/cast_channel/cast_socket_unittest.cc
@@ -35,6 +35,8 @@
#include "net/socket/ssl_client_socket.h"
#include "net/socket/tcp_client_socket.h"
#include "net/ssl/ssl_info.h"
+#include "net/test/cert_test_util.h"
+#include "net/test/test_data_directory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -316,10 +318,10 @@ class TestCastSocket : public CastSocketImpl {
}
scoped_refptr<net::X509Certificate> ExtractPeerCert() override {
- return extract_cert_result_ ? make_scoped_refptr<net::X509Certificate>(
- new net::X509Certificate(
- "", "", base::Time(), base::Time()))
- : nullptr;
+ return extract_cert_result_
+ ? net::ImportCertFromFile(net::GetTestCertsDirectory(),
+ "ok_cert.pem")
+ : nullptr;
}
bool VerifyChallengeReply() override {
« no previous file with comments | « content/browser/loader/resource_loader_unittest.cc ('k') | extensions/extensions_unittests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698