servo/tests/wpt/css-tests/cssom-1_dev/xhtml1/cssom-cssText-serialize.xht

37 lines
No EOL
1.2 KiB
HTML

<!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>CSSOM Parsing Test: getting cssText must return the result of serializing the CSS declaration blocks.</title>
<link href="mailto:paul.irish@gmail.com" rel="author" title="Paul Irish" />
<link href="http://www.w3.org/TR/cssom-1/#the-cssstyledeclaration-interface" rel="help" />
<link href="http://trac.webkit.org/export/120528/trunk/LayoutTests/fast/css/cssText-cache.html" rel="source" />
<meta content="dom" name="flags" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<div id="box"></div>
<script>
var style = document.getElementById('box').style;
test(function(){
style.left = "10px";
assert_equals(style.cssText, "left: 10px");
style.right = "20px";
assert_equals(style.cssText, "left: 10px; right: 20px;");
}, 'CSSStyleDeclaration cssText serializes declaration blocks.');
</script>
</body></html>