Index: components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java |
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java |
index c9775417e69e652c655d5ebfdbd3f201a112905d..4d0a63f8a4e8d3c36e94263bcd508a5a03cc2f30 100644 |
--- a/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java |
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java |
@@ -62,6 +62,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testErrorCodeIfPinDoesNotMatch() throws Exception { |
byte[] nonMatchingHash = generateSomeSha256(); |
addPkpSha256(mServerHost, nonMatchingHash, EXCLUDE_SUBDOMAINS, DISTANT_FUTURE); |
@@ -80,6 +81,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testSuccessIfPinMatches() throws Exception { |
// Get PKP hash of the real certificate |
X509Certificate cert = readCertFromFileInPemFormat(CERT_USED); |
@@ -102,6 +104,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testIncludeSubdomainsFlagEqualTrue() throws Exception { |
byte[] nonMatchingHash = generateSomeSha256(); |
addPkpSha256(mDomain, nonMatchingHash, INCLUDE_SUBDOMAINS, DISTANT_FUTURE); |
@@ -121,6 +124,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testIncludeSubdomainsFlagEqualFalse() throws Exception { |
byte[] nonMatchingHash = generateSomeSha256(); |
addPkpSha256(mDomain, nonMatchingHash, EXCLUDE_SUBDOMAINS, DISTANT_FUTURE); |
@@ -140,6 +144,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testSuccessIfNoPinSpecified() throws Exception { |
byte[] nonMatchingHash = generateSomeSha256(); |
addPkpSha256("otherhost.com", nonMatchingHash, INCLUDE_SUBDOMAINS, DISTANT_FUTURE); |
@@ -158,6 +163,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testSoonExpiringPin() throws Exception { |
final int tenSecondsAhead = 10; |
byte[] nonMatchingHash = generateSomeSha256(); |
@@ -177,6 +183,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testRecentlyExpiredPin() throws Exception { |
final int oneSecondAgo = -1; |
byte[] nonMatchingHash = generateSomeSha256(); |
@@ -195,6 +202,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testPinsAreNotPersisted() throws Exception { |
byte[] nonMatchingHash = generateSomeSha256(); |
addPkpSha256(mServerHost, nonMatchingHash, EXCLUDE_SUBDOMAINS, DISTANT_FUTURE); |
@@ -221,6 +229,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testHostNameArgumentValidation() throws Exception { |
final String label63 = "123456789-123456789-123456789-123456789-123456789-123456789-123"; |
final String host255 = label63 + "." + label63 + "." + label63 + "." + label63; |
@@ -275,6 +284,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
pauljensen
2015/12/21 20:27:58
shouldn't this test pass as the checks are in Cron
Charles
2015/12/21 23:36:26
Done.
|
public void testNullArguments() { |
verifyExceptionWhenAddPkpArgumentIsNull(true, false, false); |
verifyExceptionWhenAddPkpArgumentIsNull(false, true, false); |
@@ -287,6 +297,7 @@ public class PkpTest extends CronetTestBase { |
*/ |
@SmallTest |
@Feature({"Cronet"}) |
+ @OnlyRunNativeCronet |
public void testIllegalArgumentExceptionWhenPinValueIsSHA1() { |
byte[] sha1 = new byte[20]; |
try { |