⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278671 in webkit


Ignore:
Timestamp:
Jun 9, 2021, 2:03:57 PM (5 years ago)
Author:
Fujii Hironori
Message:

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:
Location:
trunk/LayoutTests
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r278666 r278671  
     12021-06-09  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        LayoutTests: Use os.path.dirname() instead of split('/') for Windows Python
     4        https://bugs.webkit.org/show_bug.cgi?id=226802
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        Windows Python uses backlash for path separator. Use
     9        os.path.dirname() to get a parent directory.
     10
     11        * http/tests/appcache/resources/scope1/cookie-protected-manifest.py:
     12        * http/tests/appcache/resources/scope2/cookie-protected-script.py:
     13        * http/tests/cache/disk-cache/resources/make-sha1-collision.py:
     14        * http/tests/cache/resources/load-and-check-referer.py:
     15        * http/tests/cache/resources/post-image-to-verify.py:
     16        * http/tests/cookies/multiple-redirect-and-set-cookie.py:
     17        (redirect_url):
     18        * http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py:
     19        * http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py:
     20        * http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py:
     21        * http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py:
     22        * http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py:
     23        * http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py:
     24        * http/tests/gzip-content-encoding/resources/echo-data-encoding-with-gzip.py:
     25        * http/tests/media/resources/serve_video.py:
     26        * http/tests/misc/resources/404image.py:
     27        * http/tests/misc/resources/image-checks-for-accept.py:
     28        * http/tests/misc/resources/protected/protected-image.py:
     29        * http/tests/multipart/resources/multipart-nodashes.py:
     30        * http/tests/multipart/resources/multipart.py:
     31        * http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.py:
     32        * http/tests/referrer-policy/resources/image.py:
     33        * http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py:
     34        * http/tests/security/mixedContent/resources/subresource/protected-image.py:
     35        * http/tests/security/mixedContent/resources/subresource/protected-script.py:
     36        * http/tests/security/mixedContent/resources/subresource/protected-stylesheet.py:
     37        * http/tests/security/mixedContent/resources/subresource2/protected-image.py:
     38        * http/tests/security/resources/abe-allow-credentials.py:
     39        * http/tests/security/resources/abe-allow-star.py:
     40        * http/tests/security/resources/allow-if-origin.py:
     41        * http/tests/security/resources/captions-with-access-control-headers.py:
     42        * http/tests/security/resources/image-access-control.py:
     43        * http/tests/security/resources/image-credential-check.py:
     44        * http/tests/security/resources/loading-subresources.py:
     45        * http/tests/security/resources/reference-movie-cross-origin-allow.py:
     46        * http/tests/security/resources/subresource1/protected-image.py:
     47        * http/tests/security/resources/subresource2/protected-image.py:
     48        * http/tests/security/resources/xorigincss1-allow-star.py:
     49        * platform/wincairo/TestExpectations:
     50
    1512021-06-09  Truitt Savell  <tsavell@apple.com>
    252
  • trunk/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.py

    r275332 r278671  
    55
    66file = __file__.split(':/cygwin')[-1]
    7 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     7http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    88sys.path.insert(0, http_root)
    99
  • trunk/LayoutTests/http/tests/appcache/resources/scope2/cookie-protected-script.py

    r275332 r278671  
    55
    66file = __file__.split(':/cygwin')[-1]
    7 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     7http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    88sys.path.insert(0, http_root)
    99
  • trunk/LayoutTests/http/tests/cache/disk-cache/resources/make-sha1-collision.py

    r274574 r278671  
    1414
    1515sys.stdout.flush()
    16 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), path), 'rb') as file:
     16with open(os.path.join(os.path.dirname(__file__), path), 'rb') as file:
    1717    sys.stdout.buffer.write(file.read().replace(b'SVN is the best!', b'SHA-1 is dead!!!'))
  • trunk/LayoutTests/http/tests/cache/resources/load-and-check-referer.py

    r274574 r278671  
    4242
    4343    sys.stdout.flush()
    44     with open(os.path.join('/'.join(__file__.split('/')[0:-1]), path), 'rb') as file:
     44    with open(os.path.join(os.path.dirname(__file__), path), 'rb') as file:
    4545        sys.stdout.buffer.write(file.read())
    4646else:
  • trunk/LayoutTests/http/tests/cache/resources/post-image-to-verify.py

    r274574 r278671  
    2424tmpFile.close()
    2525
    26 filePath = os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass-no-cache.jpg')
     26filePath = os.path.join(os.path.dirname(__file__), 'compass-no-cache.jpg')
    2727stat = os.stat(filePath)
    2828filemtime = stat.st_mtime
  • trunk/LayoutTests/http/tests/cookies/multiple-redirect-and-set-cookie.py

    r275762 r278671  
    2424
    2525def redirect_url(step):
    26     return 'http://127.0.0.1:8000/cookies/{}?step={}&cookie_name={}'.format(__file__.split('/')[-1], step, cookie_name)
     26    return 'http://127.0.0.1:8000/cookies/{}?step={}&cookie_name={}'.format(os.path.basename(__file__), step, cookie_name)
    2727
    2828
  • trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py

    r275315 r278671  
    66
    77file = __file__.split(':/cygwin')[-1]
    8 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     8http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    99sys.path.insert(0, http_root)
    1010
  • trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py

    r277534 r278671  
    66
    77file = __file__.split(':/cygwin')[-1]
    8 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     8http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    99sys.path.insert(0, http_root)
    1010
  • trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py

    r277534 r278671  
    66
    77file = __file__.split(':/cygwin')[-1]
    8 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     8http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    99sys.path.insert(0, http_root)
    1010
  • trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py

    r277534 r278671  
    66
    77file = __file__.split(':/cygwin')[-1]
    8 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     8http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    99sys.path.insert(0, http_root)
    1010
  • trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py

    r275315 r278671  
    66
    77file = __file__.split(':/cygwin')[-1]
    8 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     8http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    99sys.path.insert(0, http_root)
    1010
  • trunk/LayoutTests/http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py

    r275315 r278671  
    66
    77file = __file__.split(':/cygwin')[-1]
    8 http_root = '/'.join(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))).split('/')[:-1])
     8http_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))))
    99sys.path.insert(0, http_root)
    1010
  • trunk/LayoutTests/http/tests/gzip-content-encoding/resources/echo-data-encoding-with-gzip.py

    r274743 r278671  
    1919)
    2020
    21 with gzip.open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz'), 'wb') as file:
     21with gzip.open(os.path.join(os.path.dirname(__file__), 'content.gz'), 'wb') as file:
    2222    file.write(bytes(q, 'utf-8'))
    2323
    24 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz'), 'rb') as file:
     24with open(os.path.join(os.path.dirname(__file__), 'content.gz'), 'rb') as file:
    2525    content = file.read()
    2626
     
    2929    sys.stdout.buffer.write(content)
    3030
    31 if os.path.isfile(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz')):
    32     os.remove(os.path.join('/'.join(__file__.split('/')[0:-1]), 'content.gz'))
     31if os.path.isfile(os.path.join(os.path.dirname(__file__), 'content.gz')):
     32    os.remove(os.path.join(os.path.dirname(__file__), 'content.gz'))
  • trunk/LayoutTests/http/tests/media/resources/serve_video.py

    r277964 r278671  
    159159    for play_file in play_files:
    160160        file_index_in_db += 1
    161         if file_name.split('/')[-1] == play_file['fileName']:
     161        if os.path.basename(file_name) == play_file['fileName']:
    162162            file_in_db = True
    163163            break
  • trunk/LayoutTests/http/tests/misc/resources/404image.py

    r273819 r278671  
    1313sys.stdout.flush()
    1414
    15 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass.jpg'), 'rb') as file:
     15with open(os.path.join(os.path.dirname(__file__), 'compass.jpg'), 'rb') as file:
    1616    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/misc/resources/image-checks-for-accept.py

    r273819 r278671  
    1414
    1515    sys.stdout.flush()
    16     with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass.jpg'), 'rb') as fn:
     16    with open(os.path.join(os.path.dirname(__file__), 'compass.jpg'), 'rb') as fn:
    1717        sys.stdout.buffer.write(fn.read())
    1818else:
  • trunk/LayoutTests/http/tests/misc/resources/protected/protected-image.py

    r275427 r278671  
    1919    )
    2020else:
    21     with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
     21    with open(os.path.join(os.path.dirname(__file__), '../../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
    2222        sys.stdout.buffer.write(file.read())
    2323        sys.stdout.write('Content-Type: image/png\r\n\r\n')
  • trunk/LayoutTests/http/tests/multipart/resources/multipart-nodashes.py

    r274803 r278671  
    1515
    1616sys.stdout.flush()
    17 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'green-100x100.png'), 'rb') as file:
     17with open(os.path.join(os.path.dirname(__file__), 'green-100x100.png'), 'rb') as file:
    1818    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/multipart/resources/multipart.py

    r275424 r278671  
    2626        break
    2727
    28     with open(os.path.join('/'.join(__file__.split('/')[0:-1]), img), 'rb') as file:
     28    with open(os.path.join(os.path.dirname(__file__), img), 'rb') as file:
    2929        images.append(file.read())
    3030    i += 1
  • trunk/LayoutTests/http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.py

    r274489 r278671  
    1010
    1111sys.stdout.flush()
    12 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'pass.docx'), 'rb') as file:
     12with open(os.path.join(os.path.dirname(__file__), 'pass.docx'), 'rb') as file:
    1313    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/referrer-policy/resources/image.py

    r275427 r278671  
    1515
    1616sys.stdout.flush()
    17 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
     17with open(os.path.join(os.path.dirname(__file__), '../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
    1818    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py

    r275917 r278671  
    44import sys
    55
    6 filename = os.path.join('/'.join(__file__.split('/')[0:-4]), 'resources', 'square.png')
     6filename = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))), 'resources', 'square.png')
    77
    88if not os.path.isfile(filename):
  • trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-image.py

    r274244 r278671  
    2626
    2727sys.stdout.flush()
    28 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
     28with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
    2929    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-script.py

    r274244 r278671  
    2424
    2525sys.stdout.flush()
    26 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/resources/alert-fail.js'), 'rb') as file:
     26with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/resources/alert-fail.js'), 'rb') as file:
    2727    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource/protected-stylesheet.py

    r274244 r278671  
    2525
    2626sys.stdout.flush()
    27 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/resources/style-set-red.css'), 'rb') as file:
     27with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/resources/style-set-red.css'), 'rb') as file:
    2828    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/mixedContent/resources/subresource2/protected-image.py

    r274244 r278671  
    2424
    2525sys.stdout.flush()
    26 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
     26with open(os.path.join(os.path.dirname(__file__), '../../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
    2727    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/abe-allow-credentials.py

    r274244 r278671  
    1111
    1212sys.stdout.flush()
    13 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'abe.png'), 'rb') as file:
     13with open(os.path.join(os.path.dirname(__file__), 'abe.png'), 'rb') as file:
    1414    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/abe-allow-star.py

    r274244 r278671  
    1515
    1616sys.stdout.flush()
    17 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'abe.png'), 'rb') as file:
     17with open(os.path.join(os.path.dirname(__file__), 'abe.png'), 'rb') as file:
    1818    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/allow-if-origin.py

    r276602 r278671  
    3636sys.stdout.write(
    3737    'Content-Length: {}\r\n'
    38     'Content-Type: {}\r\n\r\n'.format(os.path.getsize(os.path.join('/'.join(__file__.split('/')[0:-1]), name)), contentType)
     38    'Content-Type: {}\r\n\r\n'.format(os.path.getsize(os.path.join(os.path.dirname(__file__), name)), contentType)
    3939)
    4040sys.stdout.flush()
    41 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), name), 'rb') as file:
     41with open(os.path.join(os.path.dirname(__file__), name), 'rb') as file:
    4242    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/captions-with-access-control-headers.py

    r274244 r278671  
    1616
    1717sys.stdout.flush()
    18 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'captions.vtt'), 'rb') as file:
     18with open(os.path.join(os.path.dirname(__file__), 'captions.vtt'), 'rb') as file:
    1919    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/image-access-control.py

    r274244 r278671  
    1313
    1414sys.stdout.flush()
    15 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), query.get('file', [''])[0]), 'rb') as file:
     15with open(os.path.join(os.path.dirname(__file__), query.get('file', [''])[0]), 'rb') as file:
    1616    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/image-credential-check.py

    r274244 r278671  
    1212    sys.stdout.write('Content-Type: image/png\r\n\r\n')
    1313    sys.stdout.flush()
    14     with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'black-square.png'), 'rb') as file:
     14    with open(os.path.join(os.path.dirname(__file__), 'black-square.png'), 'rb') as file:
    1515        sys.stdout.buffer.write(file.read())
    1616    sys.exit(0)
  • trunk/LayoutTests/http/tests/security/resources/loading-subresources.py

    r274244 r278671  
    1010
    1111sys.stdout.flush()
    12 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'loading-subresources.css'), 'rb') as file:
     12with open(os.path.join(os.path.dirname(__file__), 'loading-subresources.css'), 'rb') as file:
    1313    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/reference-movie-cross-origin-allow.py

    r275917 r278671  
    1717    'Cache-Control: max-age=0\r\n'
    1818    'Content-Type: text/html\r\n'
    19     'Content-Length: {}\r\n\r\n'.format(os.path.getsize(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../media/resources/reference.mov')))
     19    'Content-Length: {}\r\n\r\n'.format(os.path.getsize(os.path.join(os.path.dirname(__file__), '../../media/resources/reference.mov')))
    2020)
    2121
    2222sys.stdout.flush()
    23 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../media/resources/reference.mov'), 'rb') as file:
     23with open(os.path.join(os.path.dirname(__file__), '../../media/resources/reference.mov'), 'rb') as file:
    2424    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/subresource1/protected-image.py

    r274244 r278671  
    2424sys.stdout.write('Content-Type: image/png\r\n\r\n')
    2525sys.stdout.flush()
    26 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
     26with open(os.path.join(os.path.dirname(__file__), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
    2727    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/subresource2/protected-image.py

    r274244 r278671  
    2222sys.stdout.write('Content-Type: image/png\r\n\r\n')
    2323sys.stdout.flush()
    24 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
     24with open(os.path.join(os.path.dirname(__file__), '../../contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
    2525    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/http/tests/security/resources/xorigincss1-allow-star.py

    r274244 r278671  
    1010
    1111sys.stdout.flush()
    12 with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'xorigincss1.css'), 'rb') as file:
     12with open(os.path.join(os.path.dirname(__file__), 'xorigincss1.css'), 'rb') as file:
    1313    sys.stdout.buffer.write(file.read())
  • trunk/LayoutTests/platform/wincairo/TestExpectations

    r278594 r278671  
    20862086http/tests/cookies/document-cookie-during-iframe-parsing.html [ Timeout ]
    20872087http/tests/cookies/document-cookie-multiple-cookies.html [ Failure ]
    2088 http/tests/cookies/multiple-redirect-and-set-cookie.py [ Timeout ]
    20892088http/tests/css/css-image-loading.html [ Pass Failure ]
    20902089http/tests/misc/form-post-textplain-cross-site.html [ Failure ]
Note: See TracChangeset for help on using the changeset viewer.