Loading core/java/android/webkit/CallbackProxy.java +16 −21 Original line number Diff line number Diff line Loading @@ -736,14 +736,12 @@ class CallbackProxy extends Handler { } break; case AUTH_CREDENTIALS: if (mWebViewClient != null) { String host = msg.getData().getString("host"); String realm = msg.getData().getString("realm"); username = msg.getData().getString("username"); password = msg.getData().getString("password"); mWebViewClient.onReceivedHttpAuthCredentials( mWebView, host, realm, username, password); } mWebView.setHttpAuthUsernamePassword( host, realm, username, password); break; } } Loading Loading @@ -929,19 +927,6 @@ class CallbackProxy extends Handler { sendMessage(msg); } public void onReceivedHttpAuthCredentials(String host, String realm, String username, String password) { if (mWebViewClient == null) { return; } Message msg = obtainMessage(AUTH_CREDENTIALS); msg.getData().putString("host", host); msg.getData().putString("realm", realm); msg.getData().putString("username", username); msg.getData().putString("password", password); sendMessage(msg); } /** * @hide - hide this because it contains a parameter of type SslError. * SslError is located in a hidden package. Loading Loading @@ -1078,6 +1063,16 @@ class CallbackProxy extends Handler { return false; } public void onReceivedHttpAuthCredentials(String host, String realm, String username, String password) { Message msg = obtainMessage(AUTH_CREDENTIALS); msg.getData().putString("host", host); msg.getData().putString("realm", realm); msg.getData().putString("username", username); msg.getData().putString("password", password); sendMessage(msg); } //-------------------------------------------------------------------------- // WebChromeClient methods //-------------------------------------------------------------------------- Loading core/java/android/webkit/HttpAuthHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ public class HttpAuthHandler extends Handler { } /** * Informs the proxy of a new set of credentials. * Informs the WebView of a new set of credentials. * @hide Pending API council review */ public static void onReceivedCredentials(LoadListener loader, Loading core/java/android/webkit/WebViewClient.java +0 −16 Original line number Diff line number Diff line Loading @@ -196,22 +196,6 @@ public class WebViewClient { handler.cancel(); } /** * Notify the host application that authentication credentials have been * supplied from Script. * The default behavior is to do nothing. * @hide Pending API council review * * @param view The WebView that is initiating the callback. * @param host The host requiring authentication. * @param realm A description to help store user credentials for future * @param username The username * @param password The password */ public void onReceivedHttpAuthCredentials(WebView view, String host, String realm, String username, String password) { } /** * Give the host application a chance to handle the key event synchronously. * e.g. menu shortcut key events need to be filtered this way. If return Loading tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java +0 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ public class FileFilter { // This first block of tests are for HTML5 features, for which Android // should pass all tests. They are skipped only temporarily. // TODO: Fix these failing tests and remove them from this list. ignoreResultList.add("http/tests/appcache/auth.html"); // DumpRenderTree throws exception when authentication fails ignoreResultList.add("http/tests/appcache/empty-manifest.html"); // flaky ignoreResultList.add("http/tests/appcache/foreign-iframe-main.html"); // flaky - skips states ignoreResultList.add("http/tests/appcache/manifest-with-empty-file.html"); // flaky Loading tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -515,6 +515,13 @@ public class TestShellActivity extends Activity implements LayoutTestController @Override public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) { if (handler.useHttpAuthUsernamePassword() && view != null) { String[] credentials = view.getHttpAuthUsernamePassword(host, realm); if (credentials != null && credentials.length == 2) { handler.proceed(credentials[0], credentials[1]); return; } } handler.cancel(); } Loading Loading
core/java/android/webkit/CallbackProxy.java +16 −21 Original line number Diff line number Diff line Loading @@ -736,14 +736,12 @@ class CallbackProxy extends Handler { } break; case AUTH_CREDENTIALS: if (mWebViewClient != null) { String host = msg.getData().getString("host"); String realm = msg.getData().getString("realm"); username = msg.getData().getString("username"); password = msg.getData().getString("password"); mWebViewClient.onReceivedHttpAuthCredentials( mWebView, host, realm, username, password); } mWebView.setHttpAuthUsernamePassword( host, realm, username, password); break; } } Loading Loading @@ -929,19 +927,6 @@ class CallbackProxy extends Handler { sendMessage(msg); } public void onReceivedHttpAuthCredentials(String host, String realm, String username, String password) { if (mWebViewClient == null) { return; } Message msg = obtainMessage(AUTH_CREDENTIALS); msg.getData().putString("host", host); msg.getData().putString("realm", realm); msg.getData().putString("username", username); msg.getData().putString("password", password); sendMessage(msg); } /** * @hide - hide this because it contains a parameter of type SslError. * SslError is located in a hidden package. Loading Loading @@ -1078,6 +1063,16 @@ class CallbackProxy extends Handler { return false; } public void onReceivedHttpAuthCredentials(String host, String realm, String username, String password) { Message msg = obtainMessage(AUTH_CREDENTIALS); msg.getData().putString("host", host); msg.getData().putString("realm", realm); msg.getData().putString("username", username); msg.getData().putString("password", password); sendMessage(msg); } //-------------------------------------------------------------------------- // WebChromeClient methods //-------------------------------------------------------------------------- Loading
core/java/android/webkit/HttpAuthHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ public class HttpAuthHandler extends Handler { } /** * Informs the proxy of a new set of credentials. * Informs the WebView of a new set of credentials. * @hide Pending API council review */ public static void onReceivedCredentials(LoadListener loader, Loading
core/java/android/webkit/WebViewClient.java +0 −16 Original line number Diff line number Diff line Loading @@ -196,22 +196,6 @@ public class WebViewClient { handler.cancel(); } /** * Notify the host application that authentication credentials have been * supplied from Script. * The default behavior is to do nothing. * @hide Pending API council review * * @param view The WebView that is initiating the callback. * @param host The host requiring authentication. * @param realm A description to help store user credentials for future * @param username The username * @param password The password */ public void onReceivedHttpAuthCredentials(WebView view, String host, String realm, String username, String password) { } /** * Give the host application a chance to handle the key event synchronously. * e.g. menu shortcut key events need to be filtered this way. If return Loading
tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java +0 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ public class FileFilter { // This first block of tests are for HTML5 features, for which Android // should pass all tests. They are skipped only temporarily. // TODO: Fix these failing tests and remove them from this list. ignoreResultList.add("http/tests/appcache/auth.html"); // DumpRenderTree throws exception when authentication fails ignoreResultList.add("http/tests/appcache/empty-manifest.html"); // flaky ignoreResultList.add("http/tests/appcache/foreign-iframe-main.html"); // flaky - skips states ignoreResultList.add("http/tests/appcache/manifest-with-empty-file.html"); // flaky Loading
tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -515,6 +515,13 @@ public class TestShellActivity extends Activity implements LayoutTestController @Override public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) { if (handler.useHttpAuthUsernamePassword() && view != null) { String[] credentials = view.getHttpAuthUsernamePassword(host, realm); if (credentials != null && credentials.length == 2) { handler.proceed(credentials[0], credentials[1]); return; } } handler.cancel(); } Loading