Home
last modified time | relevance | path

Searched refs:path (Results 1 – 9 of 9) sorted by relevance

/webkit/webkit/src/main/java/androidx/webkit/internal/
DAssetHelper.java53 private static @NonNull InputStream handleSvgzStream(@NonNull String path, in handleSvgzStream() argument
55 return path.endsWith(".svgz") ? new GZIPInputStream(stream) : stream; in handleSvgzStream()
58 private static @NonNull String removeLeadingSlash(@NonNull String path) { in removeLeadingSlash() argument
59 if (path.length() > 1 && path.charAt(0) == '/') { in removeLeadingSlash()
60 path = path.substring(1); in removeLeadingSlash()
62 return path; in removeLeadingSlash()
82 public @NonNull InputStream openResource(@NonNull String path) in openResource() argument
84 path = removeLeadingSlash(path); in openResource()
86 String[] pathSegments = path.split("/", -1); in openResource()
88 throw new IllegalArgumentException("Incorrect resource path: " + path); in openResource()
[all …]
/webkit/webkit/src/main/java/androidx/webkit/
DWebViewAssetLoader.java144 @Nullable WebResourceResponse handle(@NonNull String path); in handle() argument
185 public @Nullable WebResourceResponse handle(@NonNull String path) { in handle() argument
187 InputStream is = mAssetHelper.openAsset(path); in handle()
188 String mimeType = AssetHelper.guessMimeType(path); in handle()
191 Log.e(TAG, "Error opening asset path: " + path, e); in handle()
235 public @Nullable WebResourceResponse handle(@NonNull String path) { in handle() argument
237 InputStream is = mAssetHelper.openResource(path); in handle()
238 String mimeType = AssetHelper.guessMimeType(path); in handle()
241 Log.e(TAG, "Resource not found from the path: " + path, e); in handle()
243 Log.e(TAG, "Error opening resource from the path: " + path, e); in handle()
[all …]
/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/
DSafeBrowsingHelpers.java29 .path("/s/malware.html")
35 .path("/s/phishing.html")
41 .path("/s/unwanted.html")
47 .path("/s/trick_to_bill.html")
53 .path("/")
DRestrictedContentHelpers.java27 .path("/s/restricted_content.html")
33 .path("/")
DAssetLoaderSimpleActivity.java82 Uri path = new Uri.Builder() in onCreate() local
90 webView.loadUrl(path.toString()); in onCreate()
DAssetLoaderInternalStorageActivity.java122 Uri path = new Uri.Builder() in loadFileAssetInWebView() local
128 mWebView.loadUrl(path.toString()); in loadFileAssetInWebView()
/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/
DWebViewAssetLoaderTest.java64 public WebResourceResponse handle(@NonNull String path) { in handle() argument
150 public @NonNull InputStream openAsset(String path) throws IOException { in testHostAssets()
151 if (path.equals("www/test.html")) { in testHostAssets()
154 throw new IOException("Unexpected path: " + path); in testHostAssets()
174 public @NonNull InputStream openResource(String path) throws IOException { in testHostResources()
175 if (path.equals("raw/test.html")) { in testHostResources()
178 throw new IOException("Unexpected path: " + path); in testHostResources()
275 builder.addPathHandler("/test_path_" + Integer.toString(i) + "/", path -> { in testMultiplePathHandlers()
299 public WebResourceResponse handle(@NonNull String path) { in handle() argument
301 if (path.endsWith(".zip")) { in handle()
[all …]
DWebStorageTest.java177 int getCountForPath(String path) { in getCountForPath() argument
179 return mCounts.getOrDefault(path, 0); in getCountForPath()
/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/internal/
DAssetHelperTest.java276 private InputStream assertOpen(String path) throws IOException { in assertOpen() argument
277 InputStream stream = mAssetHelper.openAsset(path); in assertOpen()
278 Assert.assertNotNull("Failed to open \"" + path + "\"", stream); in assertOpen()