mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Run style unit tests in testing mode, disable some properties in testing mode
This commit is contained in:
parent
28bce69d24
commit
e1e512f86b
6 changed files with 39 additions and 18 deletions
|
@ -185,9 +185,9 @@ class PropertiesData(object):
|
|||
def active_style_structs(self):
|
||||
return [s for s in self.style_structs if s.additional_methods or s.longhands]
|
||||
|
||||
def declare_longhand(self, name, products="gecko servo", **kwargs):
|
||||
def declare_longhand(self, name, products="gecko servo", disable_when_testing=False, **kwargs):
|
||||
products = products.split()
|
||||
if self.product not in products and not self.testing:
|
||||
if self.product not in products and not (self.testing and not disable_when_testing):
|
||||
return
|
||||
|
||||
longhand = Longhand(self.current_style_struct, name, **kwargs)
|
||||
|
@ -200,9 +200,10 @@ class PropertiesData(object):
|
|||
|
||||
return longhand
|
||||
|
||||
def declare_shorthand(self, name, sub_properties, products="gecko servo", *args, **kwargs):
|
||||
def declare_shorthand(self, name, sub_properties, products="gecko servo",
|
||||
disable_when_testing=False, *args, **kwargs):
|
||||
products = products.split()
|
||||
if self.product not in products and not self.testing:
|
||||
if self.product not in products and not (self.testing and not disable_when_testing):
|
||||
return
|
||||
|
||||
sub_properties = [self.longhands_by_name[s] for s in sub_properties]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue