Lines Matching refs:driver_

109         driver_(new OpenVPNDriver(&control_, &dispatcher_, &metrics_, &manager_,  in OpenVPNDriverTest()
112 &manager_, driver_)), in OpenVPNDriverTest()
119 driver_->management_server_.reset(management_server_); in OpenVPNDriverTest()
120 driver_->certificate_file_.reset(certificate_file_); // Passes ownership. in OpenVPNDriverTest()
121 driver_->extra_certificates_file_.reset( in OpenVPNDriverTest()
124 driver_->openvpn_config_directory_ = in OpenVPNDriverTest()
131 driver_->default_service_callback_tag_ = 0; in TearDown()
132 driver_->pid_ = 0; in TearDown()
133 driver_->device_ = nullptr; in TearDown()
134 driver_->service_ = nullptr; in TearDown()
159 driver_->args()->SetString(arg, value); in SetArg()
163 driver_->args()->SetStrings(arg, value); in SetArgArray()
167 return driver_->args(); in GetArgs()
179 driver_->args()->RemoveString(arg); in RemoveStringArg()
188 return driver_->InitManagementChannelOptions(options, error); in InitManagementChannelOptions()
192 return &driver_->sockets_; in GetSockets()
196 driver_->device_ = device; in SetDevice()
200 driver_->service_ = service; in SetService()
204 return driver_->service_; in GetService()
208 driver_->OnConnectionDisconnected(); in OnConnectionDisconnected()
212 driver_->OnConnectTimeout(); in OnConnectTimeout()
216 driver_->StartConnectTimeout(timeout_seconds); in StartConnectTimeout()
220 return driver_->IsConnectTimeoutStarted(); in IsConnectTimeoutStarted()
264 OpenVPNDriver* driver_; // Owned by |service_|. member in shill::OpenVPNDriverTest
337 EXPECT_EQ(OpenVPNDriver::kLSBReleaseFile, driver_->lsb_release_file_.value()); in SetupLSBRelease()
338 driver_->lsb_release_file_ = lsb_release_file_; in SetupLSBRelease()
347 driver_->Connect(service_, &error); in TEST_F()
349 EXPECT_EQ(kInterfaceName, driver_->tunnel_interface_); in TEST_F()
350 EXPECT_TRUE(driver_->IsConnectTimeoutStarted()); in TEST_F()
358 driver_->Connect(service_, &error); in TEST_F()
360 EXPECT_TRUE(driver_->tunnel_interface_.empty()); in TEST_F()
361 EXPECT_FALSE(driver_->IsConnectTimeoutStarted()); in TEST_F()
374 driver_->service_ = service_; in TEST_F()
375 driver_->device_ = device_; in TEST_F()
379 driver_->Notify("up", config); in TEST_F()
380 EXPECT_FALSE(driver_->IsConnectTimeoutStarted()); in TEST_F()
384 driver_->ip_properties_.address = "1.2.3.4"; in TEST_F()
387 driver_->Notify("up", config); in TEST_F()
392 driver_->service_ = service_; in TEST_P()
393 driver_->device_ = device_; in TEST_P()
414 driver_->InitPropertyStore(&store); in TEST_P()
436 driver_->Notify("up", config); in TEST_P()
491 driver_->device_ = device_; in TEST_F()
494 driver_->Notify("fail", dict); in TEST_F()
495 EXPECT_TRUE(driver_->IsConnectTimeoutStarted()); in TEST_F()
638 driver_->ParseIPConfiguration(config, &props); in TEST_F()
643 driver_->ParseIPConfiguration(config, &props); in TEST_F()
649 driver_->ParseIPConfiguration(config, &props); in TEST_F()
670 driver_->ParseIPConfiguration(config, &props); in TEST_F()
698 driver_->ParseIPConfiguration(config, &props_without_gateway); in TEST_F()
705 driver_->ParseIPConfiguration(config, &props_with_override); in TEST_F()
712 driver_->InitOptions(&options, &error); in TEST_F()
728 driver_->rpc_task_.reset(new RPCTask(&control_, this)); in TEST_F()
729 driver_->tunnel_interface_ = kInterfaceName; in TEST_F()
735 driver_->InitOptions(&options, &error); in TEST_F()
743 EXPECT_EQ(kInterfaceName, driver_->tunnel_interface_); in TEST_F()
744 ASSERT_FALSE(driver_->tls_auth_file_.empty()); in TEST_F()
745 ExpectInFlags(options, "tls-auth", driver_->tls_auth_file_.value()); in TEST_F()
747 EXPECT_TRUE(base::ReadFileToString(driver_->tls_auth_file_, &contents)); in TEST_F()
758 driver_->rpc_task_.reset(new RPCTask(&control_, this)); in TEST_F()
759 driver_->tunnel_interface_ = kInterfaceName; in TEST_F()
765 driver_->InitOptions(&options, &error); in TEST_F()
777 EXPECT_TRUE(driver_->InitCAOptions(&options, &error)); in TEST_F()
783 EXPECT_TRUE(driver_->InitCAOptions(&options, &error)); in TEST_F()
789 EXPECT_TRUE(driver_->InitCAOptions(&options, &error)); in TEST_F()
797 EXPECT_TRUE(driver_->InitCAOptions(&options, &error)); in TEST_F()
804 EXPECT_FALSE(driver_->InitCAOptions(&options, &error)); in TEST_F()
819 EXPECT_FALSE(driver_->InitCAOptions(&options, &error)); in TEST_F()
825 EXPECT_TRUE(driver_->InitCAOptions(&options, &error)); in TEST_F()
835 driver_->InitCertificateVerifyOptions(&options); in TEST_F()
845 driver_->InitCertificateVerifyOptions(&options); in TEST_F()
855 driver_->InitCertificateVerifyOptions(&options); in TEST_F()
863 driver_->InitCertificateVerifyOptions(&options); in TEST_F()
873 driver_->InitClientAuthOptions(&options); in TEST_F()
881 driver_->InitClientAuthOptions(&options); in TEST_F()
889 driver_->InitClientAuthOptions(&options); in TEST_F()
896 driver_->InitClientAuthOptions(&options); in TEST_F()
904 driver_->InitClientAuthOptions(&options); in TEST_F()
914 driver_->InitClientAuthOptions(&options); in TEST_F()
923 driver_->InitClientAuthOptions(&options); in TEST_F()
933 driver_->InitClientAuthOptions(&options); in TEST_F()
942 driver_->InitClientAuthOptions(&options); in TEST_F()
953 EXPECT_TRUE(driver_->InitExtraCertOptions(&options, &error)); in TEST_F()
962 EXPECT_TRUE(driver_->InitExtraCertOptions(&options, &error)); in TEST_F()
977 EXPECT_FALSE(driver_->InitExtraCertOptions(&options, &error)); in TEST_F()
985 EXPECT_TRUE(driver_->InitExtraCertOptions(&options, &error)); in TEST_F()
993 driver_->InitPKCS11Options(&options); in TEST_F()
998 driver_->InitPKCS11Options(&options); in TEST_F()
1005 driver_->InitPKCS11Options(&options); in TEST_F()
1046 driver_->InitLoggingOptions(&options); in TEST_F()
1051 driver_->InitLoggingOptions(&options); in TEST_F()
1056 driver_->InitLoggingOptions(&options); in TEST_F()
1061 driver_->InitLoggingOptions(&options); in TEST_F()
1071 driver_->AppendValueOption("OpenVPN.UnknownProperty", kOption, &options)); in TEST_F()
1075 EXPECT_FALSE(driver_->AppendValueOption(kProperty, kOption, &options)); in TEST_F()
1080 EXPECT_TRUE(driver_->AppendValueOption(kProperty, kOption, &options)); in TEST_F()
1081 EXPECT_TRUE(driver_->AppendValueOption(kProperty2, kOption2, &options)); in TEST_F()
1092 driver_->AppendDelimitedValueOption( in TEST_F()
1098 driver_->AppendDelimitedValueOption(kProperty, kOption, ' ', &options)); in TEST_F()
1104 EXPECT_TRUE(driver_->AppendDelimitedValueOption( in TEST_F()
1106 EXPECT_TRUE(driver_->AppendDelimitedValueOption( in TEST_F()
1118 driver_->AppendFlag("OpenVPN.UnknownProperty", kOption, &options)); in TEST_F()
1123 EXPECT_TRUE(driver_->AppendFlag(kProperty, kOption, &options)); in TEST_F()
1124 EXPECT_TRUE(driver_->AppendFlag(kProperty2, kOption2, &options)); in TEST_F()
1131 driver_->tunnel_interface_ = kInterfaceName; in TEST_F()
1132 EXPECT_FALSE(driver_->ClaimInterface(string(kInterfaceName) + "XXX", in TEST_F()
1134 EXPECT_FALSE(driver_->device_); in TEST_F()
1145 EXPECT_EQ(0, driver_->default_service_callback_tag_); in TEST_F()
1148 EXPECT_TRUE(driver_->ClaimInterface(kInterfaceName, kInterfaceIndex)); in TEST_F()
1149 ASSERT_TRUE(driver_->device_); in TEST_F()
1150 EXPECT_EQ(kInterfaceIndex, driver_->device_->interface_index()); in TEST_F()
1151 EXPECT_EQ(kServiceCallbackTag, driver_->default_service_callback_tag_); in TEST_F()
1157 driver_->IdleService(); in TEST_F()
1164 driver_->FailService(Service::kFailureConnect, kErrorDetails); in TEST_F()
1170 driver_->Cleanup(Service::kStateIdle, in TEST_F()
1177 driver_->default_service_callback_tag_ = kServiceCallbackTag; in TEST_F()
1178 driver_->pid_ = kPID; in TEST_F()
1179 driver_->rpc_task_.reset(new RPCTask(&control_, this)); in TEST_F()
1180 driver_->tunnel_interface_ = kInterfaceName; in TEST_F()
1181 driver_->device_ = device_; in TEST_F()
1182 driver_->service_ = service_; in TEST_F()
1183 driver_->ip_properties_.address = "1.2.3.4"; in TEST_F()
1189 driver_->tls_auth_file_ = tls_auth_file; in TEST_F()
1201 driver_->Cleanup( in TEST_F()
1203 EXPECT_EQ(0, driver_->default_service_callback_tag_); in TEST_F()
1204 EXPECT_EQ(0, driver_->pid_); in TEST_F()
1205 EXPECT_FALSE(driver_->rpc_task_.get()); in TEST_F()
1206 EXPECT_TRUE(driver_->tunnel_interface_.empty()); in TEST_F()
1207 EXPECT_FALSE(driver_->device_); in TEST_F()
1208 EXPECT_FALSE(driver_->service_); in TEST_F()
1211 EXPECT_TRUE(driver_->tls_auth_file_.empty()); in TEST_F()
1212 EXPECT_TRUE(driver_->ip_properties_.address.empty()); in TEST_F()
1213 EXPECT_FALSE(driver_->IsConnectTimeoutStarted()); in TEST_F()
1219 EXPECT_FALSE(driver_->SpawnOpenVPN()); in TEST_F()
1223 driver_->tunnel_interface_ = "tun0"; in TEST_F()
1224 driver_->rpc_task_.reset(new RPCTask(&control_, this)); in TEST_F()
1237 EXPECT_FALSE(driver_->SpawnOpenVPN()); in TEST_F()
1238 EXPECT_TRUE(driver_->SpawnOpenVPN()); in TEST_F()
1239 EXPECT_EQ(kPID, driver_->pid_); in TEST_F()
1244 driver_->device_ = device_; in TEST_F()
1245 driver_->pid_ = kPID; in TEST_F()
1250 driver_->OnOpenVPNDied(2); in TEST_F()
1251 EXPECT_EQ(0, driver_->pid_); in TEST_F()
1255 driver_->device_ = device_; in TEST_F()
1256 driver_->service_ = service_; in TEST_F()
1261 driver_->Disconnect(); in TEST_F()
1262 EXPECT_FALSE(driver_->device_); in TEST_F()
1263 EXPECT_FALSE(driver_->service_); in TEST_F()
1303 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonUnknown); in TEST_F()
1313 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonOffline); in TEST_F()
1317 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonUnknown); in TEST_F()
1321 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonTLSError); in TEST_F()
1323 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonTLSError); in TEST_F()
1330 driver_->InitPropertyStore(&store); in TEST_F()
1340 driver_->InitPropertyStore(&store); in TEST_F()
1366 ASSERT_EQ(expected, driver_->GetEnvironment()); in TEST_F()
1369 EXPECT_EQ(0, driver_->GetEnvironment().size()); in TEST_F()
1388 driver_->service_ = service_; in TEST_F()
1392 driver_->OnDefaultServiceChanged(null_service); in TEST_F()
1395 driver_->OnDefaultServiceChanged(service_); in TEST_F()
1402 driver_->OnDefaultServiceChanged(mock_service); in TEST_F()
1406 driver_->OnDefaultServiceChanged(mock_service); in TEST_F()
1436 EXPECT_TRUE(driver_->WriteConfigFile(options, &config_file)); in TEST_F()