mirror of
https://github.com/servo/servo.git
synced 2025-08-31 01:58:23 +01:00
Make the Ahem font available to test-css and test-wpt tests.
Provide a user stylesheet with an `@font-face` rule for it. Fix #6195. Many previously-failing tests now pass, and a few previously-passing now fail. Among the latter, `font-family-013.htm` and `fonts-013.htm` are testing that the Ahem font is not used for characters it doesn’t have a glyph for. They were passing because Ahem was not available at all, and now fail because we don’t implement font fallback correctly. The others also use Ahem, but I don’t understand yet what’s going on exactly.
This commit is contained in:
parent
5e008d1cbd
commit
649301fd35
469 changed files with 82 additions and 1344 deletions
|
@ -26,7 +26,8 @@ def check_args(**kwargs):
|
|||
|
||||
def browser_kwargs(**kwargs):
|
||||
return {"binary": kwargs["binary"],
|
||||
"debug_info": kwargs["debug_info"]}
|
||||
"debug_info": kwargs["debug_info"],
|
||||
"user_stylesheets": kwargs.get("user_stylesheets")}
|
||||
|
||||
|
||||
def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
|
||||
|
@ -44,11 +45,13 @@ def env_options():
|
|||
|
||||
|
||||
class ServoBrowser(NullBrowser):
|
||||
def __init__(self, logger, binary, debug_info=None):
|
||||
def __init__(self, logger, binary, debug_info=None, user_stylesheets=None):
|
||||
NullBrowser.__init__(self, logger)
|
||||
self.binary = binary
|
||||
self.debug_info = debug_info
|
||||
self.user_stylesheets = user_stylesheets or []
|
||||
|
||||
def executor_browser(self):
|
||||
return ExecutorBrowser, {"binary": self.binary,
|
||||
"debug_info": self.debug_info}
|
||||
"debug_info": self.debug_info,
|
||||
"user_stylesheets": self.user_stylesheets}
|
||||
|
|
|
@ -62,9 +62,10 @@ class ServoTestharnessExecutor(ProcessTestExecutor):
|
|||
self.result_data = None
|
||||
self.result_flag = threading.Event()
|
||||
|
||||
debug_args, command = browser_command(self.binary,
|
||||
["--cpu", "--hard-fail", "-u", "Servo/wptrunner", "-z", self.test_url(test)],
|
||||
self.debug_info)
|
||||
args = ["--cpu", "--hard-fail", "-u", "Servo/wptrunner", "-z", self.test_url(test)]
|
||||
for stylesheet in self.browser.user_stylesheets:
|
||||
args += ["--user-stylesheet", stylesheet]
|
||||
debug_args, command = browser_command(self.binary, args, self.debug_info)
|
||||
|
||||
self.command = command
|
||||
|
||||
|
@ -192,6 +193,8 @@ class ServoRefTestExecutor(ProcessTestExecutor):
|
|||
self.command = [self.binary, "--cpu", "--hard-fail", "--exit",
|
||||
"-u", "Servo/wptrunner", "-Z", "disable-text-aa",
|
||||
"--output=%s" % output_path, full_url]
|
||||
for stylesheet in self.browser.user_stylesheets:
|
||||
self.command += ["--user-stylesheet", stylesheet]
|
||||
|
||||
env = os.environ.copy()
|
||||
env["HOST_FILE"] = self.hosts_path
|
||||
|
|
|
@ -159,6 +159,11 @@ def create_parser(product_choices=None):
|
|||
b2g_group.add_argument("--b2g-no-backup", action="store_true", default=False,
|
||||
help="Don't backup device before testrun with --product=b2g")
|
||||
|
||||
servo_group = parser.add_argument_group("Servo-specific")
|
||||
servo_group.add_argument("--user-stylesheet",
|
||||
default=[], action="append", dest="user_stylesheets",
|
||||
help="Inject a user CSS stylesheet into every test.")
|
||||
|
||||
parser.add_argument("test_list", nargs="*",
|
||||
help="List of URLs for tests to run, or paths including tests to run. "
|
||||
"(equivalent to --include)")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue