summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2010-03-24 13:32:54 -0700
committerGuang Zhu <guangzhu@google.com>2010-03-24 13:32:54 -0700
commitc5b6ba019f00b5f83b3b6838fc7d0bd08bb84dd7 (patch)
tree00b86a1576091abb493821deb031aa9118ed5607 /tests
parent184f08bc3dca3352b2fd37c75a13640c167f4269 (diff)
downloadpackages_apps_browser-c5b6ba019f00b5f83b3b6838fc7d0bd08bb84dd7.zip
packages_apps_browser-c5b6ba019f00b5f83b3b6838fc7d0bd08bb84dd7.tar.gz
packages_apps_browser-c5b6ba019f00b5f83b3b6838fc7d0bd08bb84dd7.tar.bz2
Prevent HTTP auth dialog from shwoing during test
Change-Id: Ia10e72eec60d8c2155df95dec06334beb9feaab6
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/browser/PopularUrlsTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/src/com/android/browser/PopularUrlsTest.java b/tests/src/com/android/browser/PopularUrlsTest.java
index db557e5..d3806a0 100644
--- a/tests/src/com/android/browser/PopularUrlsTest.java
+++ b/tests/src/com/android/browser/PopularUrlsTest.java
@@ -36,6 +36,7 @@ import android.net.http.SslError;
import android.os.Environment;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
+import android.webkit.HttpAuthHandler;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.SslErrorHandler;
@@ -197,6 +198,14 @@ public class PopularUrlsTest extends ActivityInstrumentationTestCase2<BrowserAct
handler.proceed();
}
+ /**
+ * Ignores http auth with dummy username and password
+ */
+ @Override
+ public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler,
+ String host, String realm) {
+ handler.proceed("user", "passwd");
+ }
});
}