Author: sdzmitrovich
Date: 2009-09-28 09:12:32 -0400 (Mon, 28 Sep 2009)
New Revision: 17779
Added:
trunk/jst/tests/org.jboss.tools.jst.css.test/resources/cssTest/WebContent/pages/JBIDE/4677/
trunk/jst/tests/org.jboss.tools.jst.css.test/resources/cssTest/WebContent/pages/JBIDE/4677/notCompletedCss
.css
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/jbide/NotCompletedCSS_JBIDE4677.java
Modified:
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/CSSAllTests.java
Log:
JBIDE-4677
Added:
trunk/jst/tests/org.jboss.tools.jst.css.test/resources/cssTest/WebContent/pages/JBIDE/4677/notCompletedCss
.css
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.css.test/resources/cssTest/WebContent/pages/JBIDE/4677/notCompletedCss
.css (rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.css.test/resources/cssTest/WebContent/pages/JBIDE/4677/notCompletedCss
.css 2009-09-28 13:12:32 UTC (rev 17779)
@@ -0,0 +1 @@
+.cssclass{
\ No newline at end of file
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.css.test/resources/cssTest/WebContent/pages/JBIDE/4677/notCompletedCss
.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Modified:
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/CSSAllTests.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/CSSAllTests.java 2009-09-28
10:28:51 UTC (rev 17778)
+++
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/CSSAllTests.java 2009-09-28
13:12:32 UTC (rev 17779)
@@ -16,6 +16,7 @@
import org.jboss.tools.jst.css.test.jbide.ExtendingCSSViewTest_JBIDE4850;
import org.jboss.tools.jst.css.test.jbide.InputFractionalValueTest_JBIDE4790;
+import org.jboss.tools.jst.css.test.jbide.NotCompletedCSS_JBIDE4677;
import org.jboss.tools.jst.css.test.jbide.SelectionLosingByPropertySheet_JBIDE4791;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -37,6 +38,7 @@
suite.addTestSuite(InputFractionalValueTest_JBIDE4790.class);
suite.addTestSuite(SelectionLosingByPropertySheet_JBIDE4791.class);
suite.addTestSuite(ExtendingCSSViewTest_JBIDE4850.class);
+ suite.addTestSuite(NotCompletedCSS_JBIDE4677.class);
// $JUnit-END$
return new ProjectImportTestSetup(
Added:
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/jbide/NotCompletedCSS_JBIDE4677.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/jbide/NotCompletedCSS_JBIDE4677.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/jbide/NotCompletedCSS_JBIDE4677.java 2009-09-28
13:12:32 UTC (rev 17779)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.css.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.part.IPage;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.jst.css.properties.CSSPropertyPage;
+import org.jboss.tools.jst.css.test.AbstractCSSViewTest;
+import org.jboss.tools.jst.css.view.CSSEditorView;
+import org.jboss.tools.test.util.JobUtils;
+
+/**
+ * @author Sergey Dzmitrovich
+ *
+ */
+public class NotCompletedCSS_JBIDE4677 extends AbstractCSSViewTest {
+
+ public static final String TEST_PAGE_NAME = "JBIDE/4677/notCompletedCss .css";
//$NON-NLS-1$
+
+ public void testInlineStyleEditing() throws CoreException,
+ SecurityException, IllegalArgumentException, NoSuchFieldException,
+ IllegalAccessException {
+
+ IFile pageFile = getComponentPath(TEST_PAGE_NAME, getProjectName());
+
+ assertNotNull(pageFile);
+
+ StructuredTextEditor editor = (StructuredTextEditor) openEditor(
+ pageFile, CSS_EDITOR_ID);
+
+ JobUtils.waitForIdle();
+
+ assertNotNull(editor);
+
+ CSSEditorView view = (CSSEditorView) openView(CSS_EDITOR_VIEW);
+
+ assertNotNull(view);
+
+ IPage page = view.getCurrentPage();
+
+ assertNotNull(page);
+
+ StructuredSelection selection = (StructuredSelection) ((CSSPropertyPage) page)
+ .getCurrentSelection();
+
+ assertNotNull(selection);
+
+ assertNull(selection.getFirstElement());
+
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.css.test/src/org/jboss/tools/jst/css/test/jbide/NotCompletedCSS_JBIDE4677.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native