[390903] [formatting] CSS formatter inserts space before closing parenthesis
[390904] [formatting] CSS formatter moves comment to the previous line
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestFormatProcessorCSS.java b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestFormatProcessorCSS.java
index 44de2a7..fd1bdbd 100644
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestFormatProcessorCSS.java
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestFormatProcessorCSS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -190,4 +190,20 @@
 	public void testInlineComment() throws UnsupportedEncodingException, IOException, CoreException {
 		formatAndAssertEquals("testfiles/inline-comment.css", "testfiles/inline-comment-fmt.css");
 	}
+	
+	/**
+	 * should not add an extra space before closing parenthesis
+	 */
+	
+	public void testSpaceBeforeClosingParenthesis_bug390903() throws UnsupportedEncodingException, IOException, CoreException {
+		formatAndAssertEquals("testfiles/bug390903_SpaceBeforeClosingParenthesis.css", "testfiles/bug390903_SpaceBeforeClosingParenthesis-fmt.css");
+	} 
+	
+	/**
+	 * should keep comments in the same line
+	 */
+	public void testKeepCommentInSameLine_bug390904() throws UnsupportedEncodingException, IOException, CoreException {
+		formatAndAssertEquals("testfiles/bug390904_KeepCommentInSameLine.css", "testfiles/bug390904_KeepCommentInSameLine-fmt.css");
+	} 
+	
 }
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390903_SpaceBeforeClosingParenthesis-fmt.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390903_SpaceBeforeClosingParenthesis-fmt.css
new file mode 100644
index 0000000..8bb5d37
--- /dev/null
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390903_SpaceBeforeClosingParenthesis-fmt.css
@@ -0,0 +1,6 @@
+div {
+	background-image: linear-gradient(top, rgba(255, 255, 255, .2),
+		rgba(150, 150, 150, .2), rgba(0, 0, 0, .0)) !important;
+	background-image: linear-gradient(top, rgba(255, 255, 255, .2),
+		rgba(150, 150, 150, .2), rgba(0, 0, 0, .0)) !important;
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390903_SpaceBeforeClosingParenthesis.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390903_SpaceBeforeClosingParenthesis.css
new file mode 100644
index 0000000..dada467
--- /dev/null
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390903_SpaceBeforeClosingParenthesis.css
@@ -0,0 +1,4 @@
+div {
+  background-image: linear-gradient(top, rgba(255, 255, 255, .2), rgba(150, 150, 150, .2), rgba(0, 0, 0, .0)) !important;
+  background-image: linear-gradient(top, rgba(255, 255, 255, .2), rgba(150, 150, 150, .2), rgba(0, 0, 0, .0) ) !important;
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390904_KeepCommentInSameLine-fmt.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390904_KeepCommentInSameLine-fmt.css
new file mode 100644
index 0000000..f49b41e
--- /dev/null
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390904_KeepCommentInSameLine-fmt.css
@@ -0,0 +1,19 @@
+div { /* comment 1 */

+	display: block;

+	/* comment 2 */

+	color: red;

+}

+

+div {

+	/* comment 1 */

+	display: block;

+	/* comment 2 */

+	color: red;

+}

+

+div {

+	/* comment 1 */

+	display: block;

+	/* comment 2 */

+	color: red;

+}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390904_KeepCommentInSameLine.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390904_KeepCommentInSameLine.css
new file mode 100644
index 0000000..c6ce8d9
--- /dev/null
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug390904_KeepCommentInSameLine.css
@@ -0,0 +1,24 @@
+div {      /* comment 1 */

+	display: block;

+	/* comment 2 */

+	color: red;

+}

+

+div { 

+	

+	

+	

+	

+	

+	/* comment 1 */

+	display: block;

+	/* comment 2 */

+	color: red;

+}

+

+div {      

+	/* comment 1 */

+	display: block;

+	/* comment 2 */

+	color: red;

+}
\ No newline at end of file