mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update CSS tests to revision 31d63cc79bd4c929ed582229e936d7b389f3e6ab
This commit is contained in:
parent
1a81b18b9f
commit
2c9faf5363
91915 changed files with 5979820 additions and 0 deletions
|
@ -0,0 +1,334 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Transitions Test: Intermediate Property Values of unspecified properties</title>
|
||||
<meta content="Test checks that properties are transitionable that haven't been specified" name="assert">
|
||||
<link href="http://www.w3.org/TR/css3-transitions/#transitions" rel="help" title="2. Transitions">
|
||||
<link href="http://www.w3.org/TR/css3-transitions/#animatable-css" rel="help" title="7.1. Properties from CSS">
|
||||
<link href="http://rodneyrehm.de/en/" rel="author" title="Rodney Rehm">
|
||||
<meta content="dom" name="flags">
|
||||
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
|
||||
<script src="./support/vendorPrefix.js" type="text/javascript"></script>
|
||||
<script src="./support/helper.js" type="text/javascript"></script>
|
||||
<script src="./support/runParallelAsyncHarness.js" type="text/javascript"></script>
|
||||
<script src="./support/generalParallelTest.js" type="text/javascript"></script>
|
||||
<script src="./support/properties.js" type="text/javascript"></script>
|
||||
|
||||
<style type="text/css">
|
||||
#offscreen {
|
||||
position: absolute;
|
||||
top: -100000px;
|
||||
left: -100000px;
|
||||
width: 100000px;
|
||||
height: 100000px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"border-top-left-radius border-radius(px) / values": {},
|
||||
"border-top-left-radius border-radius(px) / events": {},
|
||||
"border-top-left-radius border-radius(px-px) / values": {},
|
||||
"border-top-left-radius border-radius(px-px) / events": {},
|
||||
"border-top-right-radius border-radius(px) / values": {},
|
||||
"border-top-right-radius border-radius(px) / events": {},
|
||||
"border-top-right-radius border-radius(px-px) / values": {},
|
||||
"border-top-right-radius border-radius(px-px) / events": {},
|
||||
"border-bottom-left-radius border-radius(px) / values": {},
|
||||
"border-bottom-left-radius border-radius(px) / events": {},
|
||||
"border-bottom-left-radius border-radius(px-px) / values": {},
|
||||
"border-bottom-left-radius border-radius(px-px) / events": {},
|
||||
"border-bottom-right-radius border-radius(px) / values": {},
|
||||
"border-bottom-right-radius border-radius(px) / events": {},
|
||||
"border-bottom-right-radius border-radius(px-px) / values": {},
|
||||
"border-bottom-right-radius border-radius(px-px) / events": {},
|
||||
"background-image image(url) / values": {},
|
||||
"background-image image(url) / events": {},
|
||||
"background-image image(data) / values": {},
|
||||
"background-image image(data) / events": {},
|
||||
"background-image image(gradient) / values": {},
|
||||
"background-image image(gradient) / events": {},
|
||||
"background-size background-size(keyword) / values": {},
|
||||
"background-size background-size(keyword) / events": {},
|
||||
"box-shadow box-shadow(shadow) / values": {},
|
||||
"box-shadow box-shadow(shadow) / events": {},
|
||||
"font-size-adjust number(integer) / values": {},
|
||||
"font-size-adjust number(integer) / events": {},
|
||||
"font-size-adjust number(decimal) / values": {},
|
||||
"font-size-adjust number(decimal) / events": {},
|
||||
"font-stretch font-stretch(keyword) / values": {},
|
||||
"font-stretch font-stretch(keyword) / events": {},
|
||||
"marker-offset length(pt) / values": {},
|
||||
"marker-offset length(pt) / events": {},
|
||||
"marker-offset length(pc) / values": {},
|
||||
"marker-offset length(pc) / events": {},
|
||||
"marker-offset length(px) / values": {},
|
||||
"marker-offset length(px) / events": {},
|
||||
"marker-offset length(em) / values": {},
|
||||
"marker-offset length(em) / events": {},
|
||||
"marker-offset length(ex) / values": {},
|
||||
"marker-offset length(ex) / events": {},
|
||||
"marker-offset length(mm) / values": {},
|
||||
"marker-offset length(mm) / events": {},
|
||||
"marker-offset length(cm) / values": {},
|
||||
"marker-offset length(cm) / events": {},
|
||||
"marker-offset length(in) / values": {},
|
||||
"marker-offset length(in) / events": {},
|
||||
"text-decoration-color color(rgba) / values": {},
|
||||
"text-decoration-color color(rgba) / events": {},
|
||||
"column-count integer(integer) / values": {},
|
||||
"column-count integer(integer) / events": {},
|
||||
"column-gap length(pt) / values": {},
|
||||
"column-gap length(pt) / events": {},
|
||||
"column-gap length(pc) / values": {},
|
||||
"column-gap length(pc) / events": {},
|
||||
"column-gap length(px) / values": {},
|
||||
"column-gap length(px) / events": {},
|
||||
"column-gap length(em) / values": {},
|
||||
"column-gap length(em) / events": {},
|
||||
"column-gap length(ex) / values": {},
|
||||
"column-gap length(ex) / events": {},
|
||||
"column-gap length(mm) / values": {},
|
||||
"column-gap length(mm) / events": {},
|
||||
"column-gap length(cm) / values": {},
|
||||
"column-gap length(cm) / events": {},
|
||||
"column-gap length(in) / values": {},
|
||||
"column-gap length(in) / events": {},
|
||||
"column-rule-color color(rgba) / values": {},
|
||||
"column-rule-color color(rgba) / events": {},
|
||||
"column-rule-width length(pt) / values": {},
|
||||
"column-rule-width length(pt) / events": {},
|
||||
"column-rule-width length(pc) / values": {},
|
||||
"column-rule-width length(pc) / events": {},
|
||||
"column-rule-width length(px) / values": {},
|
||||
"column-rule-width length(px) / events": {},
|
||||
"column-rule-width length(em) / values": {},
|
||||
"column-rule-width length(em) / events": {},
|
||||
"column-rule-width length(ex) / values": {},
|
||||
"column-rule-width length(ex) / events": {},
|
||||
"column-rule-width length(mm) / values": {},
|
||||
"column-rule-width length(mm) / events": {},
|
||||
"column-rule-width length(cm) / values": {},
|
||||
"column-rule-width length(cm) / events": {},
|
||||
"column-rule-width length(in) / values": {},
|
||||
"column-rule-width length(in) / events": {},
|
||||
"column-width length(pt) / values": {},
|
||||
"column-width length(pt) / events": {},
|
||||
"column-width length(pc) / values": {},
|
||||
"column-width length(pc) / events": {},
|
||||
"column-width length(px) / values": {},
|
||||
"column-width length(px) / events": {},
|
||||
"column-width length(em) / values": {},
|
||||
"column-width length(em) / events": {},
|
||||
"column-width length(ex) / values": {},
|
||||
"column-width length(ex) / events": {},
|
||||
"column-width length(mm) / values": {},
|
||||
"column-width length(mm) / events": {},
|
||||
"column-width length(cm) / values": {},
|
||||
"column-width length(cm) / events": {},
|
||||
"column-width length(in) / values": {},
|
||||
"column-width length(in) / events": {},
|
||||
"transform transform(rotate) / values": {},
|
||||
"transform transform(rotate) / events": {},
|
||||
"transform-origin horizontal(keyword) / values": {},
|
||||
"transform-origin horizontal(keyword) / events": {},
|
||||
"zoom number(integer) / values": {},
|
||||
"zoom number(integer) / events": {},
|
||||
"zoom number(decimal) / values": {},
|
||||
"zoom number(decimal) / events": {},
|
||||
"outline-radius-topleft length(pt) / values": {},
|
||||
"outline-radius-topleft length(pt) / events": {},
|
||||
"outline-radius-topleft length(pc) / values": {},
|
||||
"outline-radius-topleft length(pc) / events": {},
|
||||
"outline-radius-topleft length(px) / values": {},
|
||||
"outline-radius-topleft length(px) / events": {},
|
||||
"outline-radius-topleft length(em) / values": {},
|
||||
"outline-radius-topleft length(em) / events": {},
|
||||
"outline-radius-topleft length(ex) / values": {},
|
||||
"outline-radius-topleft length(ex) / events": {},
|
||||
"outline-radius-topleft length(mm) / values": {},
|
||||
"outline-radius-topleft length(mm) / events": {},
|
||||
"outline-radius-topleft length(cm) / values": {},
|
||||
"outline-radius-topleft length(cm) / events": {},
|
||||
"outline-radius-topleft length(in) / values": {},
|
||||
"outline-radius-topleft length(in) / events": {},
|
||||
"outline-radius-topleft percentage(%) / values": {},
|
||||
"outline-radius-topleft percentage(%) / events": {},
|
||||
"outline-radius-topright length(pt) / values": {},
|
||||
"outline-radius-topright length(pt) / events": {},
|
||||
"outline-radius-topright length(pc) / values": {},
|
||||
"outline-radius-topright length(pc) / events": {},
|
||||
"outline-radius-topright length(px) / values": {},
|
||||
"outline-radius-topright length(px) / events": {},
|
||||
"outline-radius-topright length(em) / values": {},
|
||||
"outline-radius-topright length(em) / events": {},
|
||||
"outline-radius-topright length(ex) / values": {},
|
||||
"outline-radius-topright length(ex) / events": {},
|
||||
"outline-radius-topright length(mm) / values": {},
|
||||
"outline-radius-topright length(mm) / events": {},
|
||||
"outline-radius-topright length(cm) / values": {},
|
||||
"outline-radius-topright length(cm) / events": {},
|
||||
"outline-radius-topright length(in) / values": {},
|
||||
"outline-radius-topright length(in) / events": {},
|
||||
"outline-radius-topright percentage(%) / values": {},
|
||||
"outline-radius-topright percentage(%) / events": {},
|
||||
"outline-radius-bottomright length(pt) / values": {},
|
||||
"outline-radius-bottomright length(pt) / events": {},
|
||||
"outline-radius-bottomright length(pc) / values": {},
|
||||
"outline-radius-bottomright length(pc) / events": {},
|
||||
"outline-radius-bottomright length(px) / values": {},
|
||||
"outline-radius-bottomright length(px) / events": {},
|
||||
"outline-radius-bottomright length(em) / values": {},
|
||||
"outline-radius-bottomright length(em) / events": {},
|
||||
"outline-radius-bottomright length(ex) / values": {},
|
||||
"outline-radius-bottomright length(ex) / events": {},
|
||||
"outline-radius-bottomright length(mm) / values": {},
|
||||
"outline-radius-bottomright length(mm) / events": {},
|
||||
"outline-radius-bottomright length(cm) / values": {},
|
||||
"outline-radius-bottomright length(cm) / events": {},
|
||||
"outline-radius-bottomright length(in) / values": {},
|
||||
"outline-radius-bottomright length(in) / events": {},
|
||||
"outline-radius-bottomright percentage(%) / values": {},
|
||||
"outline-radius-bottomright percentage(%) / events": {},
|
||||
"outline-radius-bottomleft length(pt) / values": {},
|
||||
"outline-radius-bottomleft length(pt) / events": {},
|
||||
"outline-radius-bottomleft length(pc) / values": {},
|
||||
"outline-radius-bottomleft length(pc) / events": {},
|
||||
"outline-radius-bottomleft length(px) / values": {},
|
||||
"outline-radius-bottomleft length(px) / events": {},
|
||||
"outline-radius-bottomleft length(em) / values": {},
|
||||
"outline-radius-bottomleft length(em) / events": {},
|
||||
"outline-radius-bottomleft length(ex) / values": {},
|
||||
"outline-radius-bottomleft length(ex) / events": {},
|
||||
"outline-radius-bottomleft length(mm) / values": {},
|
||||
"outline-radius-bottomleft length(mm) / events": {},
|
||||
"outline-radius-bottomleft length(cm) / values": {},
|
||||
"outline-radius-bottomleft length(cm) / events": {},
|
||||
"outline-radius-bottomleft length(in) / values": {},
|
||||
"outline-radius-bottomleft length(in) / events": {},
|
||||
"outline-radius-bottomleft percentage(%) / values": {},
|
||||
"outline-radius-bottomleft percentage(%) / events": {},
|
||||
"display display(static to absolute) / values": {},
|
||||
"display display(static to absolute) / events": {},
|
||||
"display display(block to inline-block) / values": {},
|
||||
"display display(block to inline-block) / events": {},
|
||||
"position position(static to absolute) / values": {},
|
||||
"position position(static to absolute) / events": {},
|
||||
"position position(relative to absolute) / values": {},
|
||||
"position position(relative to absolute) / events": {},
|
||||
"position position(absolute to fixed) / values": {},
|
||||
"position position(absolute to fixed) / events": {}
|
||||
}
|
||||
*/</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- required by testharnessreport.js -->
|
||||
<div id="log"></div>
|
||||
<!-- elements used for testing -->
|
||||
<div class="fixture" id="fixture">
|
||||
<div class="container">
|
||||
<div class="transition">Text sample</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="offscreen"></div>
|
||||
|
||||
<!--
|
||||
SEE ./support/README.md for an abstract explanation of the test procedure
|
||||
http://test.csswg.org/source/contributors/rodneyrehm/submitted/css3-transitions/README.md
|
||||
-->
|
||||
|
||||
<script>
|
||||
// see README.md for an explanation of how this test suite works
|
||||
// this suite tests properties that haven't been specified at all
|
||||
// (like background-image and column-rule-width)
|
||||
|
||||
// this test takes its time, give it a minute to run
|
||||
var timeout = 60000;
|
||||
setup({timeout: timeout});
|
||||
|
||||
var tests = getUnspecifiedPropertyTests();
|
||||
// for testing, limit to a couple of iterations
|
||||
// tests = tests.slice(10, 30);
|
||||
// or filter using one of:
|
||||
// tests = filterPropertyTests(tests, "background-color color(rgba)");
|
||||
// tests = filterPropertyTests(tests, ["background-color color(rgba)", ...]);
|
||||
// tests = filterPropertyTests(tests, /^background-color/);
|
||||
|
||||
// general transition-duration
|
||||
var duration = '0.5s';
|
||||
|
||||
runParallelAsyncHarness({
|
||||
// array of test data
|
||||
tests: tests,
|
||||
// the number of tests to run in parallel
|
||||
testsPerSlice: 50,
|
||||
// milliseconds to wait before calling teardown and ending test
|
||||
duration: parseFloat(duration) * 1000,
|
||||
// the global suite timeout
|
||||
timeout: timeout,
|
||||
// prepare individual test
|
||||
setup: function(data, options) {
|
||||
var styles = {
|
||||
'.fixture': {},
|
||||
|
||||
'.container': data.parentStyle,
|
||||
'.container.to': {},
|
||||
'.container.how': {},
|
||||
|
||||
'.transition': data.from,
|
||||
'.transition.to' : data.to,
|
||||
'.transition.how' : {transition: 'all ' + duration + ' linear 0s'}
|
||||
};
|
||||
|
||||
generalParallelTest.setup(data, options);
|
||||
generalParallelTest.addStyles(data, options, styles);
|
||||
},
|
||||
// cleanup after individual test
|
||||
teardown: generalParallelTest.teardown,
|
||||
// invoked prior to running a slice of tests
|
||||
sliceStart: generalParallelTest.sliceStart,
|
||||
// invoked after running a slice of tests
|
||||
sliceDone: generalParallelTest.sliceDone,
|
||||
// test cases, make them as granular as possible
|
||||
cases: {
|
||||
// test property values while transitioning
|
||||
// values.start kicks off a transition
|
||||
'values': {
|
||||
// run actual test, assertions can be used here!
|
||||
start: function(test, data, options) {
|
||||
// identify initial and target values
|
||||
generalParallelTest.getStyle(data);
|
||||
// make sure values differ, if they don't, the property could most likely not be parsed
|
||||
assert_not_equals(data.transition.from, data.transition.to, "initial and target values may not match");
|
||||
// kick off the transition
|
||||
generalParallelTest.startTransition(data);
|
||||
|
||||
// make sure we didn't get the target value immediately.
|
||||
// If we did, there wouldn't be a transition!
|
||||
var current = data.transition.computedStyle(data.property);
|
||||
assert_not_equals(current, data.transition.to, "must not be target value after start");
|
||||
},
|
||||
done: function(test, data, options) {
|
||||
// make sure the property's value were neither initial nor target while transitioning
|
||||
test.step(generalParallelTest.assertIntermediateValuesFunc(data, 'transition'));
|
||||
}
|
||||
},
|
||||
// test TransitionEnd events
|
||||
'events': {
|
||||
done: function(test, data, options) {
|
||||
// make sure there were no events on parent
|
||||
test.step(generalParallelTest.assertExpectedEventsFunc(data, 'container', ""));
|
||||
// make sure we got the event for the tested property only
|
||||
test.step(generalParallelTest.assertExpectedEventsFunc(data, 'transition', addVendorPrefix(data.property) + ":" + duration));
|
||||
}
|
||||
}
|
||||
},
|
||||
// called once all tests are done
|
||||
done: generalParallelTest.done
|
||||
});
|
||||
</script>
|
||||
|
||||
</body></html>
|
Loading…
Add table
Add a link
Reference in a new issue