[EFL] [WK2] Some authentication tests fail in WebKit2
authorch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 13:18:57 +0000 (13:18 +0000)
committerch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 13:18:57 +0000 (13:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=106407

Reviewed by Kenneth Rohde Christiansen.

Tools:

Add patch from upstream for libsoup 2.40 to fix several authentication
test cases.

* efl/jhbuild.modules:
* efl/patches/libsoup-2.40-auth-fix.patch: Added.

LayoutTests:

Unskip several authentication test cases now that we cherry-picked
the needed libsoup fix from upstream.

* platform/efl-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145209 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/efl-wk2/TestExpectations
Tools/ChangeLog
Tools/efl/jhbuild.modules
Tools/efl/patches/libsoup-2.40-auth-fix.patch [new file with mode: 0644]

index 03f5d9c..55c0bee 100644 (file)
@@ -1,3 +1,15 @@
+2013-03-08  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        [EFL] [WK2] Some authentication tests fail in WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=106407
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskip several authentication test cases now that we cherry-picked
+        the needed libsoup fix from upstream.
+
+        * platform/efl-wk2/TestExpectations:
+
 2013-03-08  Zan Dobersek  <zdobersek@igalia.com>
 
         Unreviewed GTK gardening.
index 5015235..d298001 100644 (file)
@@ -471,12 +471,6 @@ webkit.org/b/109435 webgl/conformance/textures/tex-image-and-sub-image-2d-with-v
 webkit.org/b/109435 webgl/conformance/textures/texture-mips.html [ Failure ]
 webkit.org/b/109435 webgl/conformance/textures/texture-size-limit.html [ Failure ]
 
-# Likely failing because of an old version of libsoup in the jhbuild.
-webkit.org/b/106407 http/tests/loading/basic-auth-resend-wrong-credentials.html [ Failure ]
-webkit.org/b/106407 http/tests/security/401-logout/401-logout.php [ Failure ]
-webkit.org/b/106407 http/tests/xmlhttprequest/failed-auth.html [ Failure ]
-webkit.org/b/106407 http/tests/xmlhttprequest/remember-bad-password.html [ Failure ]
-
 # Most probably failures are result of delay in scrolling caused by 'delegated scrolling' usage.
 webkit.org/b/107286 fast/css/sticky/sticky-margins.html [ ImageOnlyFailure ]
 webkit.org/b/107286 fast/css/sticky/sticky-writing-mode-vertical-lr.html [ ImageOnlyFailure ]
index 144d243..d52b932 100644 (file)
@@ -1,3 +1,16 @@
+2013-03-08  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        [EFL] [WK2] Some authentication tests fail in WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=106407
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add patch from upstream for libsoup 2.40 to fix several authentication
+        test cases.
+
+        * efl/jhbuild.modules:
+        * efl/patches/libsoup-2.40-auth-fix.patch: Added.
+
 2013-03-08  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Enable Web Audio in development builds
index 56e8f72..99c278e 100644 (file)
     </dependencies>
     <branch module="/pub/gnome/sources/libsoup/2.40/libsoup-2.40.3.tar.xz" version="2.40.3"
             repo="ftp.gnome.org"
-            hash="sha256:82c92f1f6f4cbfd501df783ed87e7de9410b4a12a3bb0b19c64722e185d2bbc9"/>
+            hash="sha256:82c92f1f6f4cbfd501df783ed87e7de9410b4a12a3bb0b19c64722e185d2bbc9">
+      <patch file="libsoup-2.40-auth-fix.patch" strip="1"/>
+    </branch>
   </autotools>
 
   <autotools id="fontconfig" autogen-sh="configure">
diff --git a/Tools/efl/patches/libsoup-2.40-auth-fix.patch b/Tools/efl/patches/libsoup-2.40-auth-fix.patch
new file mode 100644 (file)
index 0000000..343dc27
--- /dev/null
@@ -0,0 +1,50 @@
+From f9816e366e53004618abcee1741885b69e9466a8 Mon Sep 17 00:00:00 2001
+From: Martin Robinson <mrobinson@igalia.com>
+Date: Tue, 4 Dec 2012 17:48:45 -0800
+Subject: [PATCH] Better handle the failure of URI embedded credentials
+
+When using credentials embedded in the URI, clear them so that a failure
+will trigger the authentication signal and the use of previously
+remembered credentials.
+---
+ libsoup/soup-auth-manager.c |    7 ++++---
+ tests/auth-test.c           |    5 ++++-
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/libsoup/soup-auth-manager.c b/libsoup/soup-auth-manager.c
+index b3ef9f6..2a2030c 100644
+--- a/libsoup/soup-auth-manager.c
++++ b/libsoup/soup-auth-manager.c
+@@ -411,9 +411,10 @@ authenticate_auth (SoupAuthManager *manager, SoupAuth *auth,
+       /* If a password is specified explicitly in the URI, use it
+        * even if the auth had previously already been authenticated.
+        */
+-      if (uri->password) {
+-              if (!prior_auth_failed)
+-                      soup_auth_authenticate (auth, uri->user, uri->password);
++      if (uri->password && uri->user) {
++              soup_auth_authenticate (auth, uri->user, uri->password);
++              soup_uri_set_password (uri, NULL);
++              soup_uri_set_user (uri, NULL);
+       } else if (!soup_auth_is_authenticated (auth) && can_interact) {
+               soup_auth_manager_emit_authenticate (manager, msg, auth,
+                                                    prior_auth_failed);
+diff --git a/tests/auth-test.c b/tests/auth-test.c
+index 85c4d41..334033b 100644
+--- a/tests/auth-test.c
++++ b/tests/auth-test.c
+@@ -146,7 +146,10 @@ static SoupAuthTest main_tests[] = {
+         "Digest/realm1/not/", "1", FALSE, /* should not be used */ "1", SOUP_STATUS_UNAUTHORIZED },
+       { "Make sure we've forgotten it",
+-        "Digest/realm1/", "", FALSE, "0", SOUP_STATUS_UNAUTHORIZED }
++        "Digest/realm1/", "", FALSE, "0", SOUP_STATUS_UNAUTHORIZED },
++
++      { "Fail with URI-embedded password, then use right password in the authenticate signal",
++        "Basic/realm3/", "43", TRUE, "43", SOUP_STATUS_OK }
+ };
+ static const char *auths[] = {
+-- 
+1.7.10.4
+