Diff
Modified: trunk/LayoutTests/ChangeLog (278670 => 278671)
--- trunk/LayoutTests/ChangeLog 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/ChangeLog 2021-06-09 21:03:57 UTC (rev 278671)
@@ -1,3 +1,53 @@
+2021-06-09 Fujii Hironori <[email protected]>
+
+ LayoutTests: Use os.path.dirname() instead of split('/') for Windows Python
+ https://bugs.webkit.org/show_bug.cgi?id=226802
+
+ Reviewed by Jonathan Bedard.
+
+ Windows Python uses backlash for path separator. Use
+ os.path.dirname() to get a parent directory.
+
+ * http/tests/appcache/resources/scope1/cookie-protected-manifest.py:
+ * http/tests/appcache/resources/scope2/cookie-protected-script.py:
+ * http/tests/cache/disk-cache/resources/make-sha1-collision.py:
+ * http/tests/cache/resources/load-and-check-referer.py:
+ * http/tests/cache/resources/post-image-to-verify.py:
+ * http/tests/cookies/multiple-redirect-and-set-cookie.py:
+ (redirect_url):
+ * http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py:
+ * http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py:
+ * http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py:
+ * http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py:
+ * http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py:
+ * http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py:
+ * http/tests/gzip-content-encoding/resources/echo-data-encoding-with-gzip.py:
+ * http/tests/media/resources/serve_video.py:
+ * http/tests/misc/resources/404image.py:
+ * http/tests/misc/resources/image-checks-for-accept.py:
+ * http/tests/misc/resources/protected/protected-image.py:
+ * http/tests/multipart/resources/multipart-nodashes.py:
+ * http/tests/multipart/resources/multipart.py:
+ * http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.py:
+ * http/tests/referrer-policy/resources/image.py:
+ * http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py:
+ * http/tests/security/mixedContent/resources/subresource/protected-image.py:
+ * http/tests/security/mixedContent/resources/subresource/protected-script.py:
+ * http/tests/security/mixedContent/resources/subresource/protected-stylesheet.py:
+ * http/tests/security/mixedContent/resources/subresource2/protected-image.py:
+ * http/tests/security/resources/abe-allow-credentials.py:
+ * http/tests/security/resources/abe-allow-star.py:
+ * http/tests/security/resources/allow-if-origin.py:
+ * http/tests/security/resources/captions-with-access-control-headers.py:
+ * http/tests/security/resources/image-access-control.py:
+ * http/tests/security/resources/image-credential-check.py:
+ * http/tests/security/resources/loading-subresources.py:
+ * http/tests/security/resources/reference-movie-cross-origin-allow.py:
+ * http/tests/security/resources/subresource1/protected-image.py:
+ * http/tests/security/resources/subresource2/protected-image.py:
+ * http/tests/security/resources/xorigincss1-allow-star.py:
+ * platform/wincairo/TestExpectations:
+
2021-06-09 Truitt Savell <[email protected]>
Skip http/tests/contentextensions/plugin-doesnt-crash.html on arm64
Modified: trunk/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -4,7 +4,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -24,4 +24,4 @@
sys.stdout.write(
'status: 404\r\n'
'Content-Type: text/html; {}\r\n\r\n'.format(cookies.get('scope', ''))
-)
\ No newline at end of file
+)
Modified: trunk/LayoutTests/http/tests/appcache/resources/scope2/cookie-protected-script.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/appcache/resources/scope2/cookie-protected-script.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/appcache/resources/scope2/cookie-protected-script.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -4,7 +4,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -23,4 +23,4 @@
if (cookieVal === "script")
document.getElementById("result1").innerHTML = "PASSED: Script Cookie is set to 'script'";
else
- document.getElementById("result1").innerHTML = "FAILED: Script Cookie should be 'script', is set to '" + cookieVal + "'";''')
\ No newline at end of file
+ document.getElementById("result1").innerHTML = "FAILED: Script Cookie should be 'script', is set to '" + cookieVal + "'";''')
Modified: trunk/LayoutTests/http/tests/cache/disk-cache/resources/make-sha1-collision.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cache/disk-cache/resources/make-sha1-collision.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cache/disk-cache/resources/make-sha1-collision.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -13,5 +13,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), path), 'rb') as file:
- sys.stdout.buffer.write(file.read().replace(b'SVN is the best!', b'SHA-1 is dead!!!'))
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), path), 'rb') as file:
+ sys.stdout.buffer.write(file.read().replace(b'SVN is the best!', b'SHA-1 is dead!!!'))
Modified: trunk/LayoutTests/http/tests/cache/resources/load-and-check-referer.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cache/resources/load-and-check-referer.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cache/resources/load-and-check-referer.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -41,10 +41,10 @@
)
sys.stdout.flush()
- with open(os.path.join('/'.join(__file__.split('/')[0:-1]), path), 'rb') as file:
+ with open(os.path.join(os.path.dirname(__file__), path), 'rb') as file:
sys.stdout.buffer.write(file.read())
else:
sys.stdout.write(
'status: 404\r\n'
'Content-Type: text/html\r\n\r\n'
- )
\ No newline at end of file
+ )
Modified: trunk/LayoutTests/http/tests/cache/resources/post-image-to-verify.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cache/resources/post-image-to-verify.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cache/resources/post-image-to-verify.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -23,7 +23,7 @@
tmpFile = open(tmpFilePath, 'w+')
tmpFile.close()
-filePath = os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass-no-cache.jpg')
+filePath = os.path.join(os.path.dirname(__file__), 'compass-no-cache.jpg')
stat = os.stat(filePath)
filemtime = stat.st_mtime
filesize = stat.st_size
@@ -45,4 +45,4 @@
sys.stdout.flush()
with open(filePath, 'rb') as file:
sys.stdout.buffer.write(file.read())
-sys.exit(0)
\ No newline at end of file
+sys.exit(0)
Modified: trunk/LayoutTests/http/tests/cookies/multiple-redirect-and-set-cookie.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cookies/multiple-redirect-and-set-cookie.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cookies/multiple-redirect-and-set-cookie.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -23,7 +23,7 @@
def redirect_url(step):
- return 'http://127.0.0.1:8000/cookies/{}?step={}&cookie_name={}'.format(__file__.split('/')[-1], step, cookie_name)
+ return 'http://127.0.0.1:8000/cookies/{}?step={}&cookie_name={}'.format(os.path.basename(__file__), step, cookie_name)
def redirect_to_step(step):
Modified: trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -5,7 +5,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -48,4 +48,4 @@
checkResult();
</script>
</body>
-</html>'''.format(json.dumps(cookies)))
\ No newline at end of file
+</html>'''.format(json.dumps(cookies)))
Modified: trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -5,7 +5,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -48,4 +48,4 @@
checkResult();
</script>
</body>
-</html>'''.format(json.dumps(cookies)))
\ No newline at end of file
+</html>'''.format(json.dumps(cookies)))
Modified: trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -5,7 +5,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -48,4 +48,4 @@
checkResult();
</script>
</body>
-</html>'''.format(json.dumps(cookies)))
\ No newline at end of file
+</html>'''.format(json.dumps(cookies)))
Modified: trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -5,7 +5,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -48,4 +48,4 @@
checkResult();
</script>
</body>
-</html>'''.format(json.dumps(cookies)))
\ No newline at end of file
+</html>'''.format(json.dumps(cookies)))
Modified: trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -5,7 +5,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -48,4 +48,4 @@
checkResult();
</script>
</body>
-</html>'''.format(json.dumps(cookies)))
\ No newline at end of file
+</html>'''.format(json.dumps(cookies)))
Modified: trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -5,7 +5,7 @@
import sys
file = __file__.split(':/cygwin')[-1]
-http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
+http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
sys.path.insert(0, http_root)
from resources.portabilityLayer import get_cookies
@@ -48,4 +48,4 @@
checkResult();
</script>
</body>
-</html>'''.format(json.dumps(cookies)))
\ No newline at end of file
+</html>'''.format(json.dumps(cookies)))
Modified: trunk/LayoutTests/http/tests/gzip-content-encoding/resources/echo-data-encoding-with-gzip.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/gzip-content-encoding/resources/echo-data-encoding-with-gzip.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/gzip-content-encoding/resources/echo-data-encoding-with-gzip.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -18,10 +18,10 @@
'Content-Encoding: gzip\r\n'.format(content_type)
)
-with gzip.open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz'), 'wb') as file:
+with gzip.open(os.path.join(os.path.dirname(__file__), 'content.gz'), 'wb') as file:
file.write(bytes(q, 'utf-8'))
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz'), 'rb') as file:
+with open(os.path.join(os.path.dirname(__file__), 'content.gz'), 'rb') as file:
content = file.read()
sys.stdout.write('Content-Length: {}\r\n\r\n'.format(len(content)))
@@ -28,5 +28,5 @@
sys.stdout.flush()
sys.stdout.buffer.write(content)
-if os.path.isfile(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz')):
- os.remove(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz'))
\ No newline at end of file
+if os.path.isfile(os.path.join(os.path.dirname(__file__), 'content.gz')):
+ os.remove(os.path.join(os.path.dirname(__file__), 'content.gz'))
Modified: trunk/LayoutTests/http/tests/media/resources/serve_video.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/media/resources/serve_video.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/media/resources/serve_video.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -158,7 +158,7 @@
for play_file in play_files:
file_index_in_db += 1
- if file_name.split('/')[-1] == play_file['fileName']:
+ if os.path.basename(file_name) == play_file['fileName']:
file_in_db = True
break
Modified: trunk/LayoutTests/http/tests/misc/resources/404image.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/misc/resources/404image.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/misc/resources/404image.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -12,5 +12,5 @@
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass.jpg'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'compass.jpg'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/misc/resources/image-checks-for-accept.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/misc/resources/image-checks-for-accept.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/misc/resources/image-checks-for-accept.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -13,7 +13,7 @@
)
sys.stdout.flush()
- with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass.jpg'), 'rb') as fn:
+ with open(os.path.join(os.path.dirname(__file__), 'compass.jpg'), 'rb') as fn:
sys.stdout.buffer.write(fn.read())
else:
- sys.stdout.write('Content-Type: text/html\r\n\r\n')
\ No newline at end of file
+ sys.stdout.write('Content-Type: text/html\r\n\r\n')
Modified: trunk/LayoutTests/http/tests/misc/resources/protected/protected-image.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/misc/resources/protected/protected-image.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/misc/resources/protected/protected-image.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -18,6 +18,6 @@
'status: 401\r\n\r\n'.format(uri)
)
else:
- with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
+ with open(os.path.join(os.path.dirname(__file__), '../../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
sys.stdout.buffer.write(file.read())
- sys.stdout.write('Content-Type: image/png\r\n\r\n')
\ No newline at end of file
+ sys.stdout.write('Content-Type: image/png\r\n\r\n')
Modified: trunk/LayoutTests/http/tests/multipart/resources/multipart-nodashes.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/multipart/resources/multipart-nodashes.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/multipart/resources/multipart-nodashes.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -14,5 +14,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'green-100x100.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'green-100x100.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/multipart/resources/multipart.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/multipart/resources/multipart.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/multipart/resources/multipart.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -25,7 +25,7 @@
if img is None:
break
- with open(os.path.join('/'.join(__file__.split('/')[0:-1]), img), 'rb') as file:
+ with open(os.path.join(os.path.dirname(__file__), img), 'rb') as file:
images.append(file.read())
i += 1
@@ -49,4 +49,4 @@
break
if wait is not None:
- time.sleep(float(wait))
\ No newline at end of file
+ time.sleep(float(wait))
Modified: trunk/LayoutTests/http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -9,5 +9,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'pass.docx'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'pass.docx'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/referrer-policy/resources/image.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/referrer-policy/resources/image.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/referrer-policy/resources/image.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -14,5 +14,5 @@
sys.stdout.write('Content-type: image/png\r\n\r\n')
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), '../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -3,7 +3,7 @@
import os
import sys
-filename = os.path.join('/'.join(__file__.split('/')[0:-4]), 'resources', 'square.png')
+filename = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))), 'resources', 'square.png')
if not os.path.isfile(filename):
sys.stderr.write('File {} does not exist\n'.format(filename))
@@ -19,4 +19,4 @@
'Content-Security-Policy: default-src \'none\'\r\n'
'Content-Length: {}\r\n'
'Content-Type: image/png\r\n\r\n{}'.format(filesize, contents)
-)
\ No newline at end of file
+)
Modified: trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-image.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-image.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-image.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -25,5 +25,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-script.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-script.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-script.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -23,5 +23,5 @@
sys.stdout.write('Content-Type: text/_javascript_\r\n\r\n')
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/resources/alert-fail.js'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/resources/alert-fail.js'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-stylesheet.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-stylesheet.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-stylesheet.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -24,5 +24,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/resources/style-set-red.css'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/resources/style-set-red.css'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource2/protected-image.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource2/protected-image.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource2/protected-image.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -23,5 +23,5 @@
sys.stdout.write('Content-Type: image/png\r\n\r\n')
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/abe-allow-credentials.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/abe-allow-credentials.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/abe-allow-credentials.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -10,5 +10,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'abe.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'abe.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/abe-allow-star.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/abe-allow-star.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/abe-allow-star.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -14,5 +14,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'abe.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'abe.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/allow-if-origin.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/allow-if-origin.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/allow-if-origin.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -35,8 +35,8 @@
sys.stdout.write(
'Content-Length: {}\r\n'
- 'Content-Type: {}\r\n\r\n'.format(os.path.getsize(os.path.join('/'.join(__file__.split('/')[0:-1]), name)), contentType)
+ 'Content-Type: {}\r\n\r\n'.format(os.path.getsize(os.path.join(os.path.dirname(__file__), name)), contentType)
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), name), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), name), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/captions-with-access-control-headers.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/captions-with-access-control-headers.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/captions-with-access-control-headers.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -15,5 +15,5 @@
sys.stdout.write('Content-Type: text/vtt\r\n\r\n')
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'captions.vtt'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'captions.vtt'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/image-access-control.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/image-access-control.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/image-access-control.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -12,5 +12,5 @@
sys.stdout.write('Content-Type: image/png\r\n\r\n')
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), query.get('file', [''])[0]), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), query.get('file', [''])[0]), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/image-credential-check.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/image-credential-check.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/image-credential-check.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -11,7 +11,7 @@
if username == 'testusername' and password == 'testpassword':
sys.stdout.write('Content-Type: image/png\r\n\r\n')
sys.stdout.flush()
- with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'black-square.png'), 'rb') as file:
+ with open(os.path.join(os.path.dirname(__file__), 'black-square.png'), 'rb') as file:
sys.stdout.buffer.write(file.read())
sys.exit(0)
@@ -19,4 +19,4 @@
'Content-Type: text/html\r\n'
'status: 401\r\n'
'WWW-Authenticate: Basic realm="test realm"\r\n\r\n'
-)
\ No newline at end of file
+)
Modified: trunk/LayoutTests/http/tests/security/resources/loading-subresources.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/loading-subresources.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/loading-subresources.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -9,5 +9,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'loading-subresources.css'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'loading-subresources.css'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/reference-movie-cross-origin-allow.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/reference-movie-cross-origin-allow.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/reference-movie-cross-origin-allow.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -16,9 +16,9 @@
'Last-Modified: Thu, 01 Jan 2000 00:00:00 GMT\r\n'
'Cache-Control: max-age=0\r\n'
'Content-Type: text/html\r\n'
- 'Content-Length: {}\r\n\r\n'.format(os.path.getsize(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../media/resources/reference.mov')))
+ 'Content-Length: {}\r\n\r\n'.format(os.path.getsize(os.path.join(os.path.dirname(__file__), '../../media/resources/reference.mov')))
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../media/resources/reference.mov'), 'rb') as file:
+with open(os.path.join(os.path.dirname(__file__), '../../media/resources/reference.mov'), 'rb') as file:
sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/subresource1/protected-image.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/subresource1/protected-image.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/subresource1/protected-image.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -23,5 +23,5 @@
sys.stdout.write('Content-Type: image/png\r\n\r\n')
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/subresource2/protected-image.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/subresource2/protected-image.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/subresource2/protected-image.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -21,5 +21,5 @@
sys.stdout.write('Content-Type: image/png\r\n\r\n')
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/http/tests/security/resources/xorigincss1-allow-star.py (278670 => 278671)
--- trunk/LayoutTests/http/tests/security/resources/xorigincss1-allow-star.py 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/http/tests/security/resources/xorigincss1-allow-star.py 2021-06-09 21:03:57 UTC (rev 278671)
@@ -9,5 +9,5 @@
)
sys.stdout.flush()
-with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'xorigincss1.css'), 'rb') as file:
- sys.stdout.buffer.write(file.read())
\ No newline at end of file
+with open(os.path.join(os.path.dirname(__file__), 'xorigincss1.css'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (278670 => 278671)
--- trunk/LayoutTests/platform/wincairo/TestExpectations 2021-06-09 20:54:31 UTC (rev 278670)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations 2021-06-09 21:03:57 UTC (rev 278671)
@@ -2085,7 +2085,6 @@
http/tests/cookies/document-cookie-after-showModalDialog.html [ Timeout ]
http/tests/cookies/document-cookie-during-iframe-parsing.html [ Timeout ]
http/tests/cookies/document-cookie-multiple-cookies.html [ Failure ]
-http/tests/cookies/multiple-redirect-and-set-cookie.py [ Timeout ]
http/tests/css/css-image-loading.html [ Pass Failure ]
http/tests/misc/form-post-textplain-cross-site.html [ Failure ]
http/tests/misc/form-post-textplain.html [ Failure ]