https://github.com/web-platform-tests/wpt
Raw File
Tip revision: dfc6293bd278f46fb6963950157a4f19b281dca4 authored by Ms2ger on 14 March 2018, 16:45:25 UTC
Fix a link to the README in the documentation.
Tip revision: dfc6293
index-001.html
<!doctype html>
<head>
  <title>CSS OM: CSS Values</title>
  <link rel="author" title="Divya Manian" href="mailto:manian@adobe.com">
  <link rel="help" href="http://www.w3.org/TR/cssom-1/#css-values">
  <meta name="flags" content="dom">
  <meta name="assert" content="The style value should be serialized to margin: 20px;">
  <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>

back to top