diff --git a/layout/style/test/test_bug160403.html b/layout/style/test/test_bug160403.html
index c0c9306684c..68cbee76e15 100644
--- a/layout/style/test/test_bug160403.html
+++ b/layout/style/test/test_bug160403.html
@@ -56,6 +56,18 @@ is(style.getPropertyPriority("border-right-style"), "important");
isnot(style.getPropertyValue("border-style"), "");
is(style.getPropertyPriority("border-style"), "important");
+// Also test that we check consistency of inherit and -moz-initial.
+element.setAttribute("style", "border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted");
+isnot(style.getPropertyValue("border-style"), "", "serialize shorthand when all values not inherit/initial");
+element.setAttribute("style", "border-top-style: inherit; border-right-style: inherit; border-bottom-style: inherit; border-left-style: inherit");
+is(style.getPropertyValue("border-style"), "inherit", "serialize shorthand as inherit");
+element.setAttribute("style", "border-top-style: -moz-initial; border-right-style: -moz-initial; border-bottom-style: -moz-initial; border-left-style: -moz-initial");
+is(style.getPropertyValue("border-style"), "-moz-initial", "serialize shorthand as initial");
+element.setAttribute("style", "border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: inherit");
+is(style.getPropertyValue("border-style"), "", "don't serialize shorthand when partly inherit");
+element.setAttribute("style", "border-top-style: -moz-initial; border-right-style: dotted; border-bottom-style: -moz-initial; border-left-style: -moz-initial");
+is(style.getPropertyValue("border-style"), "", "don't serialize shorthand when partly initial");
+