Fixes and tweaks to wpt/css/filter-effects/

filter-contrast-003.html

  Adjust the color from #400000 to #3f0000, since (0x40 / 255) is just
  over 0.25 and can after filtering and rounding end up above 0.
  (0x3f / 255) on the other hand is just below 0.25 and the result will
  be clamped to zero.

filter-external-001-test.html
filter-external-002-test.html

  Change the hue-rotate parameter in the external file from 120 to 150.
  Move the file to support/ and remove lint entry.
  Make both filters operate in sRGB to make computing the reference
  easier. Use rgb(...) notation with percentage values in reference.

fecolormatrix-type.html

  Add color-interpolation-filters=sRGB to the filter to make it easier
  to reason about what the result should be. Use rgba(...) notation in
  the ref using percentage notation.

filters-test-brightness-003.html

  Add 'filter: brightness(0)' before 'filter: brightness()' to properly
  test if the "no argument" notation is considered valid by the parser.

filter-grayscale-001.html
filter-grayscale-002.html
filter-grayscale-003.html
filter-grayscale-004.html
filter-grayscale-005.html

  Remove the " (and not blue)" text from the reference and update the
  001,004 and 005 tests accordingly.

css-filters-animation-saturate.html

  Interpolate the argument from 4900% rather than 5000% to end at the
  ref's 2500% (25).

css-filters-animation-hue-rotate.html

  Sample the animation at .5 to match the expectation.

css-filters-animation-drop-shadow.html

  Use explicit rgba(...) in the ref rather than the keyword 'gray'.
  We're interpolating the color of the drop-shadow from 'black'
  (rgba(0, 0, 0, 1)) to 'transparent' (rgba(0, 0, 0, 0)) here, so it's
  better and more accurate to describe the color as "semi-transparent
  black" (rgba(0, 0, 0, 0.5)).

css-filters-animation-combined-001.html

  Initial value for animation for 'opacity(...)' is '1' - not zero.
  Change test to interpolate from 0 -> 1 (rather than 1 -> 1)

Bug: 903383
Change-Id: I4d0113989414616494b98c22fbac817f007cd762
Reviewed-on: https://chromium-review.googlesource.com/c/1333816
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#607628}
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 94969f6..a962304 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -2889,19 +2889,10 @@
 # ====== New tests from wpt-importer added here ======
 crbug.com/626703 virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/RTCPeerConnection-track-stats.https.html [ Timeout ]
 crbug.com/626703 external/wpt/webrtc/RTCPeerConnection-track-stats.https.html [ Timeout ]
-crbug.com/626703 external/wpt/css/filter-effects/filter-grayscale-003.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/filter-grayscale-002.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/filter-external-002-test.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/filter-cb-abspos-inline-003.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/css-filters-animation-saturate.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/css-filters-animation-hue-rotate.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/css-filters-animation-combined-001.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/filter-external-001-test.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/css-filters-animation-drop-shadow.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/css-filters-animation-blur.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/filters-test-brightness-003.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/filter-contrast-003.html [ Failure ]
-crbug.com/626703 external/wpt/css/filter-effects/fecolormatrix-type.html [ Failure ]
+crbug.com/903383 external/wpt/css/filter-effects/filter-cb-abspos-inline-003.html [ Failure ]
+crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-combined-001.html [ Failure ]
+crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-blur.html [ Failure ]
+crbug.com/903383 external/wpt/css/filter-effects/filters-test-brightness-003.html [ Failure ]
 crbug.com/626703 external/wpt/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html [ Timeout ]
 crbug.com/626703 external/wpt/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screenx.html [ Timeout ]
 crbug.com/626703 external/wpt/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html [ Timeout ]
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-combined-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-combined-001.html
index 5b37d57..874f6e4 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-combined-001.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-combined-001.html
@@ -28,7 +28,7 @@
                     saturate(0%)
                     hue-rotate(90deg)
                     invert(100%)
-                    opacity(100%)
+                    opacity(0%)
             }
             100% {
                 filter: none;
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow-ref.html
index e1802341..d6be73bc 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow-ref.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow-ref.html
@@ -10,7 +10,7 @@
             width: 100px;
             height: 100px;
             background: blue;
-            filter: drop-shadow(15px 15px 0px gray);
+            filter: drop-shadow(15px 15px 0px rgba(0, 0, 0, 0.5));
         }
     </style>
 </head>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow.html
index e27bf43..9496bdb 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-drop-shadow.html
@@ -9,7 +9,7 @@
     <link rel="help" href="http://www.w3.org/TR/filter-effects-1/#funcdef-drop-shadow">
     <link rel="help" href="http://www.w3.org/TR/css3-animations/#animations">
     <link rel="match" href="css-filters-animation-drop-shadow-ref.html">
-    <meta name="assert" content="The blue square should be in top of a gray one">
+    <meta name="assert" content="The blue square should be on top of a gray one">
     <style type="text/css">
         @keyframes animate {
             0% {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-hue-rotate.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-hue-rotate.html
index 7c55b50..1ebf2778 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-hue-rotate.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-hue-rotate.html
@@ -26,7 +26,7 @@
             background: blue;
             animation-name: animate;
             animation-play-state: paused;
-            animation-delay: -1s;
+            animation-delay: -2s;
             animation-duration: 4s;
             animation-timing-function: linear;
         }
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-saturate.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-saturate.html
index ed5207f..63de30a 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-saturate.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/css-filters-animation-saturate.html
@@ -13,7 +13,7 @@
     <style type="text/css">
         @keyframes animate {
             0% {
-                filter: saturate(5000%);
+                filter: saturate(4900%);
             }
             100% {
                 filter: none;
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type-ref.html
index bba0c09..182b4b5 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type-ref.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type-ref.html
@@ -9,7 +9,7 @@
        div{
 	       width: 200px;
 	       height: 200px;
-	       background-color: #a8d7c1;
+	       background-color: rgba(39.3%, 68.6%, 53.4%, 1);
        }
 
     </style>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type.html
index 8caaede..5d003f7 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/fecolormatrix-type.html
@@ -28,7 +28,7 @@
 	<div></div>
 
 	<svg>
-		<filter id="sepia">
+		<filter id="sepia" color-interpolation-filters="sRGB">
 			<feColorMatrix type="matrix" values="0.393 0.189 0.349 0 0
 	                   0.686 0.168 0.272 0 0
 	                   0.534 0.131 0 0 0
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-contrast-003.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-contrast-003.html
index 8b324c7..255c4a02 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-contrast-003.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-contrast-003.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>CSS Filter contrast: Test for CSS contrast filter shotrhand</title>
+    <title>CSS Filter contrast: Test for CSS contrast filter shorthand</title>
     <link rel="author" title="Takeshi Kurosawa" href="mailto:taken.spc@gmail.com">
     <link rel="reviewer" title="Dirk Schulze" href="mailto:dschulze@adobe.com">
     <link rel="help" href="http://www.w3.org/TR/filter-effects-1/#FilterProperty">
@@ -14,7 +14,7 @@
        div {
            width: 200px;
            height: 200px;
-           background-color: #400000;
+           background-color: #3f0000;
            filter: contrast(200%);
        }
     </style>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-ref.html
index 915cccd..794674d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-ref.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-ref.html
@@ -8,7 +8,7 @@
     div {
         width: 200px;
         height: 200px;
-        background: #00b60d;
+        background: rgb(0%, 46.896%, 0.396%);
     }
 
     </style>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-test.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-test.html
index c84c052..ecef557 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-test.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-001-test.html
@@ -26,7 +26,7 @@
     <div></div>
 
     <svg>
-        <filter id="filter">
+        <filter id="filter" color-interpolation-filters="sRGB">
             <feColorMatrix type="hueRotate" in="SourceGraphic" values="150"/>
         </filter>
     </svg>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-002-filter.svg b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-002-filter.svg
deleted file mode 100644
index 638f533..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-002-filter.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
-	<filter id="filter">
-		<feColorMatrix type="hueRotate" in="SourceGraphic" values="120"/>
-	</filter>
-</svg>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-002-test.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-002-test.html
index 65475b4..cb2d655 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-002-test.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-external-002-test.html
@@ -15,7 +15,7 @@
         width: 200px;
         height: 200px;
         background: red;
-        filter: url( filter-external-002-filter.svg#filter );
+        filter: url( support/filter-external-002-filter.svg#filter );
     }
 
     </style>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-001.html
index 7027ee0..c6fc1be7 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-001.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-001.html
@@ -22,9 +22,9 @@
 		</style>
 	</head>
 	<body>
-		<p>The test passes if the little box looks grey. (and not blue)</p>
+		<p>The test passes if the little box looks grey.</p>
 		<div class="testzone">
 			<div class="box filter"></div>
 		</div>
 	</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-004.html
index b63d9c21..8b7d11a 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-004.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-004.html
@@ -22,9 +22,9 @@
 		</style>
 	</head>
 	<body>
-		<p>The test passes if the little box looks grey. (and not blue)</p>
+		<p>The test passes if the little box looks grey.</p>
 		<div class="testzone">
 			<div class="box filter"></div>
 		</div>
 	</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-005.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-005.html
index 110ce4d..0aa4a3b 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-005.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-005.html
@@ -22,9 +22,9 @@
 		</style>
 	</head>
 	<body>
-		<p>The test passes if the little box looks grey. (and not blue)</p>
+		<p>The test passes if the little box looks grey.</p>
 		<div class="testzone">
 			<div class="box filter"></div>
 		</div>
 	</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-ref.html
index 72700c2f..beaa72a 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-ref.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filter-grayscale-ref.html
@@ -16,9 +16,9 @@
 		</style>
 	</head>
 	<body>
-		<p>The test passes if the little box looks grey. (and not blue)</p>
+		<p>The test passes if the little box looks grey.</p>
 		<div class="testzone">
 			<div class="box"></div>
 		</div>
 	</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filters-test-brightness-003.html b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filters-test-brightness-003.html
index 9ecef28a..69a7d54 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filters-test-brightness-003.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/filters-test-brightness-003.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>CSS Writing Modes Test: drop-shadow offset test</title>
+    <title>CSS Filter Effects: brightness(...) without argument</title>
     <link rel="author" title="Jun Ichikawa" href="mailto:jun1ka0@gmail.com">
     <link rel="reviewer" title="Dirk Schulze" href="mailto:dschulze@adobe.com">
     <link rel="help" href="http://www.w3.org/TR/filter-effects-1/#FilterProperty">
@@ -16,6 +16,7 @@
             width: 200px;
             height: 200px;
             background-color: rgb(0, 255, 0);
+            filter: brightness(0);
             filter: brightness();
         }
     </style>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/support/filter-external-002-filter.svg b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/support/filter-external-002-filter.svg
new file mode 100644
index 0000000..0d5fc65
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/filter-effects/support/filter-external-002-filter.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
+	<filter id="filter" color-interpolation-filters="sRGB">
+		<feColorMatrix type="hueRotate" in="SourceGraphic" values="150"/>
+	</filter>
+</svg>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist b/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist
index 3de5698..99b1d6a 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist
+++ b/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist
@@ -378,7 +378,6 @@
 SUPPORT-WRONG-DIR: css/CSS2/other-formats/xml/background-18.css
 SUPPORT-WRONG-DIR: css/CSS2/other-formats/xml/background-19-alt.xml
 SUPPORT-WRONG-DIR: css/CSS2/other-formats/xml/background-19.css
-SUPPORT-WRONG-DIR: css/filter-effects/filter-external-002-filter.svg
 SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/check-for-references.sh
 SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/sync-tests-filter
 SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/sync-tests.sh