mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
Auto merge of #12623 - notriddle:master, r=emilio
Complete animations whether or not cascade needs done - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12554 (github issue number if applicable). - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12623) <!-- Reviewable:end -->
This commit is contained in:
commit
27d8fb3807
5 changed files with 77 additions and 19 deletions
|
@ -6150,6 +6150,12 @@
|
|||
"url": "/_mozilla/css/animations/basic-linear-width.html"
|
||||
}
|
||||
],
|
||||
"css/animations/basic-transition.html": [
|
||||
{
|
||||
"path": "css/animations/basic-transition.html",
|
||||
"url": "/_mozilla/css/animations/basic-transition.html"
|
||||
}
|
||||
],
|
||||
"css/empty-keyframes.html": [
|
||||
{
|
||||
"path": "css/empty-keyframes.html",
|
||||
|
|
34
tests/wpt/mozilla/tests/css/animations/basic-transition.html
Normal file
34
tests/wpt/mozilla/tests/css/animations/basic-transition.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Transition test</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#check-me, #check-me-2 {
|
||||
background-color: #F00;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
transition: background-color 1s linear;
|
||||
}
|
||||
#check-me-2 {
|
||||
background-color: #000;
|
||||
}
|
||||
</style>
|
||||
<div id=check-me><span>a</span></div>
|
||||
<script>
|
||||
var div = document.getElementById('check-me');
|
||||
var span = div.childNodes[0];
|
||||
async_test(function(t) {
|
||||
window.addEventListener('load', function() {
|
||||
assert_equals(getComputedStyle(div).getPropertyValue('background-color'), 'rgb(255, 0, 0)');
|
||||
div.id = "check-me-2";
|
||||
requestAnimationFrame(function() {
|
||||
var test = new window.TestBinding();
|
||||
test.advanceClock(2000);
|
||||
span.innerHTML = "a";
|
||||
assert_equals(getComputedStyle(div).getPropertyValue('background-color'), 'rgb(0, 0, 0)');
|
||||
t.done();
|
||||
});
|
||||
})
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue