import org.chromium.net.HttpUrlRequestFactory;
import org.chromium.net.HttpUrlRequestFactoryConfig;
+import java.util.regex.Pattern;
+
/**
* Tests for {@link ChunkedWritableByteChannel}
*/
HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory(
getInstrumentation().getContext(), config);
assertNotNull("Factory should be created", factory);
- assertTrue("Factory should not be legacy",
- "HttpUrlConnection" != factory.getName());
+ assertTrue("Factory should be Chromium/n.n.n.n/r",
+ Pattern.matches("Chromium/\\d+\\.\\d+\\.\\d+\\.\\d+@\\d+",
+ factory.getName()));
}
@SmallTest
HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory(
getInstrumentation().getContext(), config);
assertNotNull("Factory should be created", factory);
- assertEquals("HttpUrlConnection", factory.getName());
+ assertTrue("Factory should be HttpUrlConnection/n.n.n.n@r",
+ Pattern.matches("HttpUrlConnection/\\d+\\.\\d+\\.\\d+\\.\\d+@\\d+",
+ factory.getName()));
}
}