Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 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
34 changes: 34 additions & 0 deletions
34
tests/wpt/mozilla/tests/css/animations/basic-transition.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,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> |