servo: Merge #10208 - Generate html and json of supported css properties (from jrasanen:jr/issue10196); r=SimonSapin
Fixes #10196. Outputs html and json of supported css properties to `target/doc/` directory when deploying github-pages. Source-Repo: https://github.com/servo/servo Source-Revision: df73a18a61e57f62e2e17541d45dcd3818b35b7c
This commit is contained in:
@@ -163,10 +163,17 @@ class MachCommands(CommandBase):
|
||||
@CommandArgument('test_name', nargs=argparse.REMAINDER,
|
||||
help="Only run tests that match this pattern or file path")
|
||||
def test_unit(self, test_name=None, package=None):
|
||||
properties = json.loads(subprocess.check_output([
|
||||
subprocess.check_output([
|
||||
sys.executable,
|
||||
path.join(self.context.topdir, "components", "style", "list_properties.py")
|
||||
]))
|
||||
])
|
||||
|
||||
this_file = os.path.dirname(__file__)
|
||||
servo_doc_path = os.path.abspath(os.path.join(this_file, '../', '../', 'target', 'doc', 'servo'))
|
||||
|
||||
with open(os.path.join(servo_doc_path, 'css-properties.json'), 'r') as property_file:
|
||||
properties = json.loads(property_file.read())
|
||||
|
||||
assert len(properties) >= 100
|
||||
assert "margin-top" in properties
|
||||
assert "margin" in properties
|
||||
|
||||
Reference in New Issue
Block a user