chromium/third_party/blink/web_tests/external/wpt/css/css-typed-om/the-stylepropertymap/declared/get-shorthand.html

<!doctype html>
<meta charset="utf-8">
<title>Declared StylePropertyMap.get with shorthands</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#get-a-value-from-a-stylepropertymap">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../resources/testhelper.js"></script>
<body>
<div id="log">
<script>
'use strict';

test(t => {
  const styleMap = createDeclaredStyleMap(t, 'margin: 1px 2px 3px 4px');
  const result = styleMap.get('margin');
  assert_not_equals(result, null, 'Shorthand value must not be null');
  assert_class_string(result, 'CSSStyleValue',
    'Shorthand value must be a base CSSStyleValue');
}, 'Getting a shorthand property set explicitly in css rule returns ' +
   'a base CSSStyleValue');

test(t => {
  const styleMap = createDeclaredStyleMap(t, 'margin-top: 1px');
  const result = styleMap.get('margin');
  assert_equals(result, null,
    'Shorthand value must be null as it is not explicitly set');
}, 'Getting a shorthand property that is partially set in css rule ' +
   'returns null');

</script>