Commit b0b78ba7 authored by mef's avatar mef Committed by Commit bot

Cronet version now uses first 8 characters of LASTCHANGE string.

BUG=

Review URL: https://codereview.chromium.org/537573004

Cr-Commit-Position: refs/heads/master@{#293210}
parent e0c052dd
...@@ -10,6 +10,6 @@ public class Version { ...@@ -10,6 +10,6 @@ public class Version {
public static final String LAST_CHANGE = "@LASTCHANGE@"; public static final String LAST_CHANGE = "@LASTCHANGE@";
public static String getVersion() { public static String getVersion() {
return CRONET_VERSION + "@" + LAST_CHANGE; return CRONET_VERSION + "@" + LAST_CHANGE.substring(0, 8);
} }
} }
...@@ -24,9 +24,10 @@ public class HttpUrlRequestFactoryTest extends InstrumentationTestCase { ...@@ -24,9 +24,10 @@ public class HttpUrlRequestFactoryTest extends InstrumentationTestCase {
HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory( HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory(
getInstrumentation().getContext(), config); getInstrumentation().getContext(), config);
assertNotNull("Factory should be created", factory); assertNotNull("Factory should be created", factory);
assertTrue("Factory should be Chromium/n.n.n.n@r", assertTrue("Factory should be Chromium/n.n.n.n@r but is " +
factory.getName(),
Pattern.matches("Chromium/\\d+\\.\\d+\\.\\d+\\.\\d+@\\w+", Pattern.matches("Chromium/\\d+\\.\\d+\\.\\d+\\.\\d+@\\w+",
factory.getName())); factory.getName()));
} }
@SmallTest @SmallTest
...@@ -38,9 +39,10 @@ public class HttpUrlRequestFactoryTest extends InstrumentationTestCase { ...@@ -38,9 +39,10 @@ public class HttpUrlRequestFactoryTest extends InstrumentationTestCase {
HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory( HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory(
getInstrumentation().getContext(), config); getInstrumentation().getContext(), config);
assertNotNull("Factory should be created", factory); assertNotNull("Factory should be created", factory);
assertTrue("Factory should be HttpUrlConnection/n.n.n.n@r", assertTrue("Factory should be HttpUrlConnection/n.n.n.n@r but is " +
factory.getName(),
Pattern.matches( Pattern.matches(
"HttpUrlConnection/\\d+\\.\\d+\\.\\d+\\.\\d+@\\w+", "HttpUrlConnection/\\d+\\.\\d+\\.\\d+\\.\\d+@\\w+",
factory.getName())); factory.getName()));
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment