58 lines
1.4 KiB
HTML
58 lines
1.4 KiB
HTML
<!DOCTYPE>
|
|
|
|
<html>
|
|
<head>
|
|
<style>
|
|
.box {
|
|
height: 200px;
|
|
width: 200px;
|
|
margin: 10px;
|
|
-webkit-transition-duration: 1s;
|
|
-webkit-transition-timing-function: linear;
|
|
}
|
|
|
|
#box {
|
|
background-image: url('../fast/backgrounds/repeat/resources/gradient.gif');
|
|
-webkit-transition-property: background-image;
|
|
}
|
|
|
|
#box.final {
|
|
background-image: url('../fast/backgrounds/repeat/resources/nav.blue.gif');
|
|
}
|
|
|
|
#boxShorthand {
|
|
background: url('../fast/backgrounds/repeat/resources/gradient.gif');
|
|
-webkit-transition-property: background;
|
|
}
|
|
|
|
#boxShorthand.final {
|
|
background: url('../fast/backgrounds/repeat/resources/nav.blue.gif');
|
|
}
|
|
|
|
</style>
|
|
<script src="resources/transition-test-helpers.js" type="text/javascript"></script>
|
|
<script>
|
|
|
|
const expectedValues = [
|
|
// [time, element-id, property, expected-value, tolerance]
|
|
[0.5, 'box', 'background-image', 0.5, 0.05],
|
|
[0.5, 'boxShorthand', 'background-image', 0.5, 0.05],
|
|
];
|
|
|
|
function setupTest()
|
|
{
|
|
document.getElementById('box').className = 'box final';
|
|
document.getElementById('boxShorthand').className = 'box final';
|
|
}
|
|
|
|
runTransitionTest(expectedValues, setupTest, usePauseAPI, true);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="box" class="box"></div>
|
|
<div id="boxShorthand" class="box"></div>
|
|
|
|
<div id="result"></div>
|
|
</body>
|
|
</html>
|