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:
Simon Sapin 2015-08-05 19:06:12 +02:00
parent 5e008d1cbd
commit 649301fd35
469 changed files with 82 additions and 1344 deletions

4
resources/ahem.css Normal file
View file

@ -0,0 +1,4 @@
@font-face {
font-family: Ahem;
src: url(ahem/AHEM____.TTF);
}

View file

@ -142,7 +142,7 @@ Reftest results can be analyzed from a raw log file. To generate this run
with the `--log-raw` option e.g.
./mach test-css --log-raw css.log
This file can then be fed into the
[reftest analyzer](http://hoppipolla.co.uk/410/reftest-analyser-structured.xhtml)
which will show all failing tests (not just those with unexpected results).

View file

@ -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}

View file

@ -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

View file

@ -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)")

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vlr-121.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vlr-153.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vlr-169.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vlr-185.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vlr-201.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vlr-217.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-014.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-038.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-050.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-062.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-074.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-086.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-120.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-152.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-168.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-184.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-200.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abs-pos-non-replaced-vrl-216.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-height-002.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-height-007.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-max-height-002.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-001.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-003.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-004.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-006.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-008.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-010.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-011.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-013.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-014.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[absolute-non-replaced-width-016.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[anonymous-boxes-inheritance-001.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-049.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-052.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-053.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-054.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-070.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-073.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-074.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-075.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-090.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-093.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-094.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-095.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-110.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-113.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-114.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[background-color-115.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-010.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-011.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-012.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-014.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-015.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-016.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-017.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-018.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-023.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-024.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-025.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-026.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-027.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-028.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-029.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-030.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-032.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-033.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-034.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-035.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-036.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-037.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-038.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-039.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-041.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-042.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-043.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-044.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[bidi-box-model-045.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[block-formatting-contexts-004.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[block-non-replaced-height-005.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[block-non-replaced-width-007.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[blocks-020.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[blocks-022.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[border-001.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[border-003.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c412-blockw-000.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c412-hz-box-000.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c43-rpl-ibx-000.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c526-font-sz-001.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c526-font-sz-003.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c534-bgre-000.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c534-bgre-001.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c534-bgreps-000.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c534-bgreps-001.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c534-bgreps-002.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[c534-bgreps-003.htm]
type: reftest
expected: FAIL

Some files were not shown because too many files have changed in this diff Show more