mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision e426a6933a05bf144eba06a1d4c47ba876a4e2d1
This commit is contained in:
parent
415b26e4f1
commit
5e5eccabf8
495 changed files with 14920 additions and 784 deletions
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
import re
|
||||
|
||||
re_testname = re.compile(r"^appearance-.+\d\d\d\.html$")
|
||||
re_link_match = re.compile(r'<link rel="(mis)?match"')
|
||||
|
||||
files = {}
|
||||
|
||||
parentdir = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir))
|
||||
assert parentdir.endswith('/css-ui')
|
||||
|
||||
for filename in os.listdir(parentdir):
|
||||
path = os.path.join(parentdir, filename)
|
||||
if os.path.isfile(path) and re_testname.search(filename) and not filename in files:
|
||||
with open(path, "r") as file:
|
||||
files[filename] = file.read()
|
||||
|
||||
warning = """<!-- DO NOT EDIT THIS FILE.
|
||||
Edit the appearance-* file instead and then run:
|
||||
./tools/appearance-build-webkit-reftests.py
|
||||
-->
|
||||
"""
|
||||
|
||||
for filename, text in files.items():
|
||||
if re_link_match.search(text):
|
||||
with open(os.path.join(parentdir, filename.replace("appearance-", "webkit-appearance-")), "w") as outfile:
|
||||
outfile.write(warning + text.replace("appearance:", "-webkit-appearance:"))
|
Loading…
Add table
Add a link
Reference in a new issue