summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-03-25 14:48:13 +0000
committerBen Murdoch <benm@google.com>2010-04-01 16:39:53 +0100
commit2bb2553a20f33a2587ea33619d6be92343101eba (patch)
treed1a4e02bd5939ad16b18451f7419c8bca99e5c40 /tests/DumpRenderTree
parent0348440e4ad665f9fa7ed73a5c6b533e183a9e1f (diff)
downloadframeworks_base-2bb2553a20f33a2587ea33619d6be92343101eba.zip
frameworks_base-2bb2553a20f33a2587ea33619d6be92343101eba.tar.gz
frameworks_base-2bb2553a20f33a2587ea33619d6be92343101eba.tar.bz2
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
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java1
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java7
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java
index d10e382..77fd3ed 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java
@@ -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
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
index 24f58b2..81d5b08 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
@@ -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();
}