From jbosstools-commits at lists.jboss.org Tue Jul 8 12:14:05 2008 Content-Type: multipart/mixed; boundary="===============5213313366723407190==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r9095 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: resources/jsfTest/WebContent/pages/JBIDE/2170/templates and 1 other directories. Date: Tue, 08 Jul 2008 12:14:04 -0400 Message-ID: --===============5213313366723407190== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sdzmitrovich Date: 2008-07-08 12:14:04 -0400 (Tue, 08 Jul 2008) New Revision: 9095 Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebCo= ntent/pages/JBIDE/2170/complex_doctype_test.xhtml trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebCo= ntent/pages/JBIDE/2170/templates/1.xhtml trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebCo= ntent/pages/JBIDE/2170/templates/2.xhtml Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf= /vpe/jsf/test/jbide/JsfJbide2170Test.java Log: http://jira.jboss.com/jira/browse/JBIDE-2170 Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/W= ebContent/pages/JBIDE/2170/complex_doctype_test.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebC= ontent/pages/JBIDE/2170/complex_doctype_test.xhtml = (rev 0) +++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebC= ontent/pages/JBIDE/2170/complex_doctype_test.xhtml 2008-07-08 16:14:04 UTC = (rev 9095) @@ -0,0 +1,27 @@ + + + + + + + = + Input User Name + = + Facelets Hello Application + + + +
+ ${msg.prompt} + + +
+ = +
+
+ Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/W= ebContent/pages/JBIDE/2170/templates/1.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebC= ontent/pages/JBIDE/2170/templates/1.xhtml (rev 0) +++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebC= ontent/pages/JBIDE/2170/templates/1.xhtml 2008-07-08 16:14:04 UTC (rev 9095) @@ -0,0 +1,4 @@ + + + Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/W= ebContent/pages/JBIDE/2170/templates/2.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebC= ontent/pages/JBIDE/2170/templates/2.xhtml (rev 0) +++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebC= ontent/pages/JBIDE/2170/templates/2.xhtml 2008-07-08 16:14:04 UTC (rev 9095) @@ -0,0 +1,65 @@ + + + = + + + <ui:insert name=3D"pageTitle">Page Title</ui:insert> + + + + + + + + + + + + + = + + + + = + = + + + + +
+ Page Header +
+ + + + + + +
+ = + Page Body + = +
+
+ + = + \ No newline at end of file Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/to= ols/jsf/vpe/jsf/test/jbide/JsfJbide2170Test.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/js= f/vpe/jsf/test/jbide/JsfJbide2170Test.java 2008-07-08 15:32:51 UTC (rev 909= 4) +++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/js= f/vpe/jsf/test/jbide/JsfJbide2170Test.java 2008-07-08 16:14:04 UTC (rev 909= 5) @@ -30,14 +30,18 @@ */ public class JsfJbide2170Test extends VpeTest { = - public static final String IMPORT_PROJECT_NAME =3D "jsfTest"; + public static final String IMPORT_PROJECT_NAME =3D "jsfTest"; //$NON-NLS-= 1$ = - private static final String WITHOUT_DOCTYPE_TEST_PAGE_NAME =3D "JBIDE/217= 0/there_is_not_doctype.xhtml"; + private static final String WITHOUT_DOCTYPE_TEST_PAGE_NAME =3D "JBIDE/217= 0/there_is_not_doctype.xhtml"; //$NON-NLS-1$ = - private static final String WITH_DOCTYPE_TEST_PAGE_NAME =3D "JBIDE/2170/t= here_is_doctype.xhtml"; + private static final String WITH_DOCTYPE_TEST_PAGE_NAME =3D "JBIDE/2170/t= here_is_doctype.xhtml"; //$NON-NLS-1$ = - private static final String TEMPLATE_DOCTYPE_TEST_PAGE_NAME =3D "JBIDE/21= 70/template_doctype_test.xhtml"; + private static final String TEMPLATE_DOCTYPE_TEST_PAGE_NAME =3D "JBIDE/21= 70/template_doctype_test.xhtml"; //$NON-NLS-1$ = + private static final String COMPLEX_DOCTYPE_TEST_PAGE_NAME =3D "JBIDE/217= 0/complex_doctype_test.xhtml"; //$NON-NLS-1$ + + private static final String CORRECT_NAME =3D "html3"; //$NON-NLS-1$ + public JsfJbide2170Test(String name) { super(name); } @@ -177,4 +181,51 @@ } = } + + /** + * = + * @throws Throwable + */ + public void testComplexDoctypePage() throws Throwable { + + // wait + TestUtil.waitForJobs(); + // set exception + setException(null); + + // get test page path + IFile file =3D (IFile) TestUtil.getComponentPath( + COMPLEX_DOCTYPE_TEST_PAGE_NAME, IMPORT_PROJECT_NAME); + + IEditorInput input =3D new FileEditorInput(file); + + // open and get editor + JSPMultiPageEditor part =3D openEditor(input); + + // get doctype from opened page + String basicDoctypeString =3D DocTypeUtil.getDoctype(input); + + // doctype must be not null + assertNotNull(basicDoctypeString); + // length of doctype must be more than 0 + assertEquals(true, basicDoctypeString.length() > 0); + + // get dom document + nsIDOMDocument document =3D getVpeVisualDocument(part); + assertNotNull(document); + + // get doctype + nsIDOMDocumentType vpeDocumentType =3D document.getDoctype(); + + // doctype must be not null + assertNotNull(vpeDocumentType); + + assertEquals(CORRECT_NAME, vpeDocumentType.getName()); + // check exception + if (getException() !=3D null) { + throw getException(); + } + + } + } --===============5213313366723407190==--