Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'

This commit is contained in:
WPT Sync Bot 2021-09-07 11:16:33 +00:00 committed by cybai
parent 35e95f55a1
commit 58e8ee674b
9438 changed files with 266112 additions and 106976 deletions

View file

@ -1,9 +1,6 @@
# Copyright (c) 2010 Philip Taylor
# Released under the BSD license and W3C Test Suite License: see LICENSE.txt
# Current code status:
#
# This was originally written for use at
# This was originally written by Philip Taylor for use at
# http://philip.html5.org/tests/canvas/suite/tests/
#
# It has been adapted for use with the Web Platform Test Suite suite at
@ -385,6 +382,13 @@ def genTestUtils(TESTOUTPUTDIR, IMAGEOUTPUTDIR, TEMPLATEFILE, NAME2DIRFILE, ISOF
desc = test.get('desc', '')
escaped_desc = simpleEscapeJS(desc)
attributes = test.get('attributes', '')
if attributes:
context_args = "'2d', %s" % attributes.strip()
attributes = ', ' + attributes.strip()
else:
context_args = "'2d'"
for (variant, extra_script) in script_variants:
name_variant = '' if not variant else '.' + variant
@ -397,7 +401,8 @@ def genTestUtils(TESTOUTPUTDIR, IMAGEOUTPUTDIR, TEMPLATEFILE, NAME2DIRFILE, ISOF
'fonts':fonts, 'fonthack':fonthack, 'timeout': timeout,
'canvas':canvas, 'expected':expectation_html, 'code':code,
'scripts':scripts + extra_script,
'fallback':fallback
'fallback':fallback, 'attributes':attributes,
'context_args': context_args
}
f = codecs.open('%s/%s%s.html' % (TESTOUTPUTDIR, mapped_name, name_variant), 'w', 'utf-8')