Auto merge of #9333 - servo:list-properties, r=larsbergstrom

Add a script to list all CSS properties parsed by Servo.

I’ve been asked for that list by two different people this week :)

r? @larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9333)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-01-16 01:06:03 +05:30
commit dba1f27305
2 changed files with 33 additions and 0 deletions

View file

@ -15,6 +15,7 @@ import sys
import os
import os.path as path
import subprocess
import json
from collections import OrderedDict
from time import time
@ -158,6 +159,14 @@ 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([
sys.executable,
path.join(self.context.topdir, "components", "style", "list_properties.py")
]))
assert len(properties) >= 100
assert "margin-top" in properties
assert "margin" in properties
if test_name is None:
test_name = []