Bug 1523562 [wpt PR 13748] - [css-ui] expect resolved color in inheritance test, a=testonly
authorEric Willigers <ewilligers@users.noreply.github.com>
Thu, 31 Jan 2019 18:31:05 +0000
changeset 457956 38f392d2fdee5f048b219e8aad3a7630b2199d97
parent 457955 906bb0fe74909c8de760ad305c47d31d92aa507c
child 457957 aa5cd411e7c9e02c08b509b7b6625ebfe51201e7
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1523562, 13748
milestone67.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 1523562 [wpt PR 13748] - [css-ui] expect resolved color in inheritance test, a=testonly Automatic update from web-platform-tests [css-ui] expect resolved color in inheritance test (#13748) getComputedStyle returns the resolved color, not 'currentcolor' or 'auto' Also, outline-color can have two possible initial values, depending on whether 'invert' is supported or not. https://drafts.csswg.org/cssom/#resolved-value https://drafts.csswg.org/css-color-4/#resolving-color-values https://www.w3.org/TR/css-ui-3/#outline-color -- wpt-commits: 5d067970ad9548a99becc70e7316130c981c00d2 wpt-pr: 13748
testing/web-platform/tests/css/css-ui/inheritance.html
--- a/testing/web-platform/tests/css/css-ui/inheritance.html
+++ b/testing/web-platform/tests/css/css-ui/inheritance.html
@@ -14,34 +14,42 @@
 <div id="reference"></div>
 <div id="container">
   <div id="target"></div>
 </div>
 <style>
 #reference {
   border-style: dotted; /* Avoid border-top-width computed style 0 */
   border-top-width: medium;
+  color: lime;
+  background: blue;
 }
 
 #container, #target {
   outline-style: dotted; /* Avoid outline-width computed style 0 */
+  color: lime;
+  background: blue;
 }
 </style>
 <script>
 const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px
+const currentColor = getComputedStyle(reference).color;
 
 assert_not_inherited('appearance', 'auto', 'none');
-assert_inherited('caret-color', 'auto', 'rgba(42, 53, 64, 0.75)');
+assert_inherited('caret-color', currentColor, 'rgba(42, 53, 64, 0.75)');
 assert_inherited('caret-shape', 'auto', 'bar');
 assert_inherited('cursor', 'auto', 'pointer');
 assert_not_inherited('nav-down', 'auto', '#foo');
 assert_not_inherited('nav-left', 'auto', '#foo');
 assert_not_inherited('nav-right', 'auto', '#foo');
 assert_not_inherited('nav-up', 'auto', '#foo');
-assert_not_inherited('outline-color', 'invert', 'rgba(42, 53, 64, 0.75)');
+if (CSS.supports('outline-color', 'invert'))
+  assert_not_inherited('outline-color', 'invert', 'rgba(42, 53, 64, 0.75)');
+else
+  assert_not_inherited('outline-color', currentColor, 'rgba(42, 53, 64, 0.75)');
 assert_not_inherited('outline-offset', '0px', '10px');
 assert_not_inherited('outline-style', 'none', 'auto');
 assert_not_inherited('outline-width', mediumWidth, '10px');
 assert_not_inherited('resize', 'none', 'vertical');
 assert_not_inherited('user-select', 'auto', 'none');
 </script>
 </body>
 </html>