Cherry pick from master.
Fixes DumpRenderTree to re-use HTTP authentication credentials This is required for layout test http/tests/appcache/auth.html Bug: 2098423 Change-Id: Ic9531e3c23a2fa9ebfab70cde3172550f572a404
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user