blob: a6dfade280db05a613b86c2e475bdaccf3626e0e [file] [log] [blame]
<!doctype html>
<meta charset="utf-8">
<title>StylePropertyMap.getProperties tests</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-getproperties">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../resources/testhelper.js"></script>
<body>
<script>
'use strict';
test(t => {
const styleMap = createInlineStyleMap(t, '');
assert_array_equals(styleMap.getProperties(), []);
}, 'Calling StylePropertyMap.getProperties on an empty property model returns a zero-length array');
test(t => {
const styleMap = createInlineStyleMap(t, '--A: A; width: 0px; --C: C; transition-duration: 1s, 2s; color: red; --B: B;');
assert_array_equals(styleMap.getProperties(),
['color', 'transition-duration', 'width', '--A', '--B', '--C']);
}, 'StylePropertyMap.getProperties returns property names in correct order');
</script>