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

Side by Side Diff: content/browser/media/webrtc_identity_store_unittest.cc

Issue 27832002: Sign self-signed certs with SHA256. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/scoped_temp_dir.h" 6 #include "base/files/scoped_temp_dir.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/test/sequenced_worker_pool_owner.h" 8 #include "base/test/sequenced_worker_pool_owner.h"
9 #include "content/browser/media/webrtc_identity_store.h" 9 #include "content/browser/media/webrtc_identity_store.h"
10 #include "content/public/test/test_browser_thread_bundle.h" 10 #include "content/public/test/test_browser_thread_bundle.h"
11 #include "content/public/test/test_utils.h" 11 #include "content/public/test/test_utils.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 // TODO(jiayl): the tests fail on Android since the openssl version of 18 // TODO(jiayl): the tests fail on Android since the openssl version of
19 // CreateSelfSignedCert is not implemented. 19 // CreateSelfSignedCertInternal is not implemented.
20 #if !defined(OS_ANDROID) 20 #if !defined(OS_ANDROID)
21 21
22 static const char* kFakeOrigin = "http://foo.com"; 22 static const char* kFakeOrigin = "http://foo.com";
23 static const char* kFakeIdentityName1 = "name1"; 23 static const char* kFakeIdentityName1 = "name1";
24 static const char* kFakeIdentityName2 = "name2"; 24 static const char* kFakeIdentityName2 = "name2";
25 static const char* kFakeCommonName1 = "cname1"; 25 static const char* kFakeCommonName1 = "cname1";
26 static const char* kFakeCommonName2 = "cname2"; 26 static const char* kFakeCommonName2 = "cname2";
27 27
28 static void OnRequestCompleted(bool* completed, 28 static void OnRequestCompleted(bool* completed,
29 std::string* out_cert, 29 std::string* out_cert,
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 &completed_2, 342 &completed_2,
343 &cert_2, 343 &cert_2,
344 &key_2); 344 &key_2);
345 EXPECT_TRUE(completed_2); 345 EXPECT_TRUE(completed_2);
346 EXPECT_EQ(cert_1, cert_2); 346 EXPECT_EQ(cert_1, cert_2);
347 EXPECT_EQ(key_1, key_2); 347 EXPECT_EQ(key_1, key_2);
348 } 348 }
349 349
350 #endif 350 #endif
351 } // namespace content 351 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698