Bug 1366969 - fix some WPTs to not re-use the same 'valid once per session' auth landing, which incorrectly causes test-failures. r=annevk
authorThomas Wisniewski <twisniewski@mozilla.com>
Tue, 12 Mar 2019 09:35:11 +0000
changeset 521595 15affcdf9d0d
parent 521594 83169352c088
child 521596 7a1ad6647c22
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersannevk
bugs1366969
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1366969 - fix some WPTs to not re-use the same 'valid once per session' auth landing, which incorrectly causes test-failures. r=annevk fix some WPTs to not re-use the same 'valid once per session' auth landing, which incorrectly causes test-failures. Differential Revision: https://phabricator.services.mozilla.com/D22878
testing/web-platform/meta/xhr/send-authentication-basic.htm.ini
testing/web-platform/tests/xhr/resources/auth10/auth.py
testing/web-platform/tests/xhr/resources/auth11/auth.py
testing/web-platform/tests/xhr/send-authentication-basic-cors-not-enabled.htm
testing/web-platform/tests/xhr/send-authentication-basic-repeat-no-args.htm
deleted file mode 100644
--- a/testing/web-platform/meta/xhr/send-authentication-basic.htm.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[send-authentication-basic.htm]
-  disabled:
-    if verify and (os == "linux"): fails in verify mode
-  [XMLHttpRequest: send() - "Basic" authenticated requests with user name and password passed to open()]
-    expected: FAIL
-
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/xhr/resources/auth10/auth.py
@@ -0,0 +1,10 @@
+import imp
+import os
+
+here = os.path.split(os.path.abspath(__file__))[0]
+
+def main(request, response):
+    auth = imp.load_source("", os.path.join(here,
+                                            "..",
+                                            "authentication.py"))
+    return auth.main(request, response)
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/xhr/resources/auth11/auth.py
@@ -0,0 +1,10 @@
+import imp
+import os
+
+here = os.path.split(os.path.abspath(__file__))[0]
+
+def main(request, response):
+    auth = imp.load_source("", os.path.join(here,
+                                            "..",
+                                            "authentication.py"))
+    return auth.main(request, response)
--- a/testing/web-platform/tests/xhr/send-authentication-basic-cors-not-enabled.htm
+++ b/testing/web-platform/tests/xhr/send-authentication-basic-cors-not-enabled.htm
@@ -11,17 +11,17 @@
   <body>
     <div id="log"></div>
     <script>
       test(function() {
         var client = new XMLHttpRequest(),
           urlstart = 'www1.'+location.host + location.pathname.replace(/\/[^\/]*$/, '/')
         client.withCredentials = true
         user = token()
-        client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false, user, 'pass')
+        client.open("GET", location.protocol+'//'+urlstart + "resources/auth10/auth.py", false, user, 'pass')
         client.setRequestHeader("x-user", user)
         assert_throws("NetworkError", function(){ client.send(null) })
         assert_equals(client.responseText, '')
         assert_equals(client.status, 0)
         assert_equals(client.getResponseHeader('x-challenge'), null)
       }, document.title)
     </script>
   </body>
--- a/testing/web-platform/tests/xhr/send-authentication-basic-repeat-no-args.htm
+++ b/testing/web-platform/tests/xhr/send-authentication-basic-repeat-no-args.htm
@@ -10,22 +10,22 @@
   </head>
   <body>
     <div id="log"></div>
     <script>
       test(function() {
         var client = new XMLHttpRequest(),
           urlstart = location.host + location.pathname.replace(/\/[^\/]*$/, '/'),
           user = token()
-        client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false, user, 'pass')
+        client.open("GET", location.protocol+'//'+urlstart + "resources/auth11/auth.py", false, user, 'pass')
         client.setRequestHeader("x-user", user)
         client.send(null)
         // Repeat request but *without* credentials in the open() call.
         // Is the UA supposed to cache credentials from above request and use them? Yes.
-        client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false)
+        client.open("GET", location.protocol+'//'+urlstart + "resources/auth11/auth.py", false)
         client.setRequestHeader("x-user", user)
         client.send(null)
 
         assert_equals(client.responseText, user + "\n" + 'pass')
         //assert_equals(client.getResponseHeader('x-challenge'), 'DID-NOT')
 
       }, document.title)
     </script>