summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 14:31:02 +0000
committerlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 14:31:02 +0000
commit361e405b6c0df9d9415c4d158b0ae071fd50016d (patch)
tree34b4c9a42da5b7058de7bfc96ee98847aca5e317 /remoting
parent3f5a6d6cbf959cccddd2cb944eb93cd8f963f4a4 (diff)
downloadchromium_src-361e405b6c0df9d9415c4d158b0ae071fd50016d.zip
chromium_src-361e405b6c0df9d9415c4d158b0ae071fd50016d.tar.gz
chromium_src-361e405b6c0df9d9415c4d158b0ae071fd50016d.tar.bz2
Disable authenticator unittests on Android
These tests are disabled since they require certificates to be copied to the device, and net::SSLServerSocket is not implemented for OpenSSL. BUG=326702 Review URL: https://codereview.chromium.org/112983006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/protocol/negotiating_authenticator_unittest.cc32
-rw-r--r--remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc11
-rw-r--r--remoting/protocol/third_party_authenticator_unittest.cc19
-rw-r--r--remoting/protocol/v2_authenticator_unittest.cc11
4 files changed, 51 insertions, 22 deletions
diff --git a/remoting/protocol/negotiating_authenticator_unittest.cc b/remoting/protocol/negotiating_authenticator_unittest.cc
index bd68b70..55830f7 100644
--- a/remoting/protocol/negotiating_authenticator_unittest.cc
+++ b/remoting/protocol/negotiating_authenticator_unittest.cc
@@ -147,7 +147,14 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorTest);
};
-TEST_F(NegotiatingAuthenticatorTest, SuccessfulAuthHmac) {
+// These tests use net::SSLServerSocket which is not implemented for OpenSSL.
+#if defined(USE_OPENSSL)
+#define MAYBE(x) DISABLED_##x
+#else
+#define MAYBE(x) x
+#endif
+
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(SuccessfulAuthHmac)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kNoClientId, kNoPairedSecret, kTestPin, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
@@ -155,14 +162,14 @@ TEST_F(NegotiatingAuthenticatorTest, SuccessfulAuthHmac) {
AuthenticationMethod::Spake2(AuthenticationMethod::HMAC_SHA256));
}
-TEST_F(NegotiatingAuthenticatorTest, SuccessfulAuthPlain) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(SuccessfulAuthPlain)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kNoClientId, kNoPairedSecret, kTestPin, kTestPin,
AuthenticationMethod::NONE, false));
VerifyAccepted(AuthenticationMethod::Spake2(AuthenticationMethod::NONE));
}
-TEST_F(NegotiatingAuthenticatorTest, InvalidSecretHmac) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(InvalidSecretHmac)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kNoClientId, kNoPairedSecret, kTestPinBad, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
@@ -171,7 +178,7 @@ TEST_F(NegotiatingAuthenticatorTest, InvalidSecretHmac) {
VerifyRejected(Authenticator::INVALID_CREDENTIALS);
}
-TEST_F(NegotiatingAuthenticatorTest, InvalidSecretPlain) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(InvalidSecretPlain)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kNoClientId, kNoPairedSecret, kTestPin, kTestPinBad,
AuthenticationMethod::NONE, false));
@@ -180,7 +187,7 @@ TEST_F(NegotiatingAuthenticatorTest, InvalidSecretPlain) {
VerifyRejected(Authenticator::INVALID_CREDENTIALS);
}
-TEST_F(NegotiatingAuthenticatorTest, IncompatibleMethods) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(IncompatibleMethods)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kNoClientId, kNoPairedSecret, kTestPin, kTestPinBad,
AuthenticationMethod::NONE, true));
@@ -189,7 +196,7 @@ TEST_F(NegotiatingAuthenticatorTest, IncompatibleMethods) {
VerifyRejected(Authenticator::PROTOCOL_ERROR);
}
-TEST_F(NegotiatingAuthenticatorTest, PairingNotSupported) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(PairingNotSupported)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kTestClientId, kTestPairedSecret, kTestPin, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
@@ -198,7 +205,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingNotSupported) {
AuthenticationMethod::Spake2(AuthenticationMethod::HMAC_SHA256));
}
-TEST_F(NegotiatingAuthenticatorTest, PairingSupportedButNotPaired) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(PairingSupportedButNotPaired)) {
CreatePairingRegistry(false);
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kNoClientId, kNoPairedSecret, kTestPin, kTestPin,
@@ -207,7 +214,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingSupportedButNotPaired) {
VerifyAccepted(AuthenticationMethod::Spake2Pair());
}
-TEST_F(NegotiatingAuthenticatorTest, PairingRevokedPinOkay) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(PairingRevokedPinOkay)) {
CreatePairingRegistry(false);
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kTestClientId, kTestPairedSecret, kTestPin, kTestPin,
@@ -216,7 +223,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingRevokedPinOkay) {
VerifyAccepted(AuthenticationMethod::Spake2Pair());
}
-TEST_F(NegotiatingAuthenticatorTest, PairingRevokedPinBad) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(PairingRevokedPinBad)) {
CreatePairingRegistry(false);
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kTestClientId, kTestPairedSecret, kTestPinBad, kTestPin,
@@ -225,7 +232,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingRevokedPinBad) {
VerifyRejected(Authenticator::INVALID_CREDENTIALS);
}
-TEST_F(NegotiatingAuthenticatorTest, PairingSucceeded) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(PairingSucceeded)) {
CreatePairingRegistry(true);
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kTestClientId, kTestPairedSecret, kTestPinBad, kTestPin,
@@ -234,7 +241,8 @@ TEST_F(NegotiatingAuthenticatorTest, PairingSucceeded) {
VerifyAccepted(AuthenticationMethod::Spake2Pair());
}
-TEST_F(NegotiatingAuthenticatorTest, PairingSucceededInvalidSecretButPinOkay) {
+TEST_F(NegotiatingAuthenticatorTest,
+ MAYBE(PairingSucceededInvalidSecretButPinOkay)) {
CreatePairingRegistry(true);
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kTestClientId, kTestPairedSecretBad, kTestPin, kTestPin,
@@ -243,7 +251,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingSucceededInvalidSecretButPinOkay) {
VerifyAccepted(AuthenticationMethod::Spake2Pair());
}
-TEST_F(NegotiatingAuthenticatorTest, PairingFailedInvalidSecretAndPin) {
+TEST_F(NegotiatingAuthenticatorTest, MAYBE(PairingFailedInvalidSecretAndPin)) {
CreatePairingRegistry(true);
ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
kTestClientId, kTestPairedSecretBad, kTestPinBad, kTestPin,
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
index abf2880..0477db4 100644
--- a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
+++ b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
@@ -137,8 +137,15 @@ class SslHmacChannelAuthenticatorTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(SslHmacChannelAuthenticatorTest);
};
+// These tests use net::SSLServerSocket which is not implemented for OpenSSL.
+#if defined(USE_OPENSSL)
+#define MAYBE(x) DISABLED_##x
+#else
+#define MAYBE(x) x
+#endif
+
// Verify that a channel can be connected using a valid shared secret.
-TEST_F(SslHmacChannelAuthenticatorTest, SuccessfulAuth) {
+TEST_F(SslHmacChannelAuthenticatorTest, MAYBE(SuccessfulAuth)) {
client_auth_ = SslHmacChannelAuthenticator::CreateForClient(
host_cert_, kTestSharedSecret);
host_auth_ = SslHmacChannelAuthenticator::CreateForHost(
@@ -158,7 +165,7 @@ TEST_F(SslHmacChannelAuthenticatorTest, SuccessfulAuth) {
}
// Verify that channels cannot be using invalid shared secret.
-TEST_F(SslHmacChannelAuthenticatorTest, InvalidChannelSecret) {
+TEST_F(SslHmacChannelAuthenticatorTest, MAYBE(InvalidChannelSecret)) {
client_auth_ = SslHmacChannelAuthenticator::CreateForClient(
host_cert_, kTestSharedSecretBad);
host_auth_ = SslHmacChannelAuthenticator::CreateForHost(
diff --git a/remoting/protocol/third_party_authenticator_unittest.cc b/remoting/protocol/third_party_authenticator_unittest.cc
index 0298877..46644d3 100644
--- a/remoting/protocol/third_party_authenticator_unittest.cc
+++ b/remoting/protocol/third_party_authenticator_unittest.cc
@@ -122,7 +122,14 @@ class ThirdPartyAuthenticatorTest : public AuthenticatorTestBase {
DISALLOW_COPY_AND_ASSIGN(ThirdPartyAuthenticatorTest);
};
-TEST_F(ThirdPartyAuthenticatorTest, SuccessfulAuth) {
+// These tests use net::SSLServerSocket which is not implemented for OpenSSL.
+#if defined(USE_OPENSSL)
+#define MAYBE(x) DISABLED_##x
+#else
+#define MAYBE(x) x
+#endif
+
+TEST_F(ThirdPartyAuthenticatorTest, MAYBE(SuccessfulAuth)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators());
ASSERT_NO_FATAL_FAILURE(RunHostInitiatedAuthExchange());
ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, client_->state());
@@ -149,7 +156,7 @@ TEST_F(ThirdPartyAuthenticatorTest, SuccessfulAuth) {
tester.CheckResults();
}
-TEST_F(ThirdPartyAuthenticatorTest, ClientNoSecret) {
+TEST_F(ThirdPartyAuthenticatorTest, MAYBE(ClientNoSecret)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators());
ASSERT_NO_FATAL_FAILURE(RunHostInitiatedAuthExchange());
ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, client_->state());
@@ -161,7 +168,7 @@ TEST_F(ThirdPartyAuthenticatorTest, ClientNoSecret) {
ASSERT_EQ(Authenticator::REJECTED, client_->state());
}
-TEST_F(ThirdPartyAuthenticatorTest, InvalidToken) {
+TEST_F(ThirdPartyAuthenticatorTest, MAYBE(InvalidToken)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators());
ASSERT_NO_FATAL_FAILURE(RunHostInitiatedAuthExchange());
ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, client_->state());
@@ -174,7 +181,7 @@ TEST_F(ThirdPartyAuthenticatorTest, InvalidToken) {
ASSERT_EQ(Authenticator::REJECTED, host_->state());
}
-TEST_F(ThirdPartyAuthenticatorTest, CannotFetchToken) {
+TEST_F(ThirdPartyAuthenticatorTest, MAYBE(CannotFetchToken)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators());
ASSERT_NO_FATAL_FAILURE(RunHostInitiatedAuthExchange());
ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, client_->state());
@@ -187,7 +194,7 @@ TEST_F(ThirdPartyAuthenticatorTest, CannotFetchToken) {
}
// Test that negotiation stops when the fake authentication is rejected.
-TEST_F(ThirdPartyAuthenticatorTest, HostBadSecret) {
+TEST_F(ThirdPartyAuthenticatorTest, MAYBE(HostBadSecret)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators());
ASSERT_NO_FATAL_FAILURE(RunHostInitiatedAuthExchange());
ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, client_->state());
@@ -201,7 +208,7 @@ TEST_F(ThirdPartyAuthenticatorTest, HostBadSecret) {
ASSERT_EQ(Authenticator::REJECTED, client_->state());
}
-TEST_F(ThirdPartyAuthenticatorTest, ClientBadSecret) {
+TEST_F(ThirdPartyAuthenticatorTest, MAYBE(ClientBadSecret)) {
ASSERT_NO_FATAL_FAILURE(InitAuthenticators());
ASSERT_NO_FATAL_FAILURE(RunHostInitiatedAuthExchange());
ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, client_->state());
diff --git a/remoting/protocol/v2_authenticator_unittest.cc b/remoting/protocol/v2_authenticator_unittest.cc
index 9af517b..f57b6c3 100644
--- a/remoting/protocol/v2_authenticator_unittest.cc
+++ b/remoting/protocol/v2_authenticator_unittest.cc
@@ -51,7 +51,14 @@ class V2AuthenticatorTest : public AuthenticatorTestBase {
DISALLOW_COPY_AND_ASSIGN(V2AuthenticatorTest);
};
-TEST_F(V2AuthenticatorTest, SuccessfulAuth) {
+// These tests use net::SSLServerSocket which is not implemented for OpenSSL.
+#if defined(USE_OPENSSL)
+#define MAYBE(x) DISABLED_##x
+#else
+#define MAYBE(x) x
+#endif
+
+TEST_F(V2AuthenticatorTest, MAYBE(SuccessfulAuth)) {
ASSERT_NO_FATAL_FAILURE(
InitAuthenticators(kTestSharedSecret, kTestSharedSecret));
ASSERT_NO_FATAL_FAILURE(RunAuthExchange());
@@ -72,7 +79,7 @@ TEST_F(V2AuthenticatorTest, SuccessfulAuth) {
}
// Verify that connection is rejected when secrets don't match.
-TEST_F(V2AuthenticatorTest, InvalidSecret) {
+TEST_F(V2AuthenticatorTest, MAYBE(InvalidSecret)) {
ASSERT_NO_FATAL_FAILURE(
InitAuthenticators(kTestSharedSecretBad, kTestSharedSecret));
ASSERT_NO_FATAL_FAILURE(RunAuthExchange());