mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update CSS tests to revision 2baa72daab8bf37e3e910a9fd311a1eaa5b0f4a8
This commit is contained in:
parent
662c00a810
commit
df03062d62
10934 changed files with 428309 additions and 254265 deletions
|
@ -13,7 +13,7 @@
|
|||
<body>
|
||||
|
||||
<h1>CSS Transitions Module Level 1 CR Test Suite</h1>
|
||||
<h2>Transition Events (8 tests)</h2>
|
||||
<h2>Transition Events (9 tests)</h2>
|
||||
<table width="100%">
|
||||
<col id="test-column">
|
||||
<col id="refs-column">
|
||||
|
@ -31,7 +31,7 @@
|
|||
<tr><th colspan="4" scope="rowgroup">
|
||||
<a href="#s5">+</a>
|
||||
<a href="http://www.w3.org/TR/css3-transitions/#transition-events">5 Transition Events</a></th></tr>
|
||||
<!-- 8 tests -->
|
||||
<!-- 9 tests -->
|
||||
<tr id="before-domcontentloaded-001-5" class="primary dom script">
|
||||
<td><strong>
|
||||
<a href="before-DOMContentLoaded-001.htm">before-domcontentloaded-001</a></strong></td>
|
||||
|
@ -120,6 +120,17 @@
|
|||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="events-007-5" class="primary dom script">
|
||||
<td><strong>
|
||||
<a href="events-007.htm">events-007</a></strong></td>
|
||||
<td></td>
|
||||
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
|
||||
<td>no transitionend event after display:none
|
||||
<ul class="assert">
|
||||
<li>Making an element display:none; while it has a transition in progress should prevent a transitionend event from getting fired.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="s5.#Events-TransitionEvent">
|
||||
<!-- 0 tests -->
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Transitions Test: no transitionend event after display:none</title>
|
||||
<link href="http://chrisrebert.com" rel="author" title="Chris Rebert">
|
||||
<link href="http://www.w3.org/TR/css3-transitions/#transition-events" rel="help">
|
||||
<link data-section-title="AnimationEnd events and display: none" href="https://lists.w3.org/Archives/Public/www-style/2015Apr/0405.html" rel="help" title="[CSSWG] Minutes Telecon 2015-04-29">
|
||||
<meta content="dom" name="flags">
|
||||
<meta content="Making an element display:none; while it has a transition in progress should prevent a transitionend event from getting fired." name="assert">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#a {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
transition: background-color 2s;
|
||||
}
|
||||
.red {
|
||||
background-color: red;
|
||||
}
|
||||
.blue {
|
||||
background-color: blue;
|
||||
}
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
async_test(function (t) {
|
||||
window.addEventListener('load', function () {
|
||||
var div = document.getElementById('a');
|
||||
var ended = false;
|
||||
var after = false;
|
||||
div.addEventListener('transitionend', function () {
|
||||
ended = true;
|
||||
t.step(function () {
|
||||
assert_false(true, "transitionend event didn't fire");
|
||||
});
|
||||
}, false);
|
||||
|
||||
div.className = 'blue';// initiate transition
|
||||
window.setTimeout(function () {
|
||||
t.step(function () {
|
||||
assert_false(ended, "transitionend did not fire before hiding callback ran");
|
||||
assert_false(after, "hiding callback ran before the end of the test");
|
||||
});
|
||||
div.className += ' hidden';// force display:none during the transition
|
||||
}, 1000);// halfway into the transition
|
||||
window.setTimeout(function () {
|
||||
after = true;
|
||||
t.step(function () {
|
||||
assert_false(ended, "transitionend event didn't fire");
|
||||
t.done();
|
||||
});
|
||||
}, 2100);// after the transition would have ended
|
||||
}, false);
|
||||
}, "transitionend should not be fired if the element is made display:none during the transition");
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="red" id="a"></div>
|
||||
|
||||
|
||||
</body></html>
|
|
@ -42,7 +42,7 @@
|
|||
<tbody id="s5">
|
||||
<tr><th><a href="chapter-5.htm">Chapter 5 -
|
||||
Transition Events</a></th>
|
||||
<td>(8 Tests)</td></tr>
|
||||
<td>(9 Tests)</td></tr>
|
||||
</tbody>
|
||||
<tbody id="s6">
|
||||
<tr><th><a href="chapter-6.htm">Chapter 6 -
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue