test_getCssPropertyName.js 718 B

123456789101112131415161718192021222324252627
  1. /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
  2. /* Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/ */
  4. "use strict";
  5. var Cu = Components.utils;
  6. const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
  7. const {getCssPropertyName} = require("devtools/client/animationinspector/components/animation-details");
  8. const TEST_DATA = [{
  9. jsName: "alllowercase",
  10. cssName: "alllowercase"
  11. }, {
  12. jsName: "borderWidth",
  13. cssName: "border-width"
  14. }, {
  15. jsName: "borderTopRightRadius",
  16. cssName: "border-top-right-radius"
  17. }];
  18. function run_test() {
  19. for (let {jsName, cssName} of TEST_DATA) {
  20. equal(getCssPropertyName(jsName), cssName);
  21. }
  22. }