mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision b'e0214318249f1b6ea09b837db6eac7b0facd1b52'
This commit is contained in:
parent
3429e8fe3b
commit
febcb80385
141 changed files with 2568 additions and 986 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Usage: python3 generate.py
|
||||
#
|
||||
# This will remove all existing files in the generated directories and generate new tests.
|
||||
# This will remove all existing .html files in the generated directories and generate new tests.
|
||||
|
||||
|
||||
# Notes on potential confusion with the 3 string substitution features in different layers:
|
||||
|
@ -168,6 +168,62 @@ tentative_tests = [
|
|||
u'false',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'template-link-stylesheet',
|
||||
u'utf-8',
|
||||
u'<template><link rel=stylesheet href="{}"></template>',
|
||||
None,
|
||||
u'false',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'template-img-src',
|
||||
u'utf-8',
|
||||
u'<template><img src="{}"></template>',
|
||||
None,
|
||||
u'false',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'template-shadowrootmode-script-src',
|
||||
u'utf-8',
|
||||
u'<div><template shadowrootmode="closed"><script src="{}"></script></template></div>',
|
||||
None,
|
||||
u'true',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'template-shadowrootmode-link-stylesheet',
|
||||
u'utf-8',
|
||||
u'<div><template shadowrootmode="closed"><link rel=stylesheet href="{}"></template></div>',
|
||||
None,
|
||||
u'true',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'template-shadowrootmode-img-src',
|
||||
u'utf-8',
|
||||
u'<div><template shadowrootmode="closed"><img src="{}"></template></div>',
|
||||
None,
|
||||
u'true',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'nested-template-shadowrootmode-1',
|
||||
u'utf-8',
|
||||
u'<template><div><template shadowrootmode="closed"><script src="{}"></script></template></div></template>',
|
||||
None,
|
||||
u'false',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'nested-template-shadowrootmode-2',
|
||||
u'utf-8',
|
||||
u'<div><template shadowrootmode="closed"><template><script src="{}"></script></template></template></div>',
|
||||
None,
|
||||
u'false',
|
||||
u'true'
|
||||
),
|
||||
(
|
||||
u'link-no-rel',
|
||||
u'utf-8',
|
||||
|
@ -593,9 +649,14 @@ template_prerender_linked = u"""{preamble}
|
|||
|
||||
# Generate tests
|
||||
|
||||
# wipe target_dir
|
||||
# wipe target_dir of HTML files
|
||||
if os.path.isdir(target_dir):
|
||||
shutil.rmtree(target_dir)
|
||||
for root, dirs, files in os.walk(target_dir):
|
||||
for name in files:
|
||||
if name.endswith('.html'):
|
||||
path = os.path.join(root, name)
|
||||
if os.path.isfile(path):
|
||||
os.remove(path)
|
||||
|
||||
def write_file(path, content):
|
||||
path = os.path.join(target_dir, path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue