Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bb2553a authored by Steve Block's avatar Steve Block Committed by Ben Murdoch
Browse files

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
parent 0348440e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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
+7 −0
Original line number Diff line number Diff line
@@ -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();
        }