https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e4248bd6a97720b5a9e35e3d0ebb92a42c8c4af3 authored by Geoffrey Sneddon on 11 April 2018, 07:26:51 UTC
Add backwards compatibility for external_host and host_ip
Tip revision: e4248bd
caret-color-019.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Basic User Interface Test: caret-color auto test animation</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css3-ui/#caret-color">
<link rel="help" href="https://www.w3.org/TR/web-animations-1/#dom-animatable-animate">
<link rel="help" href="https://www.w3.org/TR/css3-color/#color0">
<meta name="assert" content="Test checks that 'auto' value for caret-color property is not interpolable.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
  textarea {
    color: magenta;
  }
</style>
<body>
  <textarea id="textarea"></textarea>
  <div id=log></div>

  <script>
    test(
      function(){
        var textarea = document.getElementById("textarea");
        var keyframes = [
          { caretColor: 'auto' },
          { caretColor: 'lime' }
        ];
        var options = {
          duration: 10,
          fill: "forwards"
        };

        var player = textarea.animate(keyframes, options);
        player.pause();
        player.currentTime = 5;
        assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)');
      }, "caret-color: auto is not interpolable");
</script>
</body>
back to top