mirror of
https://github.com/servo/servo.git
synced 2025-08-24 06:45:33 +01:00
Parse perspective property as non negative and add tests
This commit is contained in:
parent
c5c4354f84
commit
20c07332a1
4 changed files with 50 additions and 0 deletions
|
@ -11100,6 +11100,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/perspective.html": [
|
||||
[
|
||||
"/_mozilla/css/perspective.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/stylesheet_media_queries.html": [
|
||||
[
|
||||
"/_mozilla/css/stylesheet_media_queries.html",
|
||||
|
@ -22741,6 +22747,10 @@
|
|||
"001acfd664f89e45ab321bf549803ca24d44e098",
|
||||
"support"
|
||||
],
|
||||
"css/perspective.html": [
|
||||
"6d455ef4b9c815d89917f496999268d7410cfa62",
|
||||
"testharness"
|
||||
],
|
||||
"css/perspective_zero.html": [
|
||||
"bcb877f51808e896d8024877f945ce289dbc6b36",
|
||||
"reftest"
|
||||
|
|
28
tests/wpt/mozilla/tests/css/perspective.html
Normal file
28
tests/wpt/mozilla/tests/css/perspective.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!doctype html>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: parsing perspective property</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="test"></div>
|
||||
|
||||
<script>
|
||||
test(function () {
|
||||
var test = document.getElementById('test');
|
||||
var tests = [
|
||||
["none", "none"],
|
||||
["0px", "0px"],
|
||||
["100px", "100px"],
|
||||
["-200px", ""],
|
||||
["300PX", "300px"],
|
||||
];
|
||||
for (var i = 0; i < tests.length; ++i) {
|
||||
var specified = tests[i][0];
|
||||
var expected = tests[i][1];
|
||||
test.style.perspective = specified;
|
||||
assert_equals(test.style.perspective, expected);
|
||||
test.style.perspective = '';
|
||||
}
|
||||
}, "Parsing of the perspective property");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue