Bug 1114929: Add a test for multiline comment. r=pbro
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Thu, 21 Mar 2019 09:18:31 +0000
changeset 465404 168ced56310572786eec78fd04e29e6340b84ddb
parent 465403 9c404dce84745cd0b99acb604becca42c3777fbe
child 465405 bdd4df54671bee54c1c1a2e64479dec8f439c518
push id112505
push useropoprus@mozilla.com
push dateThu, 21 Mar 2019 23:01:57 +0000
treeherdermozilla-inbound@feda786b35cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1114929
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1114929: Add a test for multiline comment. r=pbro Depends on D24118 Differential Revision: https://phabricator.services.mozilla.com/D24119
devtools/shared/tests/unit/test_prettifyCSS.js
--- a/devtools/shared/tests/unit/test_prettifyCSS.js
+++ b/devtools/shared/tests/unit/test_prettifyCSS.js
@@ -155,16 +155,28 @@ const TESTS_SPACE_INDENT = [
       "div,",
       "input,",
       "pre,",
       "table {",
       " color: blue;",
       "}",
     ],
   },
+
+  { name: "Multiline comment in CSS",
+    input: "/*\n * comment\n */\n#example{display:grid;}",
+    expected: [
+      "/*",
+      " * comment",
+      " */",
+      "#example {",
+      " display:grid;",
+      "}",
+    ],
+  },
 ];
 
 function run_test() {
   // Note that prettifyCSS.LINE_SEPARATOR is computed lazily, so we
   // ensure it is set.
   prettifyCSS("");
 
   Services.prefs.setBoolPref(EXPAND_TAB, true);