Bug 1564917 - Use default value when there are no conditions; r=jgraham
authorMaja Frydrychowicz <mjzffr@gmail.com>
Fri, 12 Jul 2019 14:47:39 +0000
changeset 482613 8cb1c0d76dda36e4b6880efa3c9704ff3f226830
parent 482612 735759bca2312ea7437576c16a4e5dc0e1f81607
child 482614 e914352ba87469864baccbfa5fe7322fd224b618
push id36284
push userapavel@mozilla.com
push dateFri, 12 Jul 2019 21:43:58 +0000
treeherdermozilla-central@cd685b4cff6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1564917
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1564917 - Use default value when there are no conditions; r=jgraham Differential Revision: https://phabricator.services.mozilla.com/D37871
testing/web-platform/tests/tools/wptrunner/wptrunner/manifestupdate.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/manifestupdate.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/manifestupdate.py
@@ -406,17 +406,19 @@ class PropertyUpdate(object):
                     self.node.root.test_path)
                 if e.cond:
                     msg += ": %s" % serialize(e.cond).strip()
                 print(msg)
 
         # If all the values match remove all conditionals
         # This handles the case where we update a number of existing conditions and they
         # all end up looking like the post-update default.
-        new_default = conditions[-1][1] if conditions[-1][0] is None else self.default_value
+        new_default = self.default_value
+        if conditions and conditions[-1][0] is None:
+            new_default = conditions[-1][1]
         if all(condition[1] == new_default for condition in conditions):
             conditions = [(None, new_default)]
 
         # Don't set the default to the class default
         if (conditions and
             conditions[-1][0] is None and
             conditions[-1][1] == self.default_value):
             self.node.modified = True