servo/tests/wpt/css-tests/cssom-1_dev/html/index-001.htm

29 lines
No EOL
1 KiB
HTML

<!DOCTYPE html>
<html><head>
<title>CSS OM: CSS Values</title>
<link href="mailto:manian@adobe.com" rel="author" title="Divya Manian">
<link href="http://www.w3.org/TR/cssom-1/#css-values" rel="help">
<meta content="dom" name="flags">
<meta content="The style value should be serialized to margin: 20px;" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="cssomtestElm"></div>
<div id="log"></div>
<script>
var testElm = document.getElementById('cssomtestElm');
// Set the transform
document.getElementById('cssomtestElm').style.margin = "20px 20px 20px 20px";
// Verify that the transform was set as expected
test(function() {assert_equals(
document.getElementById('cssomtestElm').style.cssText, //Actual
"margin: 20px;", //Expected
"Margin should be serialized as 'margin: 20px;'")}, //Description
"margin_20px_20px"); //name
</script>
</body></html>