-
Notifications
You must be signed in to change notification settings - Fork 321
[css-ui] Verify caret-color animations #1162
Conversation
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.
Automatic validation checks of commit 7af5a49 passed. |
test( | ||
function(){ | ||
var textarea = document.getElementById("textarea"); | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 0)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the point of this line and of caret-color: red
higher up in the test? It seems to me that we could just drop them and still test what the assert claims this test is about.
test( | ||
function(){ | ||
var textarea = document.getElementById("textarea"); | ||
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 0)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the point of this line and of caret-color: red
higher up in the test? It seems to me that we could just drop them and still test what the assert claims this test is about.
Seems to me that both test contain a small unnecessary part. Other than that, they look good to me. |
Automatic validation checks of commit 846cbb9 passed. |
Yeah those lines were not needed, uploaded a new version without them. BTW, this also depends on w3c/csswg-drafts#566 too (like #1161). |
Does it? CSS-UI says that caret-color computes values the same was as the color property. The color property says that the computed value of color keywords is an rgb() value. css-animations says that animations operate by changing the computed value. Both css-ui and css-color say that using fairly poor phrasing, as we're discussing in w3c/csswg-drafts#741, but the intent is still unambiguous for this case. It seems to me that the test is valid even before we decide that resolved values are used values for colors as argued in w3c/csswg-drafts#566. Am I missing something? |
It's basically the first assert: assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 255)'); It's checking the resolved style of assert_equals(getComputedStyle(textarea).caretColor, 'auto'); |
You're right, I missed that. I think we could (should) simplify the test and remove that dependency on w3c/csswg-drafts#566 by removing this: player.currentTime = 0;
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(255, 0, 255)'); and (unrelated to the w3c/csswg-drafts#566, but still not necessary): player.currentTime = 10;
assert_equals(getComputedStyle(textarea).caretColor, 'rgb(0, 255, 0)'); from both tests, and only keeping |
Automatic validation checks of commit 8d3b746 passed. |
@frivoal good idea! I've removed the unneeded lines in the new version. |
Automatic validation checks of commit e9bd02e passed. |
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.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)