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

Side by Side Diff: chromeos/network/auto_connect_handler_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/auto_connect_handler.h" 5 #include "chromeos/network/auto_connect_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ASSERT_TRUE(test_nssdb_.is_open()); 64 ASSERT_TRUE(test_nssdb_.is_open());
65 65
66 // Use the same DB for public and private slot. 66 // Use the same DB for public and private slot.
67 test_nsscertdb_.reset(new net::NSSCertDatabaseChromeOS( 67 test_nsscertdb_.reset(new net::NSSCertDatabaseChromeOS(
68 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot())), 68 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot())),
69 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot())))); 69 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot()))));
70 test_nsscertdb_->SetSlowTaskRunnerForTest(message_loop_.task_runner()); 70 test_nsscertdb_->SetSlowTaskRunnerForTest(message_loop_.task_runner());
71 71
72 CertLoader::Initialize(); 72 CertLoader::Initialize();
73 CertLoader::ForceHardwareBackedForTesting(); 73 CertLoader::ForceHardwareBackedForTesting();
74 CertLoader::Get()->SetSlowTaskRunnerForTest(message_loop_.task_runner());
74 75
75 DBusThreadManager::Initialize(); 76 DBusThreadManager::Initialize();
76 77
77 NetworkStateTest::SetUp(); 78 NetworkStateTest::SetUp();
78 79
79 LoginState::Initialize(); 80 LoginState::Initialize();
80 81
81 network_config_handler_.reset( 82 network_config_handler_.reset(
82 NetworkConfigurationHandler::InitializeForTest( 83 NetworkConfigurationHandler::InitializeForTest(
83 network_state_handler(), nullptr /* network_device_handler */)); 84 network_state_handler(), nullptr /* network_device_handler */));
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // Applying the user policy after login would usually trigger connecting to 453 // Applying the user policy after login would usually trigger connecting to
453 // the 'best' network. But the manual connect prevents this. 454 // the 'best' network. But the manual connect prevents this.
454 SetupPolicy(std::string(), // no network configs 455 SetupPolicy(std::string(), // no network configs
455 base::DictionaryValue(), // no global config 456 base::DictionaryValue(), // no global config
456 true); // load as user policy 457 true); // load as user policy
457 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0")); 458 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0"));
458 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1")); 459 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1"));
459 } 460 }
460 461
461 } // namespace chromeos 462 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698