Bug 1380133 - Part 9: Automated test for inheriting the start value of a transition. r=heycam

MozReview-Commit-ID: 6uue8qUePUh

--HG--
extra : rebase_source : 3b1338356c2f6f21e497a588939c34ba0edb93ef
This commit is contained in:
Brian Birtles 2017-07-17 10:35:31 +08:00
Родитель 1d20d51f9a
Коммит 265df913a0
2 изменённых файлов: 39 добавлений и 0 удалений

Просмотреть файл

@ -288,6 +288,7 @@ skip-if = !stylo
[test_transitions_and_reframes.html]
[test_transitions_and_restyles.html]
[test_transitions_and_zoom.html]
[test_transitions_at_start.html]
[test_transitions_cancel_near_end.html]
[test_transitions_computed_values.html]
[test_transitions_computed_value_combinations.html]

Просмотреть файл

@ -0,0 +1,38 @@
<!doctype html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1380133
-->
<head>
<meta charset=utf-8>
<title>Test for transition value at start (Bug 1380133)</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<style>
a {
color: red;
transition: 100s color;
}
a.active {
color: blue;
}
</style>
</head>
<body>
<a id=anchor><span id=span>Test</span></a>
</body>
<script>
'use strict';
const anchor = document.getElementById('anchor');
const span = document.getElementById('span');
test(() => {
anchor.classList.add('active');
assert_equals(getComputedStyle(span).color, 'rgb(255, 0, 0)',
'The child of a transitioning element should inherit its'
+ ' parent\'s transition start value');
}, 'Transition start value should be inherited');
</script>
</html>