-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-ui] Verify caret-color animations
Added 2 new tests to check that "caret-color: auto" isn't interpolatible, but "caret-color: currentcolor" is. See w3c/csswg-drafts#781 for more information. Build from revision 7af5a49dc68b5efefa3dd93012a07a4fb9392968
- Loading branch information
1 parent
e286d7b
commit 5221fd6
Showing
46 changed files
with
829 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html><head><meta charset="utf-8"> | ||
<title>CSS Basic User Interface Test: caret-color auto test animation</title> | ||
<link href="mailto:rego@igalia.com" rel="author" title="Manuel Rego Casasnovas"> | ||
<link href="http://www.w3.org/TR/css3-ui/#caret-color" rel="help"> | ||
<link href="https://www.w3.org/TR/web-animations-1/#dom-animatable-animate" rel="help"> | ||
<link href="https://www.w3.org/TR/css3-color/#color0" rel="help"> | ||
<meta content="Test checks that 'auto' value for caret-color property is not interpolatible." name="assert"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
textarea { | ||
color: magenta; | ||
caret-color: red; | ||
} | ||
</style> | ||
</head><body> | ||
<textarea id="textarea"></textarea> | ||
<div id="log"></div> | ||
|
||
<script> | ||
test( | ||
function(){ | ||
var textarea = document.getElementById("textarea"); | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 0)'); | ||
|
||
var keyframes = [ | ||
{ caretColor: 'auto' }, | ||
{ caretColor: 'lime' } | ||
]; | ||
var options = { | ||
duration: 10, | ||
fill: "forwards" | ||
}; | ||
|
||
var player = textarea.animate(keyframes, options); | ||
player.pause(); | ||
player.currentTime = 0; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 255)'); | ||
player.currentTime = 5; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)'); | ||
player.currentTime = 10; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)'); | ||
}, "caret-color: auto is not interpolatible"); | ||
</script> | ||
|
||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html><head><meta charset="utf-8"> | ||
<title>CSS Basic User Interface Test: caret-color currentcolor test animation</title> | ||
<link href="mailto:rego@igalia.com" rel="author" title="Manuel Rego Casasnovas"> | ||
<link href="http://www.w3.org/TR/css3-ui/#caret-color" rel="help"> | ||
<link href="https://www.w3.org/TR/web-animations-1/#dom-animatable-animate" rel="help"> | ||
<link href="https://www.w3.org/TR/css3-color/#color0" rel="help"> | ||
<meta content="Test checks that 'currentcolor' value for caret-color property is interpolatible." name="assert"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
textarea { | ||
color: magenta; | ||
caret-color: red; | ||
} | ||
</style> | ||
</head><body> | ||
<textarea id="textarea"></textarea> | ||
<div id="log"></div> | ||
|
||
<script> | ||
test( | ||
function(){ | ||
var textarea = document.getElementById("textarea"); | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 0)'); | ||
|
||
var keyframes = [ | ||
{ caretColor: 'currentcolor' }, | ||
{ caretColor: 'lime' } | ||
]; | ||
var options = { | ||
duration: 10, | ||
fill: "forwards" | ||
}; | ||
|
||
var player = textarea.animate(keyframes, options); | ||
player.pause(); | ||
player.currentTime = 0; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 255)'); | ||
player.currentTime = 5; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(128, 128, 128)'); | ||
player.currentTime = 10; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)'); | ||
}, "caret-color: currentcolor is interpolatible"); | ||
</script> | ||
|
||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8" /> | ||
<title>CSS Basic User Interface Test: caret-color auto test animation</title> | ||
<link href="mailto:rego@igalia.com" rel="author" title="Manuel Rego Casasnovas" /> | ||
<link href="http://www.w3.org/TR/css3-ui/#caret-color" rel="help" /> | ||
<link href="https://www.w3.org/TR/web-animations-1/#dom-animatable-animate" rel="help" /> | ||
<link href="https://www.w3.org/TR/css3-color/#color0" rel="help" /> | ||
<meta content="Test checks that 'auto' value for caret-color property is not interpolatible." name="assert" /> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
textarea { | ||
color: magenta; | ||
caret-color: red; | ||
} | ||
</style> | ||
</head><body> | ||
<textarea id="textarea"></textarea> | ||
<div id="log"></div> | ||
|
||
<script> | ||
test( | ||
function(){ | ||
var textarea = document.getElementById("textarea"); | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 0)'); | ||
|
||
var keyframes = [ | ||
{ caretColor: 'auto' }, | ||
{ caretColor: 'lime' } | ||
]; | ||
var options = { | ||
duration: 10, | ||
fill: "forwards" | ||
}; | ||
|
||
var player = textarea.animate(keyframes, options); | ||
player.pause(); | ||
player.currentTime = 0; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 255)'); | ||
player.currentTime = 5; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)'); | ||
player.currentTime = 10; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)'); | ||
}, "caret-color: auto is not interpolatible"); | ||
</script> | ||
|
||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8" /> | ||
<title>CSS Basic User Interface Test: caret-color currentcolor test animation</title> | ||
<link href="mailto:rego@igalia.com" rel="author" title="Manuel Rego Casasnovas" /> | ||
<link href="http://www.w3.org/TR/css3-ui/#caret-color" rel="help" /> | ||
<link href="https://www.w3.org/TR/web-animations-1/#dom-animatable-animate" rel="help" /> | ||
<link href="https://www.w3.org/TR/css3-color/#color0" rel="help" /> | ||
<meta content="Test checks that 'currentcolor' value for caret-color property is interpolatible." name="assert" /> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
textarea { | ||
color: magenta; | ||
caret-color: red; | ||
} | ||
</style> | ||
</head><body> | ||
<textarea id="textarea"></textarea> | ||
<div id="log"></div> | ||
|
||
<script> | ||
test( | ||
function(){ | ||
var textarea = document.getElementById("textarea"); | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 0)'); | ||
|
||
var keyframes = [ | ||
{ caretColor: 'currentcolor' }, | ||
{ caretColor: 'lime' } | ||
]; | ||
var options = { | ||
duration: 10, | ||
fill: "forwards" | ||
}; | ||
|
||
var player = textarea.animate(keyframes, options); | ||
player.pause(); | ||
player.currentTime = 0; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 255)'); | ||
player.currentTime = 5; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(128, 128, 128)'); | ||
player.currentTime = 10; | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)'); | ||
}, "caret-color: currentcolor is interpolatible"); | ||
</script> | ||
|
||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.