| <!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 = createDeclaredStyleMap(t, ''); |
| assert_array_equals(styleMap.getProperties(), []); |
| }, 'Calling StylePropertyMap.getProperties on an empty property model returns a zero-length array'); |
| |
| test(t => { |
| const styleMap = createDeclaredStyleMap(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 CSS properties in alphabetical order then custom properties by codepoint'); |
| |
| </script> |