Bug 1187110 part 3: Iterate across array of special keyword values, instead of hardcoded function-arguments, in test_extra_inherit_initial.html. r=heycam
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 04 Aug 2015 14:05:22 -0700
changeset 287874 c4e7b4e83365ba58b6d6753aad25bed557ba9e5a
parent 287873 5189e3db2bc23d8c44ac94e652219c7a7234d4eb
child 287875 a5b09e238cd885aaf87cb18ac59263c1d34066f4
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1187110
milestone42.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 1187110 part 3: Iterate across array of special keyword values, instead of hardcoded function-arguments, in test_extra_inherit_initial.html. r=heycam
layout/style/test/test_extra_inherit_initial.html
--- a/layout/style/test/test_extra_inherit_initial.html
+++ b/layout/style/test/test_extra_inherit_initial.html
@@ -54,22 +54,21 @@ function test_property(property)
       // Longhand property.
       is(gDeclaration.getPropertyValue(property), "",
          ["expected", extraval, "ignored", relation, "value in",
           "'" + decl + "'"].join(" "));
     }
   }
 
   function test_value(value) {
-    test_value_pair("after", value, "inherit", "inherit");
-    test_value_pair("after", value, "initial", "initial");
-    test_value_pair("after", value, "unset", "unset");
-    test_value_pair("before", "inherit", value, "inherit");
-    test_value_pair("before", "initial", value, "initial");
-    test_value_pair("before", "unset", value, "unset");
+    let specialKeywords = [ "inherit", "initial", "unset" ];
+    for (let keyword of specialKeywords) {
+      test_value_pair("before", keyword, value, keyword);
+      test_value_pair("after", value, keyword, keyword);
+    }
   }
 
   for (let idx in info.initial_values) {
     test_value(info.initial_values[idx]);
   }
   for (let idx in info.other_values) {
     test_value(info.initial_values[idx]);
   }