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

Side by Side Diff: chromeos/network/network_cert_migrator_unittest.cc

Issue 2828713002: Enable client certificate patterns in device ONC policy (Closed)
Patch Set: Clean up. Created 3 years, 8 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 "chromeos/network/network_cert_migrator.h" 5 #include "chromeos/network/network_cert_migrator.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <pk11pub.h> 8 #include <pk11pub.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface(); 55 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface();
56 DBusThreadManager::Get() 56 DBusThreadManager::Get()
57 ->GetShillProfileClient() 57 ->GetShillProfileClient()
58 ->GetTestInterface() 58 ->GetTestInterface()
59 ->AddProfile(kProfile, "" /* userhash */); 59 ->AddProfile(kProfile, "" /* userhash */);
60 base::RunLoop().RunUntilIdle(); 60 base::RunLoop().RunUntilIdle();
61 service_test_->ClearServices(); 61 service_test_->ClearServices();
62 base::RunLoop().RunUntilIdle(); 62 base::RunLoop().RunUntilIdle();
63 63
64 CertLoader::Initialize(); 64 CertLoader::Initialize();
65 CertLoader::Get()->SetSlowTaskRunnerForTest(message_loop_.task_runner());
65 CertLoader* cert_loader_ = CertLoader::Get(); 66 CertLoader* cert_loader_ = CertLoader::Get();
66 cert_loader_->StartWithNSSDB(test_nsscertdb_.get()); 67 cert_loader_->StartWithNSSDB(test_nsscertdb_.get());
67 } 68 }
68 69
69 void TearDown() override { 70 void TearDown() override {
70 network_state_handler_->Shutdown(); 71 network_state_handler_->Shutdown();
71 network_cert_migrator_.reset(); 72 network_cert_migrator_.reset();
72 network_state_handler_.reset(); 73 network_state_handler_.reset();
73 CertLoader::Shutdown(); 74 CertLoader::Shutdown();
74 DBusThreadManager::Shutdown(); 75 DBusThreadManager::Shutdown();
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 base::RunLoop().RunUntilIdle(); 331 base::RunLoop().RunUntilIdle();
331 332
332 std::string pkcs11_id; 333 std::string pkcs11_id;
333 std::string slot_id; 334 std::string slot_id;
334 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); 335 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id);
335 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); 336 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id);
336 EXPECT_EQ(test_client_cert_slot_id_, slot_id); 337 EXPECT_EQ(test_client_cert_slot_id_, slot_id);
337 } 338 }
338 339
339 } // namespace chromeos 340 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698