mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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,46 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
||||
<title>JS test: Rotate via javascript must show the correct computed rotation</title>
|
||||
<link href="http://mrkn.co/axegs" rel="author" title="Rick Hurst" />
|
||||
<link href="http://www.w3.org/TR/css-transforms-1/#transform-property" rel="help" />
|
||||
<meta content="css3, rotate, svg" name="flags" />
|
||||
<meta content="Asserting that you can rotate an element with JS and it show up in CSS computed values not as a matrix but as the rotation" name="assert" />
|
||||
<style>
|
||||
#box{
|
||||
margin-top:30px;
|
||||
display: block;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Rotate via JS</h1>
|
||||
<div id="log"></div>
|
||||
<div id="box"></div>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
(function(){
|
||||
var box = document.getElementById("box"),
|
||||
assertion = "",
|
||||
expectation = "rotate(30deg)",
|
||||
should_string = "this should make a small green square rotated 30 degrees, and the browser should return the rotation as 30 degrees as the computed value NOT a matrix",
|
||||
extra_properties = null,
|
||||
computed_angle = 0,
|
||||
a_1 = "";
|
||||
a_2 = "",
|
||||
my_value = "",
|
||||
test_function = {};
|
||||
box.style.Transform = "rotate(30deg)";
|
||||
assertion = window.getComputedStyle(box).getPropertyValue("transform");
|
||||
test_function = function(){
|
||||
assert_equals(assertion, expectation);
|
||||
}
|
||||
test(test_function, should_string);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
</body></html>
|
Loading…
Add table
Add a link
Reference in a new issue