diff options
Diffstat (limited to 'tests/org.eclipse.wst.html.core.tests')
152 files changed, 0 insertions, 10625 deletions
diff --git a/tests/org.eclipse.wst.html.core.tests/.classpath b/tests/org.eclipse.wst.html.core.tests/.classpath deleted file mode 100644 index 751c8f2e5..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/tests/org.eclipse.wst.html.core.tests/.cvsignore b/tests/org.eclipse.wst.html.core.tests/.cvsignore deleted file mode 100644 index f90a72f76..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -bin -bin.project -build.xml -dev.properties -htmlcoretests.jar -temp.folder diff --git a/tests/org.eclipse.wst.html.core.tests/.project b/tests/org.eclipse.wst.html.core.tests/.project deleted file mode 100644 index 25bb24033..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.wst.html.core.tests</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index afa5c9135..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -encoding/<project>=ISO-8859-1 diff --git a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index df9584eb1..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,80 +0,0 @@ -#Sun Apr 16 14:37:21 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index ef2ac6532..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:39 EDT 2006 -eclipse.preferences.version=1 -internal.default.compliance=default diff --git a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.ltk.core.refactoring.prefs b/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.ltk.core.refactoring.prefs deleted file mode 100644 index c59368c5e..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.ltk.core.refactoring.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.pde.prefs b/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.pde.prefs deleted file mode 100644 index f72495846..000000000 --- a/tests/org.eclipse.wst.html.core.tests/.settings/org.eclipse.pde.prefs +++ /dev/null @@ -1,15 +0,0 @@ -#Sun Apr 16 14:05:29 EDT 2006 -compilers.p.build=0 -compilers.p.deprecated=1 -compilers.p.illegal-att-value=0 -compilers.p.no-required-att=0 -compilers.p.not-externalized-att=0 -compilers.p.unknown-attribute=0 -compilers.p.unknown-class=0 -compilers.p.unknown-element=0 -compilers.p.unknown-resource=0 -compilers.p.unresolved-ex-points=0 -compilers.p.unresolved-import=0 -compilers.p.unused-element-or-attribute=0 -compilers.use-project=true -eclipse.preferences.version=1 diff --git a/tests/org.eclipse.wst.html.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.html.core.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 3604de891..000000000 --- a/tests/org.eclipse.wst.html.core.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,26 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name.0 -Bundle-SymbolicName: org.eclipse.wst.html.core.tests -Bundle-Version: 1.0.0 -Bundle-ClassPath: htmlcoretests.jar -Bundle-Activator: org.eclipse.wst.html.core.tests.HTMLCoreTestsPlugin -Bundle-Vendor: %Bundle-Vendor.0 -Bundle-Localization: plugin -Export-Package: org.eclipse.wst.html.core.tests, - org.eclipse.wst.html.core.tests.misc, - org.eclipse.wst.html.core.tests.model, - org.eclipse.wst.html.core.tests.parser, - org.eclipse.wst.html.core.tests.parser.css, - org.eclipse.wst.html.core.tests.text, - org.eclipse.wst.html.core.tests.text.testfiles.html, - org.eclipse.wst.html.core.tests.utils -Require-Bundle: org.junit, - org.eclipse.wst.html.core, - org.eclipse.wst.xml.core, - org.eclipse.wst.sse.core, - org.eclipse.core.runtime, - org.eclipse.wst.css.core, - com.ibm.icu, - org.eclipse.core.resources -Eclipse-LazyStart: true diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.AttrTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.AttrTest.txt deleted file mode 100644 index b67db1821..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.AttrTest.txt +++ /dev/null @@ -1,19 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.AttrTest -Source : -<a href="<%=c%>">a</a> - - -StructuredDocument Regions : -[0, 9] (<a href=") -[9, 10] (<) -[10, 12] (%=) -[12, 13] (c) -[13, 14] (%) -[14, 18] (>">a) -[18, 22] (</a>) - -Tree : -#document ---a/a@[0, 9] (<a href=")@[18, 22] (</a>) -----#text(<%=c%>">a)@{[9, 10] (<),[10, 12] (%=),[12, 13] (c),[13, 14] (%),[14, 18] (>">a)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.AttrTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.AttrTest2.txt deleted file mode 100644 index 7962c6149..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.AttrTest2.txt +++ /dev/null @@ -1,47 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.AttrTest2 -Source : -<a b="c" d="e">f</a> - - -StructuredDocument Regions : -[0, 15] (<a b="c" d="e">) -[15, 16] (f) -[16, 20] (</a>) - -Tree : -#document ---a/a@[0, 15] (<a b="c" d="e">)@[16, 20] (</a>) -----#text(f)@[15, 16] (f) - -b.name=x:b -b.value=c -a b=null -a x:b=c -Source : -<a x:b="c" d="e">f</a> - - -StructuredDocument Regions : -[0, 17] (<a x:b="c" d="e">) -[17, 18] (f) -[18, 22] (</a>) - -Tree : -#document ---a/a@[0, 17] (<a x:b="c" d="e">)@[18, 22] (</a>) -----#text(f)@[17, 18] (f) - -Source : -<a x:b="c" y:d="e">f</a> - - -StructuredDocument Regions : -[0, 19] (<a x:b="c" y:d="e">) -[19, 20] (f) -[20, 24] (</a>) - -Tree : -#document ---a/a@[0, 19] (<a x:b="c" y:d="e">)@[20, 24] (</a>) -----#text(f)@[19, 20] (f) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest.txt deleted file mode 100644 index 8deb57191..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest.txt +++ /dev/null @@ -1,16 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.CDATASectionTest -Source : -<a><![CDATA[contentOfCDATASection]]></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 36] (<![CDATA[contentOfCDATASection]]>) -[36, 40] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[36, 40] (</a>) -----#cdata-section(contentOfCDATASection)@[3, 36] (<![CDATA[contentOfCDATASection]]>) - -contentOfCDATASection diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest2.txt deleted file mode 100644 index 8ef86ab70..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest2.txt +++ /dev/null @@ -1,46 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.CDATASectionTest2 -Source : -<a><![CDATA[contentOfCDATASection]]></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 36] (<![CDATA[contentOfCDATASection]]>) -[36, 40] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[36, 40] (</a>) -----#cdata-section(contentOfCDATASection)@[3, 36] (<![CDATA[contentOfCDATASection]]>) - -contentOfCDATASection -Source : -<a><![CDATA[new content]]></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 26] (<![CDATA[new content]]>) -[26, 30] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[26, 30] (</a>) -----#cdata-section(new content)@[3, 26] (<![CDATA[new content]]>) - -new content -Source : -<a><![CDATA[new content]]></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 26] (<![CDATA[new content]]>) -[26, 30] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[26, 30] (</a>) -----#cdata-section(new content)@[3, 26] (<![CDATA[new content]]>) - -new content diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest3.txt deleted file mode 100644 index c7cc12171..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.CDATASectionTest3.txt +++ /dev/null @@ -1,46 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.CDATASectionTest3 -Source : -<a><![CDATA[contentOfCDATASection]]></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 36] (<![CDATA[contentOfCDATASection]]>) -[36, 40] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[36, 40] (</a>) -----#cdata-section(contentOfCDATASection)@[3, 36] (<![CDATA[contentOfCDATASection]]>) - -contentOfCDATASection -Source : -<a><![CDATA[new < content]]></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 28] (<![CDATA[new < content]]>) -[28, 32] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[28, 32] (</a>) -----#cdata-section(new < content)@[3, 28] (<![CDATA[new < content]]>) - -new < content -Source : -<a><![CDATA[new > content]]></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 28] (<![CDATA[new > content]]>) -[28, 32] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[28, 32] (</a>) -----#cdata-section(new > content)@[3, 28] (<![CDATA[new > content]]>) - -new > content diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.DocTypeTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.DocTypeTest.txt deleted file mode 100644 index 2cca97b7c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.DocTypeTest.txt +++ /dev/null @@ -1,59 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.DocTypeTest -Source : -<!DOCTYPE HTML><html></html> - - -StructuredDocument Regions : -[0, 15] (<!DOCTYPE HTML>) -[15, 21] (<html>) -[21, 28] (</html>) - -Tree : -#document ---HTML(null)(null)@[0, 15] (<!DOCTYPE HTML>) ---html/html@[15, 21] (<html>)@[21, 28] (</html>) - -Source : -<!DOCTYPE HTML SYSTEM "sytem"><html></html> - - -StructuredDocument Regions : -[0, 30] (<!DOCTYPE HTML SYSTEM "sytem">) -[30, 36] (<html>) -[36, 43] (</html>) - -Tree : -#document ---HTML(null)(sytem)@[0, 30] (<!DOCTYPE HTML SYSTEM "sytem">) ---html/html@[30, 36] (<html>)@[36, 43] (</html>) - -Source : -<!DOCTYPE HTML PUBLIC "public" "sytem"><html></html> - - -StructuredDocument Regions : -[0, 39] (<!DOCTYPE HTML PUBLIC "public" "sytem">) -[39, 45] (<html>) -[45, 52] (</html>) - -Tree : -#document ---HTML(public)(sytem)@[0, 39] (<!DOCTYPE HTML PUBLIC "public" "sytem">) ---html/html@[39, 45] (<html>)@[45, 52] (</html>) - -Source : - <!DOCTYPE HTML PUBLIC "public" "sytem"><html></html> - - -StructuredDocument Regions : -[0, 1] ( ) -[1, 40] (<!DOCTYPE HTML PUBLIC "public" "sytem">) -[40, 46] (<html>) -[46, 53] (</html>) - -Tree : -#document ---#text( )@[0, 1] ( ) ---HTML(public)(sytem)@[1, 40] (<!DOCTYPE HTML PUBLIC "public" "sytem">) ---html/html@[40, 46] (<html>)@[46, 53] (</html>) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest.txt deleted file mode 100644 index ffcd82611..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest.txt +++ /dev/null @@ -1,39 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.ElementTest -Source : -<a><b e="f" c="d"><g /><h /></b></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 18] (<b e="f" c="d">) -[18, 23] (<g />) -[23, 28] (<h />) -[28, 32] (</b>) -[32, 36] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[32, 36] (</a>) -----b/b@[3, 18] (<b e="f" c="d">)@[28, 32] (</b>) -------g/@[18, 23] (<g />) -------h/@[23, 28] (<h />) - -Source : -<a><i e="f" c="d"><g /><h /></i></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 18] (<i e="f" c="d">) -[18, 23] (<g />) -[23, 28] (<h />) -[28, 32] (</i>) -[32, 36] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[32, 36] (</a>) -----i/i@[3, 18] (<i e="f" c="d">)@[28, 32] (</i>) -------g/@[18, 23] (<g />) -------h/@[23, 28] (<h />) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest2.txt deleted file mode 100644 index 9d4609176..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest2.txt +++ /dev/null @@ -1,53 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.ElementTest2 -Source : -<a><b>c</b></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 6] (<b>) -[6, 7] (c) -[7, 11] (</b>) -[11, 15] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[11, 15] (</a>) -----b/b@[3, 6] (<b>)@[7, 11] (</b>) -------#text(c)@[6, 7] (c) - -a.tagName=x:a -Source : -<x:a><b>c</b></x:a> - - -StructuredDocument Regions : -[0, 5] (<x:a>) -[5, 8] (<b>) -[8, 9] (c) -[9, 13] (</b>) -[13, 19] (</x:a>) - -Tree : -#document ---x:a/x:a@[0, 5] (<x:a>)@[13, 19] (</x:a>) -----b/b@[5, 8] (<b>)@[9, 13] (</b>) -------#text(c)@[8, 9] (c) - -Source : -<x:a><y:b>c</y:b></x:a> - - -StructuredDocument Regions : -[0, 5] (<x:a>) -[5, 10] (<y:b>) -[10, 11] (c) -[11, 17] (</y:b>) -[17, 23] (</x:a>) - -Tree : -#document ---x:a/x:a@[0, 5] (<x:a>)@[17, 23] (</x:a>) -----y:b/y:b@[5, 10] (<y:b>)@[11, 17] (</y:b>) -------#text(c)@[10, 11] (c) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest3.txt deleted file mode 100644 index b5dabf405..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ElementTest3.txt +++ /dev/null @@ -1,71 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.ElementTest3 -Source : -<x:a><b>c</b></x:a> - - -StructuredDocument Regions : -[0, 5] (<x:a>) -[5, 8] (<b>) -[8, 9] (c) -[9, 13] (</b>) -[13, 19] (</x:a>) - -Tree : -#document ---x:a/x:a@[0, 5] (<x:a>)@[13, 19] (</x:a>) -----b/b@[5, 8] (<b>)@[9, 13] (</b>) -------#text(c)@[8, 9] (c) - -a.tagName=a -Source : -<a><b>c</b></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 6] (<b>) -[6, 7] (c) -[7, 11] (</b>) -[11, 15] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[11, 15] (</a>) -----b/b@[3, 6] (<b>)@[7, 11] (</b>) -------#text(c)@[6, 7] (c) - -a.tagName=y:a -Source : -<y:a><b>c</b></y:a> - - -StructuredDocument Regions : -[0, 5] (<y:a>) -[5, 8] (<b>) -[8, 9] (c) -[9, 13] (</b>) -[13, 19] (</y:a>) - -Tree : -#document ---y:a/y:a@[0, 5] (<y:a>)@[13, 19] (</y:a>) -----b/b@[5, 8] (<b>)@[9, 13] (</b>) -------#text(c)@[8, 9] (c) - -Source : -<y:a><b>c</b></y:a> - - -StructuredDocument Regions : -[0, 5] (<y:a>) -[5, 8] (<b>) -[8, 9] (c) -[9, 13] (</b>) -[13, 19] (</y:a>) - -Tree : -#document ---y:a/y:a@[0, 5] (<y:a>)@[13, 19] (</y:a>) -----b/b@[5, 8] (<b>)@[9, 13] (</b>) -------#text(c)@[8, 9] (c) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest.txt deleted file mode 100644 index 5ecafe93b..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest.txt +++ /dev/null @@ -1,73 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EmptyTextTest -Source : -<p>a<br></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 8] (<br>) -[8, 12] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[8, 12] (</p>) -----#text(a)@[3, 4] (a) -----br@[4, 8] (<br>) -----#text() - -Source : -<p>a<br></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 8] (<br>) -[8, 12] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[8, 12] (</p>) -----#text(a)@[3, 4] (a) -----br@[4, 8] (<br>) -----#text() -----#text() - -Source : -<p>a<br>b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 8] (<br>) -[8, 9] (b) -[9, 13] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[9, 13] (</p>) -----#text(a)@[3, 4] (a) -----br@[4, 8] (<br>) -----#text(b)@[8, 9] (b) -----#text() - -Source : -<p>a<br>b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 8] (<br>) -[8, 9] (b) -[9, 13] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[9, 13] (</p>) -----#text(a)@[3, 4] (a) -----br@[4, 8] (<br>) -----#text(b)@[8, 9] (b) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest2.txt deleted file mode 100644 index 5386efb99..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest2.txt +++ /dev/null @@ -1,74 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EmptyTextTest2 -Source : -<p></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 7] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[3, 7] (</p>) -----#text() - -Source : -<p>a</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 8] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[4, 8] (</p>) -----#text(a)@[3, 4] (a) - -Source : -<p></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 7] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[3, 7] (</p>) -----#text() - -Source : -<p><b></b></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 6] (<b>) -[6, 10] (</b>) -[10, 14] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[10, 14] (</p>) -----b/b@[3, 6] (<b>)@[6, 10] (</b>) -------#text() - -Source : -<p><b>a</b></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 6] (<b>) -[6, 7] (a) -[7, 11] (</b>) -[11, 15] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[11, 15] (</p>) -----b/b@[3, 6] (<b>)@[7, 11] (</b>) -------#text(a)@[6, 7] (a) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest3.txt deleted file mode 100644 index 0e65eff08..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EmptyTextTest3.txt +++ /dev/null @@ -1,24 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EmptyTextTest3 -Source : - - - -StructuredDocument Regions : - -Tree : -#document ---#text() - -Source : -<a></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 7] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[3, 7] (</a>) ---#text() - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest.txt deleted file mode 100644 index 4a72f84b2..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest.txt +++ /dev/null @@ -1,28 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest -Source : -<p></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 7] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[3, 7] (</p>) - -Source : -<p>&gt;</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 8] (&) -[8, 11] (gt;) -[11, 15] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[11, 15] (</p>) -----#text(>)@{[3, 8] (&),[8, 11] (gt;)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest2.txt deleted file mode 100644 index 7172ef427..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest2.txt +++ /dev/null @@ -1,31 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest2 -Source : -<p>a</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 8] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[4, 8] (</p>) -----#text(a)@[3, 4] (a) - -Source : -<p>a&gt;</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 9] (&) -[9, 12] (gt;) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(a>)@{[3, 4] (a),[4, 9] (&),[9, 12] (gt;)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest3.txt deleted file mode 100644 index 52cb3c90d..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest3.txt +++ /dev/null @@ -1,92 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest3 -Source : -<p>a</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 8] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[4, 8] (</p>) -----#text(a)@[3, 4] (a) - -Source : -<p>ab</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (ab) -[5, 9] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[5, 9] (</p>) -----#text(ab)@[3, 5] (ab) - -Source : -<p>ab&</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (ab) -[5, 10] (&) -[10, 14] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[10, 14] (</p>) -----#text(ab&)@{[3, 5] (ab),[5, 10] (&)} - -Source : -<p>ab&c</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (ab) -[5, 10] (&) -[10, 11] (c) -[11, 15] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[11, 15] (</p>) -----#text(ab&c)@{[3, 5] (ab),[5, 10] (&),[10, 11] (c)} - -Source : -<p>dab&c</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 6] (dab) -[6, 11] (&) -[11, 12] (c) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(dab&c)@{[3, 6] (dab),[6, 11] (&),[11, 12] (c)} - -Source : -<p>dab&ce</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 6] (dab) -[6, 11] (&) -[11, 13] (ce) -[13, 17] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[13, 17] (</p>) -----#text(dab&ce)@{[3, 6] (dab),[6, 11] (&),[11, 13] (ce)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest4.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest4.txt deleted file mode 100644 index 0ce80f936..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest4.txt +++ /dev/null @@ -1,86 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest4 -Source : -<p>a&b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 9] (&) -[9, 10] (b) -[10, 14] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[10, 14] (</p>) -----#text(a&b)@{[3, 4] (a),[4, 9] (&),[9, 10] (b)} - -Source : -<p>a&b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 9] (&) -[9, 10] (b) -[10, 14] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[10, 14] (</p>) -----#text() -----#text(a&b)@{[3, 4] (a),[4, 9] (&),[9, 10] (b)} - -Source : -<p>ca&b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (ca) -[5, 10] (&) -[10, 11] (b) -[11, 15] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[11, 15] (</p>) -----#text(c)@[3,4]([3, 5] (ca)) -----#text(a&b)@{[4,5]([3, 5] (ca)),[5, 10] (&),[10, 11] (b)} - -Source : -<p>ca&ba&b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (ca) -[5, 10] (&) -[10, 12] (ba) -[12, 17] (&) -[17, 18] (b) -[18, 22] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[18, 22] (</p>) -----#text(ca&b)@{[3, 5] (ca),[5, 10] (&),[10,11]([10, 12] (ba))} -----#text(a&b)@{[11,12]([10, 12] (ba)),[12, 17] (&),[17, 18] (b)} - -Source : -<p>ca&b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (ca) -[5, 10] (&) -[10, 11] (b) -[11, 15] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[11, 15] (</p>) -----#text(ca&b)@{[3, 5] (ca),[5, 10] (&),[10, 11] (b)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest5.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest5.txt deleted file mode 100644 index 78eb8c47f..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest5.txt +++ /dev/null @@ -1,36 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest5 -Source : -<p>a&b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 9] (&) -[9, 10] (b) -[10, 14] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[10, 14] (</p>) -----#text(a&b)@{[3, 4] (a),[4, 9] (&),[9, 10] (b)} - -Source : -<p>a&ba&b</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 9] (&) -[9, 11] (ba) -[11, 16] (&) -[16, 17] (b) -[17, 21] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[17, 21] (</p>) -----#text(a&b)@{[3, 4] (a),[4, 9] (&),[9,10]([9, 11] (ba))} -----#text(a&b)@{[10,11]([9, 11] (ba)),[11, 16] (&),[16, 17] (b)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest6.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest6.txt deleted file mode 100644 index 61315f34c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest6.txt +++ /dev/null @@ -1,34 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest6 -Source : -<p>a&</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 9] (&) -[9, 13] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[9, 13] (</p>) -----#text(a&)@{[3, 4] (a),[4, 9] (&)} - -Source : -<p>a&a&</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 4] (a) -[4, 9] (&) -[9, 10] (a) -[10, 15] (&) -[15, 19] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[15, 19] (</p>) -----#text(a&)@{[3, 4] (a),[4, 9] (&)} -----#text(a&)@{[9, 10] (a),[10, 15] (&)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest7.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest7.txt deleted file mode 100644 index 025d98272..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest7.txt +++ /dev/null @@ -1,22 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest7 -Source : -<a>aAA&unk;&unk&unk</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] (a) -[4, 9] (A) -[9, 15] (A) -[15, 20] (&unk;) -[20, 24] (&unk) -[24, 28] (&unk) -[28, 32] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[28, 32] (</a>) -----#text(aAA)@{[3, 4] (a),[4, 9] (A),[9, 15] (A)} -----unk -----#text(&unk&unk)@{[20, 24] (&unk),[24, 28] (&unk)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest8.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest8.txt deleted file mode 100644 index 3decb1b84..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest8.txt +++ /dev/null @@ -1,14 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest8 -Source : -&ibm;&rtp; - - -StructuredDocument Regions : -[0, 5] (&ibm;) -[5, 10] (&rtp;) - -Tree : -#document ---ibm ---rtp - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest9.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest9.txt deleted file mode 100644 index 0802e3a96..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.EntityTest9.txt +++ /dev/null @@ -1,36 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.EntityTest9 -Source : -< - - -StructuredDocument Regions : -[0, 4] (<) - -Tree : -#document ---#text(<)@[0, 4] (<) - -Source : -<> - - -StructuredDocument Regions : -[0, 4] (<) -[4, 7] (>) - -Tree : -#document ---#text(<>)@{[0, 4] (<),[4, 7] (>)} - -Source : -<> - - -StructuredDocument Regions : -[0, 4] (<) -[4, 8] (>) - -Tree : -#document ---#text(<>)@{[0, 4] (<),[4, 8] (>)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.PITest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.PITest.txt deleted file mode 100644 index 36aea6a5b..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.PITest.txt +++ /dev/null @@ -1,16 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.PITest -Source : -<a><?echo $PHP_SELF?></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 21] (<?echo $PHP_SELF?>) -[21, 25] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[21, 25] (</a>) -----echo($PHP_SELF) - -target(echo) data ($PHP_SELF) diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest.txt deleted file mode 100644 index a49679729..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest.txt +++ /dev/null @@ -1,225 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.ParserTest -Source : -<P><B></B><B></B></P><P></P> - - -StructuredDocument Regions : -[0, 3] (<P>) -[3, 6] (<B>) -[6, 10] (</B>) -[10, 13] (<B>) -[13, 17] (</B>) -[17, 21] (</P>) -[21, 24] (<P>) -[24, 28] (</P>) - -Tree : -#document ---P/P@[0, 3] (<P>)@[17, 21] (</P>) -----B/B@[3, 6] (<B>)@[6, 10] (</B>) -----B/B@[10, 13] (<B>)@[13, 17] (</B>) ---P/P@[21, 24] (<P>)@[24, 28] (</P>) - -Source : -a<P><B></B><B></B></P><P></P> - - -StructuredDocument Regions : -[0, 1] (a) -[1, 4] (<P>) -[4, 7] (<B>) -[7, 11] (</B>) -[11, 14] (<B>) -[14, 18] (</B>) -[18, 22] (</P>) -[22, 25] (<P>) -[25, 29] (</P>) - -Tree : -#document ---#text(a)@[0, 1] (a) ---P/P@[1, 4] (<P>)@[18, 22] (</P>) -----B/B@[4, 7] (<B>)@[7, 11] (</B>) -----B/B@[11, 14] (<B>)@[14, 18] (</B>) ---P/P@[22, 25] (<P>)@[25, 29] (</P>) - -Source : -a<P>b<B></B><B></B></P><P></P> - - -StructuredDocument Regions : -[0, 1] (a) -[1, 4] (<P>) -[4, 5] (b) -[5, 8] (<B>) -[8, 12] (</B>) -[12, 15] (<B>) -[15, 19] (</B>) -[19, 23] (</P>) -[23, 26] (<P>) -[26, 30] (</P>) - -Tree : -#document ---#text(a)@[0, 1] (a) ---P/P@[1, 4] (<P>)@[19, 23] (</P>) -----#text(b)@[4, 5] (b) -----B/B@[5, 8] (<B>)@[8, 12] (</B>) -----B/B@[12, 15] (<B>)@[15, 19] (</B>) ---P/P@[23, 26] (<P>)@[26, 30] (</P>) - -Source : -a<P>b<B></B>c<B></B></P><P></P> - - -StructuredDocument Regions : -[0, 1] (a) -[1, 4] (<P>) -[4, 5] (b) -[5, 8] (<B>) -[8, 12] (</B>) -[12, 13] (c) -[13, 16] (<B>) -[16, 20] (</B>) -[20, 24] (</P>) -[24, 27] (<P>) -[27, 31] (</P>) - -Tree : -#document ---#text(a)@[0, 1] (a) ---P/P@[1, 4] (<P>)@[20, 24] (</P>) -----#text(b)@[4, 5] (b) -----B/B@[5, 8] (<B>)@[8, 12] (</B>) -----#text(c)@[12, 13] (c) -----B/B@[13, 16] (<B>)@[16, 20] (</B>) ---P/P@[24, 27] (<P>)@[27, 31] (</P>) - -Source : -a<P>b<B></B>c<B></B>d</P><P></P> - - -StructuredDocument Regions : -[0, 1] (a) -[1, 4] (<P>) -[4, 5] (b) -[5, 8] (<B>) -[8, 12] (</B>) -[12, 13] (c) -[13, 16] (<B>) -[16, 20] (</B>) -[20, 21] (d) -[21, 25] (</P>) -[25, 28] (<P>) -[28, 32] (</P>) - -Tree : -#document ---#text(a)@[0, 1] (a) ---P/P@[1, 4] (<P>)@[21, 25] (</P>) -----#text(b)@[4, 5] (b) -----B/B@[5, 8] (<B>)@[8, 12] (</B>) -----#text(c)@[12, 13] (c) -----B/B@[13, 16] (<B>)@[16, 20] (</B>) -----#text(d)@[20, 21] (d) ---P/P@[25, 28] (<P>)@[28, 32] (</P>) - -Source : -a<P>b<B></B>c<B></B>d</P>e<P></P> - - -StructuredDocument Regions : -[0, 1] (a) -[1, 4] (<P>) -[4, 5] (b) -[5, 8] (<B>) -[8, 12] (</B>) -[12, 13] (c) -[13, 16] (<B>) -[16, 20] (</B>) -[20, 21] (d) -[21, 25] (</P>) -[25, 26] (e) -[26, 29] (<P>) -[29, 33] (</P>) - -Tree : -#document ---#text(a)@[0, 1] (a) ---P/P@[1, 4] (<P>)@[21, 25] (</P>) -----#text(b)@[4, 5] (b) -----B/B@[5, 8] (<B>)@[8, 12] (</B>) -----#text(c)@[12, 13] (c) -----B/B@[13, 16] (<B>)@[16, 20] (</B>) -----#text(d)@[20, 21] (d) ---#text(e)@[25, 26] (e) ---P/P@[26, 29] (<P>)@[29, 33] (</P>) - -Source : -a<P>b<B></B>c<B></B>d</P>e<P>f</P> - - -StructuredDocument Regions : -[0, 1] (a) -[1, 4] (<P>) -[4, 5] (b) -[5, 8] (<B>) -[8, 12] (</B>) -[12, 13] (c) -[13, 16] (<B>) -[16, 20] (</B>) -[20, 21] (d) -[21, 25] (</P>) -[25, 26] (e) -[26, 29] (<P>) -[29, 30] (f) -[30, 34] (</P>) - -Tree : -#document ---#text(a)@[0, 1] (a) ---P/P@[1, 4] (<P>)@[21, 25] (</P>) -----#text(b)@[4, 5] (b) -----B/B@[5, 8] (<B>)@[8, 12] (</B>) -----#text(c)@[12, 13] (c) -----B/B@[13, 16] (<B>)@[16, 20] (</B>) -----#text(d)@[20, 21] (d) ---#text(e)@[25, 26] (e) ---P/P@[26, 29] (<P>)@[30, 34] (</P>) -----#text(f)@[29, 30] (f) - -Source : -a<P>b<B></B>c<B></B>d</P>e<P>f</P>g - - -StructuredDocument Regions : -[0, 1] (a) -[1, 4] (<P>) -[4, 5] (b) -[5, 8] (<B>) -[8, 12] (</B>) -[12, 13] (c) -[13, 16] (<B>) -[16, 20] (</B>) -[20, 21] (d) -[21, 25] (</P>) -[25, 26] (e) -[26, 29] (<P>) -[29, 30] (f) -[30, 34] (</P>) -[34, 35] (g) - -Tree : -#document ---#text(a)@[0, 1] (a) ---P/P@[1, 4] (<P>)@[21, 25] (</P>) -----#text(b)@[4, 5] (b) -----B/B@[5, 8] (<B>)@[8, 12] (</B>) -----#text(c)@[12, 13] (c) -----B/B@[13, 16] (<B>)@[16, 20] (</B>) -----#text(d)@[20, 21] (d) ---#text(e)@[25, 26] (e) ---P/P@[26, 29] (<P>)@[30, 34] (</P>) -----#text(f)@[29, 30] (f) ---#text(g)@[34, 35] (g) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest2.txt deleted file mode 100644 index 83990a68d..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest2.txt +++ /dev/null @@ -1,41 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.ParserTest2 -Source : -<a b="" c="c"> - - -StructuredDocument Regions : -[0, 15] (<a b="" c="c">) - -Tree : -#document ---a@[0, 15] (<a b="" c="c">) - -b=[] -c=[c] -Source : -<a b="" d c="c"> - - -StructuredDocument Regions : -[0, 16] (<a b="" d c="c">) - -Tree : -#document ---a@[0, 16] (<a b="" d c="c">) - -b=[] -d=[] -c=[c] -Source : -<a b="" c="c"> - - -StructuredDocument Regions : -[0, 15] (<a b="" c="c">) - -Tree : -#document ---a@[0, 15] (<a b="" c="c">) - -b=[] -c=[c] diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest3.txt deleted file mode 100644 index 4338afc1d..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest3.txt +++ /dev/null @@ -1,26 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.ParserTest3 -Source : -<a b > - - -StructuredDocument Regions : -[0, 7] (<a b >) - -Tree : -#document ---a@[0, 7] (<a b >) - -b=[] -org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent -Source : -<a b > - - -StructuredDocument Regions : -[0, 6] (<a b >) - -Tree : -#document ---a@[0, 6] (<a b >) - -b=[] diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest4.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest4.txt deleted file mode 100644 index 8c32ce2ef..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.ParserTest4.txt +++ /dev/null @@ -1,243 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.ParserTest4 -Source : -<a> - -<% a %> -<% b %> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 5] ( - -) -[5, 6] (<) -[6, 8] (% ) -[8, 10] (a ) -[10, 11] (%) -[11, 13] (> -) -[13, 14] (<) -[14, 16] (% ) -[16, 18] (b ) -[18, 19] (%) -[19, 21] (> -) -[21, 25] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[21, 25] (</a>) -----#text(\n\n<% a %>\n<% b %>\n)@{[3, 5] (\n\n),[5, 6] (<),[6, 8] (% ),[8, 10] (a ),[10, 11] (%),[11, 13] (>\n),[13, 14] (<),[14, 16] (% ),[16, 18] (b ),[18, 19] (%),[19, 21] (>\n)} - -Source : -<a> -< -<% a %> -<% b %> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 5] (<) -[5, 6] ( -) -[6, 7] (<) -[7, 9] (% ) -[9, 11] (a ) -[11, 12] (%) -[12, 14] (> -) -[14, 15] (<) -[15, 17] (% ) -[17, 19] (b ) -[19, 20] (%) -[20, 22] (> -) -[22, 26] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[22, 26] (</a>) -----#text(\n<\n<% a %>\n<% b %>\n)@{[3, 4] (\n),[4, 5] (<),[5, 6] (\n),[6, 7] (<),[7, 9] (% ),[9, 11] (a ),[11, 12] (%),[12, 14] (>\n),[14, 15] (<),[15, 17] (% ),[17, 19] (b ),[19, 20] (%),[20, 22] (>\n)} - -Source : -<a> -<b -<% a %> -<% b %> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 7] (<b -) -[7, 8] (<) -[8, 10] (% ) -[10, 12] (a ) -[12, 13] (%) -[13, 15] (> -) -[15, 16] (<) -[16, 18] (% ) -[18, 20] (b ) -[20, 21] (%) -[21, 23] (> -) -[23, 27] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[23, 27] (</a>) -----#text(\n)@[3, 4] (\n) -----b@[4, 7] (<b\n) -------#text(<% a %>\n<% b %>\n)@{[7, 8] (<),[8, 10] (% ),[10, 12] (a ),[12, 13] (%),[13, 15] (>\n),[15, 16] (<),[16, 18] (% ),[18, 20] (b ),[20, 21] (%),[21, 23] (>\n)} - -Source : -<a> -<bc -<% a %> -<% b %> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 8] (<bc -) -[8, 9] (<) -[9, 11] (% ) -[11, 13] (a ) -[13, 14] (%) -[14, 16] (> -) -[16, 17] (<) -[17, 19] (% ) -[19, 21] (b ) -[21, 22] (%) -[22, 24] (> -) -[24, 28] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[24, 28] (</a>) -----#text(\n)@[3, 4] (\n) -----bc@[4, 8] (<bc\n) -------#text(<% a %>\n<% b %>\n)@{[8, 9] (<),[9, 11] (% ),[11, 13] (a ),[13, 14] (%),[14, 16] (>\n),[16, 17] (<),[17, 19] (% ),[19, 21] (b ),[21, 22] (%),[22, 24] (>\n)} - -Source : -<a> -<bcd -<% a %> -<% b %> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 9] (<bcd -) -[9, 10] (<) -[10, 12] (% ) -[12, 14] (a ) -[14, 15] (%) -[15, 17] (> -) -[17, 18] (<) -[18, 20] (% ) -[20, 22] (b ) -[22, 23] (%) -[23, 25] (> -) -[25, 29] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[25, 29] (</a>) -----#text(\n)@[3, 4] (\n) -----bcd@[4, 9] (<bcd\n) -------#text(<% a %>\n<% b %>\n)@{[9, 10] (<),[10, 12] (% ),[12, 14] (a ),[14, 15] (%),[15, 17] (>\n),[17, 18] (<),[18, 20] (% ),[20, 22] (b ),[22, 23] (%),[23, 25] (>\n)} - -Source : -<a> -<bcde -<% a %> -<% b %> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 10] (<bcde -) -[10, 11] (<) -[11, 13] (% ) -[13, 15] (a ) -[15, 16] (%) -[16, 18] (> -) -[18, 19] (<) -[19, 21] (% ) -[21, 23] (b ) -[23, 24] (%) -[24, 26] (> -) -[26, 30] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[26, 30] (</a>) -----#text(\n)@[3, 4] (\n) -----bcde@[4, 10] (<bcde\n) -------#text(<% a %>\n<% b %>\n)@{[10, 11] (<),[11, 13] (% ),[13, 15] (a ),[15, 16] (%),[16, 18] (>\n),[18, 19] (<),[19, 21] (% ),[21, 23] (b ),[23, 24] (%),[24, 26] (>\n)} - -Source : -<a> -<bcde> -<% a %> -<% b %> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 10] (<bcde>) -[10, 11] ( -) -[11, 12] (<) -[12, 14] (% ) -[14, 16] (a ) -[16, 17] (%) -[17, 19] (> -) -[19, 20] (<) -[20, 22] (% ) -[22, 24] (b ) -[24, 25] (%) -[25, 27] (> -) -[27, 31] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[27, 31] (</a>) -----#text(\n)@[3, 4] (\n) -----bcde@[4, 10] (<bcde>) -------#text(\n<% a %>\n<% b %>\n)@{[10, 11] (\n),[11, 12] (<),[12, 14] (% ),[14, 16] (a ),[16, 17] (%),[17, 19] (>\n),[19, 20] (<),[20, 22] (% ),[22, 24] (b ),[24, 25] (%),[25, 27] (>\n)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest.txt deleted file mode 100644 index 12a90039c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest.txt +++ /dev/null @@ -1,107 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aabbbbccc)@[3, 12] (aabbbbccc) - -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aa)@[3,5]([3, 12] (aabbbbccc)) -----#text(bbbbccc)@[5,12]([3, 12] (aabbbbccc)) - -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aa)@[3,5]([3, 12] (aabbbbccc)) -----#text(bbbb)@[5,9]([3, 12] (aabbbbccc)) -----#text(ccc)@[9,12]([3, 12] (aabbbbccc)) - -Source : -<p>aaccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 8] (aaccc) -[8, 12] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[8, 12] (</p>) -----#text(aa)@[3,5]([3, 8] (aaccc)) -----#text(ccc)@[5,8]([3, 8] (aaccc)) - -Source : -<p>aadddddddccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 15] (aadddddddccc) -[15, 19] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[15, 19] (</p>) -----#text(aaddddddd)@[3,12]([3, 15] (aadddddddccc)) -----#text(ccc)@[12,15]([3, 15] (aadddddddccc)) - -Source : -<p>aadddddddccceee</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 18] (aadddddddccceee) -[18, 22] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[18, 22] (</p>) -----#text(aaddddddd)@[3,12]([3, 18] (aadddddddccceee)) -----#text(ccceee)@[12,18]([3, 18] (aadddddddccceee)) - -Source : -<p>aadddddddbbbbccceee</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 22] (aadddddddbbbbccceee) -[22, 26] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[22, 26] (</p>) -----#text(aaddddddd)@[3,12]([3, 22] (aadddddddbbbbccceee)) -----#text(bbbb)@[12,16]([3, 22] (aadddddddbbbbccceee)) -----#text(ccceee)@[16,22]([3, 22] (aadddddddbbbbccceee)) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest2.txt deleted file mode 100644 index 3a122c68e..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest2.txt +++ /dev/null @@ -1,82 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest2 -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aabbbbccc)@[3, 12] (aabbbbccc) - -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aa)@[3,5]([3, 12] (aabbbbccc)) -----#text(bbbbccc)@[5,12]([3, 12] (aabbbbccc)) - -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aa)@[3,5]([3, 12] (aabbbbccc)) -----#text(bbbb)@[5,9]([3, 12] (aabbbbccc)) -----#text(ccc)@[9,12]([3, 12] (aabbbbccc)) - -Source : -<p>aaccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 8] (aaccc) -[8, 12] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[8, 12] (</p>) -----#text(aa)@[3,5]([3, 8] (aaccc)) -----#text(ccc)@[5,8]([3, 8] (aaccc)) - -Source : -<p>aa<b>bbbb</b>ccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (aa) -[5, 8] (<b>) -[8, 12] (bbbb) -[12, 16] (</b>) -[16, 19] (ccc) -[19, 23] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[19, 23] (</p>) -----#text(aa)@[3, 5] (aa) -----b/b@[5, 8] (<b>)@[12, 16] (</b>) -------#text(bbbb)@[8, 12] (bbbb) -----#text(ccc)@[16, 19] (ccc) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest3.txt deleted file mode 100644 index 4453a5074..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest3.txt +++ /dev/null @@ -1,91 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest3 -Source : -<p>aa</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (aa) -[5, 9] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[5, 9] (</p>) -----#text(aa)@[3, 5] (aa) - -Source : -<p>aa<b>bbbb</b></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (aa) -[5, 8] (<b>) -[8, 12] (bbbb) -[12, 16] (</b>) -[16, 20] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[16, 20] (</p>) -----#text(aa)@[3, 5] (aa) -----b/b@[5, 8] (<b>)@[12, 16] (</b>) -------#text(bbbb)@[8, 12] (bbbb) - -Source : -<p>aa<b>bbbb</b>ccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (aa) -[5, 8] (<b>) -[8, 12] (bbbb) -[12, 16] (</b>) -[16, 19] (ccc) -[19, 23] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[19, 23] (</p>) -----#text(aa)@[3, 5] (aa) -----b/b@[5, 8] (<b>)@[12, 16] (</b>) -------#text(bbbb)@[8, 12] (bbbb) -----#text(ccc)@[16, 19] (ccc) - -Source : -<p>aaccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 8] (aaccc) -[8, 12] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[8, 12] (</p>) -----#text(aa)@[3,5]([3, 8] (aaccc)) -----#text(ccc)@[5,8]([3, 8] (aaccc)) - -Source : -<p>aa<b>bbbb</b>ccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (aa) -[5, 8] (<b>) -[8, 12] (bbbb) -[12, 16] (</b>) -[16, 19] (ccc) -[19, 23] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[19, 23] (</p>) -----#text(aa)@[3, 5] (aa) -----b/b@[5, 8] (<b>)@[12, 16] (</b>) -------#text(bbbb)@[8, 12] (bbbb) -----#text(ccc)@[16, 19] (ccc) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest4.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest4.txt deleted file mode 100644 index 07bbf30bb..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest4.txt +++ /dev/null @@ -1,71 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest4 -Source : -<p></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 7] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[3, 7] (</p>) -----#text() - -Source : -<p>aaa</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 6] (aaa) -[6, 10] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[6, 10] (</p>) -----#text(aaa)@[3, 6] (aaa) - -Source : -<p></p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 7] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[3, 7] (</p>) -----#text() - -Source : -<p>cccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 7] (cccc) -[7, 11] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[7, 11] (</p>) -----#text(cccc)@[3, 7] (cccc) -----#text() - -Source : -<p>ccccaaa</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 10] (ccccaaa) -[10, 14] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[10, 14] (</p>) -----#text(cccc)@[3,7]([3, 10] (ccccaaa)) -----#text(aaa)@[7,10]([3, 10] (ccccaaa)) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest5.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest5.txt deleted file mode 100644 index 9cedb59fb..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest5.txt +++ /dev/null @@ -1,138 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest5 -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aabbbbccc)@[3, 12] (aabbbbccc) - -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aabbbb)@[3,9]([3, 12] (aabbbbccc)) -----#text(ccc)@[9,12]([3, 12] (aabbbbccc)) - -Source : -<p>aabbbb<br>ccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 9] (aabbbb) -[9, 13] (<br>) -[13, 16] (ccc) -[16, 20] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[16, 20] (</p>) -----#text(aabbbb)@[3, 9] (aabbbb) -----br@[9, 13] (<br>) -----#text(ccc)@[13, 16] (ccc) - -Source : -<p>aabbbb<br>cccd</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 9] (aabbbb) -[9, 13] (<br>) -[13, 17] (cccd) -[17, 21] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[17, 21] (</p>) -----#text(aabbbb)@[3, 9] (aabbbb) -----br@[9, 13] (<br>) -----#text(cccd)@[13, 17] (cccd) - -Source : -<p>aabbbb<br>cccde</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 9] (aabbbb) -[9, 13] (<br>) -[13, 18] (cccde) -[18, 22] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[18, 22] (</p>) -----#text(aabbbb)@[3, 9] (aabbbb) -----br@[9, 13] (<br>) -----#text(cccde)@[13, 18] (cccde) - -Source : -<p>aa<b>bbbb</b><br>cccde</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (aa) -[5, 8] (<b>) -[8, 12] (bbbb) -[12, 16] (</b>) -[16, 20] (<br>) -[20, 25] (cccde) -[25, 29] (</p>) - -StructuredDocumentRegionChecker : warning : vain -Tree : -#document ---p/p@[0, 3] (<p>)@[25, 29] (</p>) -----#text(aa)@[3,5]([3, 5] (aa)) -----b/b@[5, 8] (<b>)@[12, 16] (</b>) -------#text(bbbb)@[8, 12] (bbbb) -----br@[16, 20] (<br>) -----#text(cccde)@[20, 25] (cccde) - -Source : -<p>aa<b>bbbb</b><br><i>ccc</i>de</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (aa) -[5, 8] (<b>) -[8, 12] (bbbb) -[12, 16] (</b>) -[16, 20] (<br>) -[20, 23] (<i>) -[23, 26] (ccc) -[26, 30] (</i>) -[30, 32] (de) -[32, 36] (</p>) - -StructuredDocumentRegionChecker : warning : vain -StructuredDocumentRegionChecker : warning : vain -Tree : -#document ---p/p@[0, 3] (<p>)@[32, 36] (</p>) -----#text(aa)@[3,5]([3, 5] (aa)) -----b/b@[5, 8] (<b>)@[12, 16] (</b>) -------#text(bbbb)@[8, 12] (bbbb) -----br@[16, 20] (<br>) -----i/i@[20, 23] (<i>)@[26, 30] (</i>) -------#text(ccc)@[23, 26] (ccc) -----#text(de)@[30,32]([30, 32] (de)) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest6.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest6.txt deleted file mode 100644 index 29175f4ca..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest6.txt +++ /dev/null @@ -1,33 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest6 -Source : -<p>aabbbbccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 12] (aabbbbccc) -[12, 16] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[12, 16] (</p>) -----#text(aa)@[3,5]([3, 12] (aabbbbccc)) -----#text(bbbb)@[5,9]([3, 12] (aabbbbccc)) -----#text(ccc)@[9,12]([3, 12] (aabbbbccc)) - -Source : -<p>aabbbbdccc</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 13] (aabbbbdccc) -[13, 17] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[13, 17] (</p>) -----#text(aa)@[3,5]([3, 13] (aabbbbdccc)) -----#text(bbbbd)@[5,10]([3, 13] (aabbbbdccc)) -----#text(ccc)@[10,13]([3, 13] (aabbbbdccc)) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest7.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest7.txt deleted file mode 100644 index 5f39e7599..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest7.txt +++ /dev/null @@ -1,30 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest7 -Source : -<p>aaaabbbb</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 11] (aaaabbbb) -[11, 15] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[11, 15] (</p>) -----#text(aaaa)@[3,7]([3, 11] (aaaabbbb)) -----#text(bbbb)@[7,11]([3, 11] (aaaabbbb)) - -Source : -<p>aaabb</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 8] (aaabb) -[8, 12] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[8, 12] (</p>) -----#text(aaabb)@[3, 8] (aaabb) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest8.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest8.txt deleted file mode 100644 index de4e783bb..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.SplitTextTest8.txt +++ /dev/null @@ -1,30 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.SplitTextTest8 -Source : -<p>aaaabbbb</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 11] (aaaabbbb) -[11, 15] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[11, 15] (</p>) -----#text(aaaa)@[3,7]([3, 11] (aaaabbbb)) -----#text(bbbb)@[7,11]([3, 11] (aaaabbbb)) - -Source : -<p>ab</p> - - -StructuredDocument Regions : -[0, 3] (<p>) -[3, 5] (ab) -[5, 9] (</p>) - -Tree : -#document ---p/p@[0, 3] (<p>)@[5, 9] (</p>) -----#text(ab)@[3, 5] (ab) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TableTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TableTest.txt deleted file mode 100644 index 084ebdb74..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TableTest.txt +++ /dev/null @@ -1,105 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.TableTest -Source : -<html></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 13] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[6, 13] (</html>) - -Source : -<html><body></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 19] (</body>) -[19, 26] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[19, 26] (</html>) -----body/body@[6, 12] (<body>)@[12, 19] (</body>) - -Source : -<html><body><table border="1"><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 30] (<table border="1">) -[30, 34] (<tr>) -[34, 38] (<td>) -[38, 43] (</td>) -[43, 47] (<td>) -[47, 52] (</td>) -[52, 57] (</tr>) -[57, 61] (<tr>) -[61, 65] (<td>) -[65, 70] (</td>) -[70, 74] (<td>) -[74, 79] (</td>) -[79, 84] (</tr>) -[84, 92] (</table>) -[92, 99] (</body>) -[99, 106] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[99, 106] (</html>) -----body/body@[6, 12] (<body>)@[92, 99] (</body>) -------table/table@[12, 30] (<table border="1">)@[84, 92] (</table>) ---------tr/tr@[30, 34] (<tr>)@[52, 57] (</tr>) -----------td/td@[34, 38] (<td>)@[38, 43] (</td>) -----------td/td@[43, 47] (<td>)@[47, 52] (</td>) ---------tr/tr@[57, 61] (<tr>)@[79, 84] (</tr>) -----------td/td@[61, 65] (<td>)@[65, 70] (</td>) -----------td/td@[70, 74] (<td>)@[74, 79] (</td>) - -Source : -<html><body><table border="1"><tr><td></td><td></td></tr><tr><td></td><td><font color="red">text</font></td></tr></table></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 30] (<table border="1">) -[30, 34] (<tr>) -[34, 38] (<td>) -[38, 43] (</td>) -[43, 47] (<td>) -[47, 52] (</td>) -[52, 57] (</tr>) -[57, 61] (<tr>) -[61, 65] (<td>) -[65, 70] (</td>) -[70, 74] (<td>) -[74, 92] (<font color="red">) -[92, 96] (text) -[96, 103] (</font>) -[103, 108] (</td>) -[108, 113] (</tr>) -[113, 121] (</table>) -[121, 128] (</body>) -[128, 135] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[128, 135] (</html>) -----body/body@[6, 12] (<body>)@[121, 128] (</body>) -------table/table@[12, 30] (<table border="1">)@[113, 121] (</table>) ---------tr/tr@[30, 34] (<tr>)@[52, 57] (</tr>) -----------td/td@[34, 38] (<td>)@[38, 43] (</td>) -----------td/td@[43, 47] (<td>)@[47, 52] (</td>) ---------tr/tr@[57, 61] (<tr>)@[108, 113] (</tr>) -----------td/td@[61, 65] (<td>)@[65, 70] (</td>) -----------td/td@[70, 74] (<td>)@[103, 108] (</td>) -------------font/font@[74, 92] (<font color="red">)@[96, 103] (</font>) ---------------#text(text)@[92, 96] (text) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest.txt deleted file mode 100644 index e892cf29d..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest.txt +++ /dev/null @@ -1,18 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.TextTest -Source : -<a>hello &lt;</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (hello ) -[9, 14] (&) -[14, 17] (lt;) -[17, 21] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[17, 21] (</a>) -----#text(hello <)@{[3, 9] (hello ),[9, 14] (&),[14, 17] (lt;)} - -hello < diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest2.txt deleted file mode 100644 index ab2ba5351..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest2.txt +++ /dev/null @@ -1,18 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.TextTest2 -Source : -<a>hello &lt;</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (hello ) -[9, 14] (&) -[14, 17] (lt;) -[17, 21] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[17, 21] (</a>) -----#text(hello <)@{[3, 9] (hello ),[9, 14] (&),[14, 17] (lt;)} - -hello < diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest3.txt deleted file mode 100644 index 0b04a3bf6..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.TextTest3.txt +++ /dev/null @@ -1,78 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.TextTest3 -Invalid character ('<') found -Source : -<a>text</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 7] (text) -[7, 11] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[7, 11] (</a>) -----#text(text)@[3, 7] (text) - -Source : -<a>hello <</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (hello ) -[9, 13] (<) -[13, 17] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[13, 17] (</a>) -----#text(hello <)@{[3, 9] (hello ),[9, 13] (<)} - -Invalid character ('&') found -Source : -<a>hello <</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (hello ) -[9, 13] (<) -[13, 17] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[13, 17] (</a>) -----#text(hello <)@{[3, 9] (hello ),[9, 13] (<)} - -Source : -<a>hello A</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (hello ) -[9, 14] (A) -[14, 18] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[14, 18] (</a>) -----#text(hello A)@{[3, 9] (hello ),[9, 14] (A)} - -Invalid character ('&') found -Source : -<a>hello A</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (hello ) -[9, 14] (A) -[14, 18] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[14, 18] (</a>) -----#text(hello A)@{[3, 9] (hello ),[9, 14] (A)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest.txt deleted file mode 100644 index 69fe98069..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest.txt +++ /dev/null @@ -1,197 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest -Source : -<html></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 13] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[6, 13] (</html>) - -Source : -<html><body></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 19] (</body>) -[19, 26] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[19, 26] (</html>) -----body/body@[6, 12] (<body>)@[12, 19] (</body>) - -Source : -<html><body><p></p></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 15] (<p>) -[15, 19] (</p>) -[19, 26] (</body>) -[26, 33] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[26, 33] (</html>) -----body/body@[6, 12] (<body>)@[19, 26] (</body>) -------p/p@[12, 15] (<p>)@[15, 19] (</p>) - -Source : -<html><body><p>text</p></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 15] (<p>) -[15, 19] (text) -[19, 23] (</p>) -[23, 30] (</body>) -[30, 37] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[30, 37] (</html>) -----body/body@[6, 12] (<body>)@[23, 30] (</body>) -------p/p@[12, 15] (<p>)@[19, 23] (</p>) ---------#text(text)@[15, 19] (text) - -Source : -<html><body><p><br>text</p></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 15] (<p>) -[15, 19] (<br>) -[19, 23] (text) -[23, 27] (</p>) -[27, 34] (</body>) -[34, 41] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[34, 41] (</html>) -----body/body@[6, 12] (<body>)@[27, 34] (</body>) -------p/p@[12, 15] (<p>)@[23, 27] (</p>) ---------br@[15, 19] (<br>) ---------#text(text)@[19, 23] (text) - -Source : -<html><body><p><br>text<img></p></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 15] (<p>) -[15, 19] (<br>) -[19, 23] (text) -[23, 28] (<img>) -[28, 32] (</p>) -[32, 39] (</body>) -[39, 46] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[39, 46] (</html>) -----body/body@[6, 12] (<body>)@[32, 39] (</body>) -------p/p@[12, 15] (<p>)@[28, 32] (</p>) ---------br@[15, 19] (<br>) ---------#text(text)@[19, 23] (text) ---------img@[23, 28] (<img>) - -Source : -<html><body><p><br><img></p></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 15] (<p>) -[15, 19] (<br>) -[19, 24] (<img>) -[24, 28] (</p>) -[28, 35] (</body>) -[35, 42] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[35, 42] (</html>) -----body/body@[6, 12] (<body>)@[28, 35] (</body>) -------p/p@[12, 15] (<p>)@[24, 28] (</p>) ---------br@[15, 19] (<br>) ---------img@[19, 24] (<img>) - -Source : -<html><body><p><br>text<img></p></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 15] (<p>) -[15, 19] (<br>) -[19, 23] (text) -[23, 28] (<img>) -[28, 32] (</p>) -[32, 39] (</body>) -[39, 46] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[39, 46] (</html>) -----body/body@[6, 12] (<body>)@[32, 39] (</body>) -------p/p@[12, 15] (<p>)@[28, 32] (</p>) ---------br@[15, 19] (<br>) ---------#text(text)@[19, 23] (text) ---------img@[23, 28] (<img>) - -Source : -<html><body></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 19] (</body>) -[19, 26] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[19, 26] (</html>) -----body/body@[6, 12] (<body>)@[12, 19] (</body>) - -Source : -<html><body><p><br>text<img></p></body></html> - - -StructuredDocument Regions : -[0, 6] (<html>) -[6, 12] (<body>) -[12, 15] (<p>) -[15, 19] (<br>) -[19, 23] (text) -[23, 28] (<img>) -[28, 32] (</p>) -[32, 39] (</body>) -[39, 46] (</html>) - -Tree : -#document ---html/html@[0, 6] (<html>)@[39, 46] (</html>) -----body/body@[6, 12] (<body>)@[32, 39] (</body>) -------p/p@[12, 15] (<p>)@[28, 32] (</p>) ---------br@[15, 19] (<br>) ---------#text(text)@[19, 23] (text) ---------img@[23, 28] (<img>) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest10.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest10.txt deleted file mode 100644 index b8f7da258..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest10.txt +++ /dev/null @@ -1,70 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest10 -Source : -<a b="c"><b></b></a> - - -StructuredDocument Regions : -[0, 9] (<a b="c">) -[9, 12] (<b>) -[12, 16] (</b>) -[16, 20] (</a>) - -Tree : -#document ---a/a@[0, 9] (<a b="c">)@[16, 20] (</a>) -----b/b@[9, 12] (<b>)@[12, 16] (</b>) - -IStructuredDocumentRegion: -<b> -0(<)true -0(b)true -0(>)true - -Source : -<a b="c"><b c="d"></b></a> - - -StructuredDocument Regions : -[0, 9] (<a b="c">) -[9, 18] (<b c="d">) -[18, 22] (</b>) -[22, 26] (</a>) - -Tree : -#document ---a/a@[0, 9] (<a b="c">)@[22, 26] (</a>) -----b/b@[9, 18] (<b c="d">)@[18, 22] (</b>) - -IStructuredDocumentRegion: -<b c="d"> -0(<)true -0(b)true -0(c)true -0(=)true -0("d")true -0(>)true - -Source : -<a b="cd"><b c="d"></b></a> - - -StructuredDocument Regions : -[0, 10] (<a b="cd">) -[10, 19] (<b c="d">) -[19, 23] (</b>) -[23, 27] (</a>) - -Tree : -#document ---a/a@[0, 10] (<a b="cd">)@[23, 27] (</a>) -----b/b@[10, 19] (<b c="d">)@[19, 23] (</b>) - -IStructuredDocumentRegion: -<b c="d"> -0(<)true -0(b)true -0(c)true -0(=)true -0("d")true -0(>)true - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest11.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest11.txt deleted file mode 100644 index 3988cb310..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest11.txt +++ /dev/null @@ -1,29 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest11 -Source : -<a>b</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] (b) -[4, 8] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[4, 8] (</a>) -----#text(b)@[3, 4] (b) - -Source : -<a>b</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] (b) -[4, 8] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[4, 8] (</a>) -----#text(b)@[3, 4] (b) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest12.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest12.txt deleted file mode 100644 index 811a8f7a8..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest12.txt +++ /dev/null @@ -1,40 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest12 -Source : -<a></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 7] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[3, 7] (</a>) - -Source : -<a></a><a></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 7] (</a>) -[7, 10] (<a>) -[10, 14] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[3, 7] (</a>) ---a/a@[7, 10] (<a>)@[10, 14] (</a>) - -Source : -<a></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 7] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[3, 7] (</a>) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest13.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest13.txt deleted file mode 100644 index 4854f7e6c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest13.txt +++ /dev/null @@ -1,43 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest13 -Source : -<a> -<b> -</b> </a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 5] ( -) -[5, 8] (<b>) -[8, 10] ( -) -[10, 14] (</b>) -[14, 16] ( ) -[16, 20] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[16, 20] (</a>) -----#text(\r\n)@[3, 5] (\r\n) -----b/b@[5, 8] (<b>)@[10, 14] (</b>) -------#text(\r\n)@[8, 10] (\r\n) -----#text( )@[14, 16] ( ) - -Source : -<a> - </a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 7] ( - ) -[7, 11] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[7, 11] (</a>) -----#text(\r\n)@[3,5]([3, 7] (\r\n )) -----#text( )@[5,7]([3, 7] (\r\n )) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest14.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest14.txt deleted file mode 100644 index 9e6d5b6bb..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest14.txt +++ /dev/null @@ -1,31 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest14 -Source : -<%= aaaa %> - - -StructuredDocument Regions : -[0, 1] (<) -[1, 4] (%= ) -[4, 9] (aaaa ) -[9, 10] (%) -[10, 11] (>) - -Tree : -#document ---#text(<%= aaaa %>)@{[0, 1] (<),[1, 4] (%= ),[4, 9] (aaaa ),[9, 10] (%),[10, 11] (>)} - -Source : -<% = aaaa %> - - -StructuredDocument Regions : -[0, 1] (<) -[1, 5] (% = ) -[5, 10] (aaaa ) -[10, 11] (%) -[11, 12] (>) - -Tree : -#document ---#text(<% = aaaa %>)@{[0, 1] (<),[1, 5] (% = ),[5, 10] (aaaa ),[10, 11] (%),[11, 12] (>)} - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest2.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest2.txt deleted file mode 100644 index 64dcf1f2a..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest2.txt +++ /dev/null @@ -1,127 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest2 -Source : -<HTML> -<HEAD></HEAD> -<BODY></BODY> -</HTML> - - - -StructuredDocument Regions : -[0, 6] (<HTML>) -[6, 8] ( -) -[8, 14] (<HEAD>) -[14, 21] (</HEAD>) -[21, 23] ( -) -[23, 29] (<BODY>) -[29, 36] (</BODY>) -[36, 38] ( -) -[38, 45] (</HTML>) -[45, 47] ( -) - -Tree : -#document ---HTML/HTML@[0, 6] (<HTML>)@[38, 45] (</HTML>) -----#text(\r\n)@[6, 8] (\r\n) -----HEAD/HEAD@[8, 14] (<HEAD>)@[14, 21] (</HEAD>) -----#text(\r\n)@[21, 23] (\r\n) -----BODY/BODY@[23, 29] (<BODY>)@[29, 36] (</BODY>) -----#text(\r\n)@[36, 38] (\r\n) ---#text(\r\n)@[45, 47] (\r\n) - -Source : -<HTML> -<HEAD> -<meta name="GENERATOR" content="Updater Test 2"> -</HEAD> -<BODY></BODY> -</HTML> - - - -StructuredDocument Regions : -[0, 6] (<HTML>) -[6, 8] ( -) -[8, 14] (<HEAD>) -[14, 16] ( -) -[16, 64] (<meta name="GENERATOR" content="Updater Test 2">) -[64, 66] ( -) -[66, 73] (</HEAD>) -[73, 75] ( -) -[75, 81] (<BODY>) -[81, 88] (</BODY>) -[88, 90] ( -) -[90, 97] (</HTML>) -[97, 99] ( -) - -Tree : -#document ---HTML/HTML@[0, 6] (<HTML>)@[90, 97] (</HTML>) -----#text(\r\n)@[6, 8] (\r\n) -----HEAD/HEAD@[8, 14] (<HEAD>)@[66, 73] (</HEAD>) -------#text(\r\n)@[14, 16] (\r\n) -------meta@[16, 64] (<meta name="GENERATOR" content="Updater Test 2">) -------#text(\r\n)@[64, 66] (\r\n) -----#text(\r\n)@[73, 75] (\r\n) -----BODY/BODY@[75, 81] (<BODY>)@[81, 88] (</BODY>) -----#text(\r\n)@[88, 90] (\r\n) ---#text(\r\n)@[97, 99] (\r\n) - -Source : -<HTML> -<HEAD> -<meta name="GENERATOR" content="Updater Test 2"> -<title></title></HEAD> -<BODY></BODY> -</HTML> - - - -StructuredDocument Regions : -[0, 6] (<HTML>) -[6, 8] ( -) -[8, 14] (<HEAD>) -[14, 16] ( -) -[16, 64] (<meta name="GENERATOR" content="Updater Test 2">) -[64, 66] ( -) -[66, 73] (<title>) -[73, 81] (</title>) -[81, 88] (</HEAD>) -[88, 90] ( -) -[90, 96] (<BODY>) -[96, 103] (</BODY>) -[103, 105] ( -) -[105, 112] (</HTML>) -[112, 114] ( -) - -Tree : -#document ---HTML/HTML@[0, 6] (<HTML>)@[105, 112] (</HTML>) -----#text(\r\n)@[6, 8] (\r\n) -----HEAD/HEAD@[8, 14] (<HEAD>)@[81, 88] (</HEAD>) -------#text(\r\n)@[14, 16] (\r\n) -------meta@[16, 64] (<meta name="GENERATOR" content="Updater Test 2">) -------#text(\r\n)@[64, 66] (\r\n) -------title/title@[66, 73] (<title>)@[73, 81] (</title>) ---------#text() -----#text(\r\n)@[88, 90] (\r\n) -----BODY/BODY@[90, 96] (<BODY>)@[96, 103] (</BODY>) -----#text(\r\n)@[103, 105] (\r\n) ---#text(\r\n)@[112, 114] (\r\n) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest3.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest3.txt deleted file mode 100644 index 4ac73a54b..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest3.txt +++ /dev/null @@ -1,58 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest3 -Source : -<a><b></b></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 6] (<b>) -[6, 10] (</b>) -[10, 14] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[10, 14] (</a>) -----b/b@[3, 6] (<b>)@[6, 10] (</b>) - -Source : -<a> -<b></b></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 7] (<b>) -[7, 11] (</b>) -[11, 15] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[11, 15] (</a>) -----#text(\n)@[3, 4] (\n) -----b/b@[4, 7] (<b>)@[7, 11] (</b>) - -Source : -<a> -<b></b> -</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] ( -) -[4, 7] (<b>) -[7, 11] (</b>) -[11, 12] ( -) -[12, 16] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[12, 16] (</a>) -----#text(\n)@[3, 4] (\n) -----b/b@[4, 7] (<b>)@[7, 11] (</b>) -----#text(\n)@[11, 12] (\n) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest4.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest4.txt deleted file mode 100644 index a10d026ae..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest4.txt +++ /dev/null @@ -1,29 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest4 -Source : -<a>b</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] (b) -[4, 8] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[4, 8] (</a>) -----#text(b)@[3, 4] (b) - -Source : -<a>b</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] (b) -[4, 8] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[4, 8] (</a>) -----#text(b)@[3, 4] (b) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest5.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest5.txt deleted file mode 100644 index 95e13ea64..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest5.txt +++ /dev/null @@ -1,29 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest5 -Source : -<a>'</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (') -[9, 13] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[9, 13] (</a>) -----#text(')@[3, 9] (') - -Source : -<a>'</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 9] (') -[9, 13] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[9, 13] (</a>) -----#text(')@[3, 9] (') - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest6.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest6.txt deleted file mode 100644 index f9c4d7abe..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest6.txt +++ /dev/null @@ -1,41 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest6 -Source : -<a>b</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] (b) -[4, 8] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[4, 8] (</a>) -----#text(b)@[3, 4] (b) - -Source : -<a></a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 7] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[3, 7] (</a>) - -Source : -<a>b</a> - - -StructuredDocument Regions : -[0, 3] (<a>) -[3, 4] (b) -[4, 8] (</a>) - -Tree : -#document ---a/a@[0, 3] (<a>)@[4, 8] (</a>) -----#text(b)@[3, 4] (b) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest7.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest7.txt deleted file mode 100644 index 0b4a487cd..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest7.txt +++ /dev/null @@ -1,34 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest7 -Source : -<P><B></B></P> - - -StructuredDocument Regions : -[0, 3] (<P>) -[3, 6] (<B>) -[6, 10] (</B>) -[10, 14] (</P>) - -Tree : -#document ---P/P@[0, 3] (<P>)@[10, 14] (</P>) -----B/B@[3, 6] (<B>)@[6, 10] (</B>) - -Source : -<P><B></B><B></B></P> - - -StructuredDocument Regions : -[0, 3] (<P>) -[3, 6] (<B>) -[6, 10] (</B>) -[10, 13] (<B>) -[13, 17] (</B>) -[17, 21] (</P>) - -Tree : -#document ---P/P@[0, 3] (<P>)@[17, 21] (</P>) -----B/B@[3, 6] (<B>)@[6, 10] (</B>) -----B/B@[10, 13] (<B>)@[13, 17] (</B>) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest8.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest8.txt deleted file mode 100644 index e5f6e3212..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest8.txt +++ /dev/null @@ -1,28 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest8 -Source : -<P></P> - - -StructuredDocument Regions : -[0, 3] (<P>) -[3, 7] (</P>) - -Tree : -#document ---P/P@[0, 3] (<P>)@[3, 7] (</P>) - -Source : -<P></P><P></P> - - -StructuredDocument Regions : -[0, 3] (<P>) -[3, 7] (</P>) -[7, 10] (<P>) -[10, 14] (</P>) - -Tree : -#document ---P/P@[0, 3] (<P>)@[3, 7] (</P>) ---P/P@[7, 10] (<P>)@[10, 14] (</P>) - diff --git a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest9.txt b/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest9.txt deleted file mode 100644 index 6a4a8ad84..000000000 --- a/tests/org.eclipse.wst.html.core.tests/ParserResults2004-12-10-22-23-47/org.eclipse.wst.html.core.tests.parser.UpdaterTest9.txt +++ /dev/null @@ -1,27 +0,0 @@ -org.eclipse.wst.html.core.tests.parser.UpdaterTest9 -Source : -<style></style> - - -StructuredDocument Regions : -[0, 7] (<style>) -[7, 15] (</style>) - -Tree : -#document ---style/style@[0, 7] (<style>)@[7, 15] (</style>) - -Source : -<style>p</style> - - -StructuredDocument Regions : -[0, 7] (<style>) -[7, 8] (p) -[8, 16] (</style>) - -Tree : -#document ---style/style@[0, 7] (<style>)@[8, 16] (</style>) -----#text(p)@[7, 8] (p) - diff --git a/tests/org.eclipse.wst.html.core.tests/aNoteOnParserResultsDirectories.txt b/tests/org.eclipse.wst.html.core.tests/aNoteOnParserResultsDirectories.txt deleted file mode 100644 index 8e241889f..000000000 --- a/tests/org.eclipse.wst.html.core.tests/aNoteOnParserResultsDirectories.txt +++ /dev/null @@ -1,18 +0,0 @@ -These notes pertain to the v20041210_2300 version -in CVS repository. - -Note, the "05-24" directory *should* match -the parser results from parser of same date, -*but* after transition to org.eclipse, it seems -the case of tags is different. Oddly, seems -like the current treatement of case is correct, -so ... 12-10 parser results should be used as -reference, unless some new insight is gained. -It does match previous version except for case. -(And, the previous version was changed "by hand" -to accomidate the transition to org.eclipse). - -TODO: this file, and 05-24 reference directory -can be deleted around M3, once whole team has -reviewed and confident 12-10 version is correct -reference.
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/about.html b/tests/org.eclipse.wst.html.core.tests/about.html deleted file mode 100644 index 4ec598958..000000000 --- a/tests/org.eclipse.wst.html.core.tests/about.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML> - -<head> -<title>About</title> -<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> -</head> - -<BODY lang="EN-US"> - -<H3>About This Content</H3> - -<P>May 2, 2006</P> - -<H3>License</H3> - -<P>The Eclipse Foundation makes available all content in this plug-in -("Content"). Unless otherwise indicated below, the Content is provided to you -under the terms and conditions of the Eclipse Public License Version 1.0 -("EPL"). A copy of the EPL is available at -<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. -For purposes of the EPL, "Program" will mean the Content.</P> - -<P>If you did not receive this Content directly from the Eclipse Foundation, the -Content is being redistributed by another party ("Redistributor") and different -terms and conditions may apply to your use of any object code in the Content. -Check the Redistributor’s license that was provided with the Content. If no such -license exists, contact the Redistributor. Unless otherwise indicated below, the -terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at -<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P> - -</BODY> -</HTML> diff --git a/tests/org.eclipse.wst.html.core.tests/build.properties b/tests/org.eclipse.wst.html.core.tests/build.properties deleted file mode 100644 index 8adf61657..000000000 --- a/tests/org.eclipse.wst.html.core.tests/build.properties +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################### -# Copyright (c) 2004 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -source.htmlcoretests.jar = src/ -output.htmlcoretests.jar = bin/ -bin.includes = htmlcoretests.jar,\ - plugin.xml,\ - test.xml,\ - ParserResults2004-12-10-22-23-47/,\ - META-INF/,\ - about.html diff --git a/tests/org.eclipse.wst.html.core.tests/plugin.properties b/tests/org.eclipse.wst.html.core.tests/plugin.properties deleted file mode 100644 index e8b3778da..000000000 --- a/tests/org.eclipse.wst.html.core.tests/plugin.properties +++ /dev/null @@ -1,3 +0,0 @@ -# properties file for org.eclipse.wst.html.core.tests -Bundle-Vendor.0 = Eclipse.org -Bundle-Name.0 = HTML Core Tests
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/plugin.xml b/tests/org.eclipse.wst.html.core.tests/plugin.xml deleted file mode 100644 index dc6aef0dc..000000000 --- a/tests/org.eclipse.wst.html.core.tests/plugin.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<plugin> - - <!-- leave this empty plugin.xml here for now, - because we do a funky thing - to find it during the tests --> - -</plugin> diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/HTMLCoreTestSuite.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/HTMLCoreTestSuite.java deleted file mode 100644 index 430952c01..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/HTMLCoreTestSuite.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.eclipse.wst.html.core.tests.misc.HTMLCorePreferencesTest; -import org.eclipse.wst.html.core.tests.misc.HTMLTagInfoTest; -import org.eclipse.wst.html.core.tests.model.BUG124835SetStyleAttributeValueTest; -import org.eclipse.wst.html.core.tests.model.GetOverrideStyleTest; -import org.eclipse.wst.html.core.tests.model.ModelModifications; -import org.eclipse.wst.html.core.tests.model.TestForNPEInCSSCreation; - - - -public class HTMLCoreTestSuite extends TestSuite { - - /** - * to get picked up by BVT - * - * @return - */ - public static Test suite() { - return new HTMLCoreTestSuite(); - } - - public HTMLCoreTestSuite() { - super("HTML Core TestSuite"); - - addTest(ModelParserTests.suite()); - addTest(new TestSuite(HTMLCorePreferencesTest.class)); - addTest(new TestSuite(HTMLTagInfoTest.class)); - addTest(new TestSuite(ModelModifications.class)); - addTest(new TestSuite(TestForNPEInCSSCreation.class)); - addTest(new TestSuite(GetOverrideStyleTest.class)); - addTest(new TestSuite(BUG124835SetStyleAttributeValueTest.class)); - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/HTMLCoreTestsPlugin.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/HTMLCoreTestsPlugin.java deleted file mode 100644 index b37c006d3..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/HTMLCoreTestsPlugin.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests; - -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -import org.eclipse.core.runtime.Plugin; - -/** - * The main plugin class to be used in the desktop. - */ -public class HTMLCoreTestsPlugin extends Plugin { - //The shared instance. - private static HTMLCoreTestsPlugin plugin; - //Resource bundle. - private ResourceBundle resourceBundle; - - /** - * The constructor. - */ - public HTMLCoreTestsPlugin() { - super(); - plugin = this; - try { - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.html.core.tests.SSEModelHTMLTestsPluginResources"); - } - catch (MissingResourceException x) { - resourceBundle = null; - } - } - - /** - * Returns the shared instance. - */ - public static HTMLCoreTestsPlugin getDefault() { - return plugin; - } - - /** - * Returns the string from the plugin's resource bundle, - * or 'key' if not found. - */ - public static String getResourceString(String key) { - ResourceBundle bundle = HTMLCoreTestsPlugin.getDefault().getResourceBundle(); - try { - return (bundle != null) ? bundle.getString(key) : key; - } - catch (MissingResourceException e) { - return key; - } - } - - /** - * Returns the plugin's resource bundle, - */ - public ResourceBundle getResourceBundle() { - return resourceBundle; - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/Logger.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/Logger.java deleted file mode 100644 index 509194e43..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/Logger.java +++ /dev/null @@ -1,144 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests; - -import com.ibm.icu.util.StringTokenizer; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.osgi.framework.Bundle; - -/** - * Small convenience class to log messages to plugin's log file and also, if desired, - * the console. This class should only be used by classes in this plugin. Other - * plugins should make their own copy, with appropriate ID. - */ -public class Logger { - private static final String PLUGIN_ID = "org.eclipse.wst.html.core.tests"; //$NON-NLS-1$ - - private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$ - - public static final int OK = IStatus.OK; // 0 - public static final int INFO = IStatus.INFO; // 1 - public static final int WARNING = IStatus.WARNING; // 2 - public static final int ERROR = IStatus.ERROR; // 4 - - public static final int OK_DEBUG = 200 + OK; - public static final int INFO_DEBUG = 200 + INFO; - public static final int WARNING_DEBUG = 200 + WARNING; - public static final int ERROR_DEBUG = 200 + ERROR; - - /** - * Adds message to log. - * @param level severity level of the message (OK, INFO, WARNING, ERROR, OK_DEBUG, INFO_DEBUG, WARNING_DEBUG, ERROR_DEBUG) - * @param message text to add to the log - * @param exception exception thrown - */ - protected static void _log(int level, String message, Throwable exception) { - if (level == OK_DEBUG || level == INFO_DEBUG || level == WARNING_DEBUG || level == ERROR_DEBUG) { - if (!isDebugging()) - return; - } - - int severity = IStatus.OK; - switch (level) { - case INFO_DEBUG : - case INFO : - severity = IStatus.INFO; - break; - case WARNING_DEBUG : - case WARNING : - severity = IStatus.WARNING; - break; - case ERROR_DEBUG : - case ERROR : - severity = IStatus.ERROR; - } - message = (message != null) ? message : "null"; //$NON-NLS-1$ - Status statusObj = new Status(severity, PLUGIN_ID, severity, message, exception); - Bundle bundle = Platform.getBundle(PLUGIN_ID); - if (bundle != null) - Platform.getLog(bundle).log(statusObj); - } - - /** - * Prints message to log if category matches /debug/tracefilter option. - * @param message text to print - * @param category category of the message, to be compared with /debug/tracefilter - */ - protected static void _trace(String category, String message, Throwable exception) { - if (isTracing(category)) { - message = (message != null) ? message : "null"; //$NON-NLS-1$ - Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception); - Bundle bundle = Platform.getBundle(PLUGIN_ID); - if (bundle != null) - Platform.getLog(bundle).log(statusObj); - } - } - - /** - * @return true if the platform is debugging - */ - public static boolean isDebugging() { - return Platform.inDebugMode(); - } - - /** - * Determines if currently tracing a category - * @param category - * @return true if tracing category, false otherwise - */ - public static boolean isTracing(String category) { - if (!isDebugging()) - return false; - - String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION); - if (traceFilter != null) { - StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); //$NON-NLS-1$ - while (tokenizer.hasMoreTokens()) { - String cat = tokenizer.nextToken().trim(); - if (category.equals(cat)) { - return true; - } - } - } - return false; - } - - public static void log(int level, String message) { - _log(level, message, null); - } - - public static void log(int level, String message, Throwable exception) { - _log(level, message, exception); - } - - public static void logException(String message, Throwable exception) { - _log(ERROR, message, exception); - } - - public static void logException(Throwable exception) { - _log(ERROR, exception.getMessage(), exception); - } - - public static void traceException(String category, String message, Throwable exception) { - _trace(category, message, exception); - } - - public static void traceException(String category, Throwable exception) { - _trace(category, exception.getMessage(), exception); - } - - public static void trace(String category, String message) { - _trace(category, message, null); - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/ModelParserTests.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/ModelParserTests.java deleted file mode 100644 index 0652a53f1..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/ModelParserTests.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.eclipse.wst.html.core.tests.parser.AttrTest; -import org.eclipse.wst.html.core.tests.parser.AttrTest2; -import org.eclipse.wst.html.core.tests.parser.CDATASectionTest; -import org.eclipse.wst.html.core.tests.parser.CDATASectionTest2; -import org.eclipse.wst.html.core.tests.parser.CDATASectionTest3; -import org.eclipse.wst.html.core.tests.parser.DocTypeTest; -import org.eclipse.wst.html.core.tests.parser.ElementTest; -import org.eclipse.wst.html.core.tests.parser.ElementTest2; -import org.eclipse.wst.html.core.tests.parser.ElementTest3; -import org.eclipse.wst.html.core.tests.parser.EmptyTextTest; -import org.eclipse.wst.html.core.tests.parser.EmptyTextTest2; -import org.eclipse.wst.html.core.tests.parser.EmptyTextTest3; -import org.eclipse.wst.html.core.tests.parser.EntityTest; -import org.eclipse.wst.html.core.tests.parser.EntityTest2; -import org.eclipse.wst.html.core.tests.parser.EntityTest3; -import org.eclipse.wst.html.core.tests.parser.EntityTest4; -import org.eclipse.wst.html.core.tests.parser.EntityTest5; -import org.eclipse.wst.html.core.tests.parser.EntityTest6; -import org.eclipse.wst.html.core.tests.parser.EntityTest7; -import org.eclipse.wst.html.core.tests.parser.EntityTest8; -import org.eclipse.wst.html.core.tests.parser.EntityTest9; -import org.eclipse.wst.html.core.tests.parser.PITest; -import org.eclipse.wst.html.core.tests.parser.ParserTest; -import org.eclipse.wst.html.core.tests.parser.ParserTest2; -import org.eclipse.wst.html.core.tests.parser.ParserTest3; -import org.eclipse.wst.html.core.tests.parser.ParserTest4; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest2; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest3; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest4; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest5; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest6; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest7; -import org.eclipse.wst.html.core.tests.parser.SplitTextTest8; -import org.eclipse.wst.html.core.tests.parser.TableTest; -import org.eclipse.wst.html.core.tests.parser.TextTest; -import org.eclipse.wst.html.core.tests.parser.TextTest2; -import org.eclipse.wst.html.core.tests.parser.TextTest3; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest10; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest11; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest12; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest13; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest14; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest2; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest3; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest4; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest5; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest6; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest7; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest8; -import org.eclipse.wst.html.core.tests.parser.UpdaterTest9; - - - -public class ModelParserTests extends TestSuite { - public static Test suite() { - return new ModelParserTests(); - } - - public ModelParserTests() { - super("ModelParserTests"); - - addTest(new TestSuite(ParserTest.class, "ParserTest")); - addTest(new TestSuite(ParserTest2.class, "ParserTest2")); - addTest(new TestSuite(ParserTest3.class, "ParserTest3")); - addTest(new TestSuite(ParserTest4.class, "ParserTest4")); - addTest(new TestSuite(UpdaterTest.class, "UpdaterTest")); - addTest(new TestSuite(UpdaterTest2.class, "UpdaterTest2")); - addTest(new TestSuite(UpdaterTest3.class, "UpdaterTest3")); - addTest(new TestSuite(UpdaterTest4.class, "UpdaterTest4")); - addTest(new TestSuite(UpdaterTest5.class, "UpdaterTest5")); - addTest(new TestSuite(UpdaterTest6.class, "UpdaterTest6")); - addTest(new TestSuite(UpdaterTest7.class, "UpdaterTest7")); - addTest(new TestSuite(UpdaterTest8.class, "UpdaterTest8")); - addTest(new TestSuite(UpdaterTest9.class, "UpdaterTest9")); - addTest(new TestSuite(UpdaterTest10.class, "UpdaterTest10")); - addTest(new TestSuite(UpdaterTest11.class, "UpdaterTest11")); - addTest(new TestSuite(UpdaterTest12.class, "UpdaterTest12")); - addTest(new TestSuite(UpdaterTest13.class, "UpdaterTest13")); - addTest(new TestSuite(UpdaterTest14.class, "UpdaterTest14")); - addTest(new TestSuite(ElementTest.class, "ElementTest")); - addTest(new TestSuite(ElementTest2.class, "ElementTest2")); - addTest(new TestSuite(ElementTest3.class, "ElementTest3")); - addTest(new TestSuite(TableTest.class, "TableTest")); - addTest(new TestSuite(TextTest.class, "TextTest")); - addTest(new TestSuite(TextTest2.class, "TextTest2")); - addTest(new TestSuite(TextTest3.class, "TextTest3")); - addTest(new TestSuite(SplitTextTest.class, "SplitTextTest")); - addTest(new TestSuite(SplitTextTest2.class, "SplitTextTest2")); - addTest(new TestSuite(SplitTextTest3.class, "SplitTextTest3")); - addTest(new TestSuite(SplitTextTest4.class, "SplitTextTest4")); - addTest(new TestSuite(SplitTextTest5.class, "SplitTextTest5")); - addTest(new TestSuite(SplitTextTest6.class, "SplitTextTest6")); - addTest(new TestSuite(SplitTextTest7.class, "SplitTextTest7")); - addTest(new TestSuite(SplitTextTest8.class, "SplitTextTest8")); - addTest(new TestSuite(EmptyTextTest.class, "EmptyTextTest")); - addTest(new TestSuite(EmptyTextTest2.class, "EmptyTextTest2")); - addTest(new TestSuite(EmptyTextTest3.class, "EmptyTextTest3")); - addTest(new TestSuite(AttrTest.class, "AttrTest")); - addTest(new TestSuite(AttrTest2.class, "AttrTest2")); - addTest(new TestSuite(EntityTest.class, "EntityTest")); - addTest(new TestSuite(EntityTest2.class, "EntityTest2")); - addTest(new TestSuite(EntityTest3.class, "EntityTest3")); - addTest(new TestSuite(EntityTest4.class, "EntityTest4")); - addTest(new TestSuite(EntityTest5.class, "EntityTest5")); - addTest(new TestSuite(EntityTest6.class, "EntityTest6")); - addTest(new TestSuite(EntityTest7.class, "EntityTest7")); - addTest(new TestSuite(EntityTest8.class, "EntityTest8")); - addTest(new TestSuite(EntityTest9.class, "EntityTest9")); - addTest(new TestSuite(DocTypeTest.class, "DocTypeTest")); - addTest(new TestSuite(CDATASectionTest.class, "CDATASectionTest")); - addTest(new TestSuite(CDATASectionTest2.class, "CDATASectionTest2")); - addTest(new TestSuite(CDATASectionTest3.class, "CDATASectionTest3")); - addTest(new TestSuite(PITest.class, "PITest")); - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/misc/HTMLCorePreferencesTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/misc/HTMLCorePreferencesTest.java deleted file mode 100644 index 59276fc4f..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/misc/HTMLCorePreferencesTest.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.misc; - -import junit.framework.TestCase; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.preferences.DefaultScope; -import org.eclipse.core.runtime.preferences.IEclipsePreferences; -import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.wst.html.core.internal.HTMLCorePlugin; -import org.eclipse.wst.html.core.internal.encoding.HTMLDocumentLoader; -import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames; -import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML; -import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames; -import org.eclipse.wst.sse.core.internal.encoding.ContentBasedPreferenceGateway; -import org.eclipse.wst.sse.core.internal.encoding.ContentTypeEncodingPreferences; -import org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleException; -import org.osgi.service.prefs.Preferences; - -/** - * The purpose of this test is to verify the validity of the HTML Source - * editor preferences. Tests include setting/getting preferences. - * - * NOTE: This test should be preformed on a clean workspace. If performed on - * an existing workspace, this test will manipulate preferences in the - * workspace, though attempts will be made to restore original values after - * testing. - */ -public class HTMLCorePreferencesTest extends TestCase { - /** - * Tests existance of preference values when getting preference values - * through Platform.getPreferencesService() - */ - public void testBundleGetPreferences() { - final String bundleName = "org.eclipse.wst.html.core"; - - // need to start up bundle for default values to be loaded - Bundle bundle = Platform.getBundle(bundleName); - try { - if (bundle != null) - bundle.start(); - else - fail("Get preference value failed because could not find bundle: " + bundleName); - } - catch (BundleException e) { - fail("Get preference value failed because of exception starting bundle: " + bundleName + " exception: " + e); - } - - bundleGetPreference(bundleName, HTMLCorePreferenceNames.TAG_NAME_CASE); - bundleGetPreference(bundleName, HTMLCorePreferenceNames.ATTR_NAME_CASE); - } - - private void bundleGetPreference(String bundleName, String prefKey) { - int defaultValue = -1; - - int value = Platform.getPreferencesService().getInt(bundleName, prefKey, defaultValue, null); - assertTrue("Get preference value failed using Platform.getPreferencesService. Key: " + prefKey, defaultValue != value); - } - - /** - * Tests default values of preferences. - * - * NOTE: Expected default values are hard-coded, so if default values do - * get changed, assertions need to be updated as well - */ - public void testPluginGetDefaultPreferences() { - IEclipsePreferences node = new DefaultScope().getNode(HTMLCorePlugin.getDefault().getBundle().getSymbolicName()); - - pluginGetDefaultPreference(node, HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS, Boolean.toString(false)); - pluginGetDefaultPreference(node, HTMLCorePreferenceNames.ATTR_NAME_CASE, Integer.toString(HTMLCorePreferenceNames.LOWER)); - } - - private void pluginGetDefaultPreference(IEclipsePreferences node, String prefKey, String expected) { - String defaultValue = Long.toString(System.currentTimeMillis()); // random - // string - - String theDefaultValue = node.get(prefKey, defaultValue); - assertEquals("Get default preference value failed using plugin.getPreferenceStore. Key: " + prefKey, expected, theDefaultValue); - } - - /** - * Tests setting preference values by setting preference value to be a - * certain value, then getting the preference value to verify it was set. - */ - public void testPluginSetPreferences() { - IEclipsePreferences node = new InstanceScope().getNode(HTMLCorePlugin.getDefault().getBundle().getSymbolicName()); - - pluginSetPreferenceBoolean(node, HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS); - pluginSetPreferenceString(node, HTMLCorePreferenceNames.TAG_NAME_CASE); - } - - private void pluginSetPreferenceBoolean(IEclipsePreferences node, String prefKey) { - boolean originalValue = false; - boolean expectedValue = true; - - String originalString = node.get(prefKey, "bogus"); - if (!"bogus".equals(originalString)) { - originalValue = Boolean.valueOf(originalString).booleanValue(); - expectedValue = !originalValue; - } - node.putBoolean(prefKey, expectedValue); - boolean foundValue = node.getBoolean(prefKey, true); - assertEquals("Set preference value failed using plugin.getPreferenceStore. Key: " + prefKey + " expected: " + expectedValue + " found: " + foundValue, expectedValue, foundValue); - - // attempt to restore original preference value - if ("bogus".equals(originalString)) - node.remove(prefKey); - else - node.put(prefKey, originalString); - } - - private void pluginSetPreferenceString(IEclipsePreferences node, String prefKey) { - String originalValue = node.get(prefKey, "bogus"); - String expectedValue = Long.toString(System.currentTimeMillis()); // random - // string - node.put(prefKey, expectedValue); - String foundValue = node.get(prefKey, ""); - assertEquals("Set preference value failed using plugin.getPreferenceStore. Key: " + prefKey + " expected: " + expectedValue + " found: " + foundValue, expectedValue, foundValue); - - // attempt to restore original preference value - if ("bogus".equals(originalValue)) - node.remove(prefKey); - else - node.put(prefKey, originalValue); - } - - /** - * Tests line delimiter preferences by making sure document created - * follows line delimiter preference. - */ - public void testDelimiterPreferences() { - // check if content type preferences match - String preferredDelimiter = ContentTypeEncodingPreferences.getPreferredNewLineDelimiter(ContentTypeIdForHTML.ContentTypeID_HTML); - Preferences prefs = ContentBasedPreferenceGateway.getPreferences(ContentTypeIdForHTML.ContentTypeID_HTML); - String gatewayDelimiter = prefs.get(CommonEncodingPreferenceNames.END_OF_LINE_CODE, null); - assertEquals("ContentTypeEncodingPreferences and ContentBasedPreferenceGateway preferences do not match", gatewayDelimiter, preferredDelimiter); - - // set a particular line delimiter - prefs.put(CommonEncodingPreferenceNames.END_OF_LINE_CODE, CommonEncodingPreferenceNames.LF); - - // create document - HTMLDocumentLoader loader = new HTMLDocumentLoader(); - IEncodedDocument document = loader.createNewStructuredDocument(); - String documentDelimiter = document.getPreferredLineDelimiter(); - - // verify delimiter in document matches preference - assertEquals("Delimiter in document does not match preference", CommonEncodingPreferenceNames.STRING_LF, documentDelimiter); - - // return to original preference - prefs.remove(CommonEncodingPreferenceNames.END_OF_LINE_CODE); - } -} diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/misc/HTMLTagInfoTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/misc/HTMLTagInfoTest.java deleted file mode 100644 index 35fa6614c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/misc/HTMLTagInfoTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.misc; - -import org.eclipse.wst.html.core.tests.parser.ModelTest; -import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration; -import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration; -import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap; -import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery; -import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper; -import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class HTMLTagInfoTest extends ModelTest { - - public HTMLTagInfoTest(String name) { - super(name); - } - - public HTMLTagInfoTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new HTMLTagInfoTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element html = document.createElement("HTML"); //$NON-NLS-1$ - document.appendChild(html); - checkElementTagInfo(html); - - Element body = document.createElement("BODY"); //$NON-NLS-1$ - html.appendChild(body); - checkElementTagInfo(body); - - Attr onclick = document.createAttribute("onclick"); //$NON-NLS-1$ - body.setAttributeNode(onclick); - checkAttributeTagInfo(body, onclick); - } - finally { - model.releaseFromEdit(); - } - } - - private void checkElementTagInfo(Element node) { - // check taginfo - CMElementDeclaration elementDecl = getCMElementDeclaration(node); - assertNotNull("Cannot check taginfo because no cm element declaration for " + node.getNodeName(), elementDecl); //$NON-NLS-1$ - if (elementDecl != null) { - String tagInfo = (String) elementDecl.getProperty("tagInfo"); //$NON-NLS-1$ - assertNotNull("No taginfo found for " + elementDecl.getNodeName(), tagInfo); //$NON-NLS-1$ - } - } - - private void checkAttributeTagInfo(Element element, Attr attribute) { - // check taginfo - CMElementDeclaration elementDecl = getCMElementDeclaration(element); - assertNotNull("Cannot check taginfo because no element declaration for " + element.getNodeName(), elementDecl); //$NON-NLS-1$ - if (elementDecl != null) { - CMAttributeDeclaration attDecl = getCMAttributeDeclaration(elementDecl, attribute.getName()); - assertNotNull("Cannot check taginfo because no attribute declaration for " + attribute.getName(), attDecl); //$NON-NLS-1$ - - String tagInfo = (String) attDecl.getProperty("tagInfo"); //$NON-NLS-1$ - assertNull("Unexpected taginfo found for " + attDecl.getNodeName(), tagInfo); //$NON-NLS-1$ - } - } - - /** - * Retreives CMAttributeDeclaration indicated by attribute name within - * elementDecl - */ - private CMAttributeDeclaration getCMAttributeDeclaration(CMElementDeclaration elementDecl, String attName) { - CMAttributeDeclaration attrDecl = null; - - if (elementDecl != null) { - CMNamedNodeMap attributes = elementDecl.getAttributes(); - String noprefixName = DOMNamespaceHelper.getUnprefixedName(attName); - if (attributes != null) { - attrDecl = (CMAttributeDeclaration) attributes.getNamedItem(noprefixName); - if (attrDecl == null) { - attrDecl = (CMAttributeDeclaration) attributes.getNamedItem(attName); - } - } - } - return attrDecl; - } - - /** - * Retreives CMElementDeclaration for given node - * - * @return CMElementDeclaration - CMElementDeclaration of node or - * <code>null</code> if not possible - */ - private CMElementDeclaration getCMElementDeclaration(Element element) { - CMElementDeclaration result = null; - - ModelQuery modelQuery = ModelQueryUtil.getModelQuery(element.getOwnerDocument()); - if (modelQuery != null) - result = modelQuery.getCMElementDeclaration(element); - return result; - } -} diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/BUG124835SetStyleAttributeValueTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/BUG124835SetStyleAttributeValueTest.java deleted file mode 100644 index 949e59f3f..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/BUG124835SetStyleAttributeValueTest.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.eclipse.wst.html.core.tests.model; - -import junit.framework.TestCase; - -import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty; -import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration; -import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace; -import org.eclipse.wst.html.core.tests.utils.FileUtil; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Element; -import org.w3c.dom.css.ElementCSSInlineStyle; - -public class BUG124835SetStyleAttributeValueTest extends TestCase { - /** - * Tests setting some css attribute values including setting the same - * value several times for different attributes - */ - public void testSetAttributeValue() { - final String ABSOLUTE = "absolute"; - final String ONE = "1"; - final String PX = "50px"; - - IDOMModel model = FileUtil.createHTMLModel(); - try { - IDOMDocument doc = model.getDocument(); - Element element = doc.createElement(HTML40Namespace.ElementName.DIV); - element.setAttribute(HTML40Namespace.ATTR_NAME_ID, "Layer0"); - element.setAttribute(HTML40Namespace.ATTR_NAME_STYLE, ""); - setInlineStyle(element, PropCMProperty.P_POSITION, ABSOLUTE); - setInlineStyle(element, PropCMProperty.P_Z_INDEX, ONE); - setInlineStyle(element, PropCMProperty.P_WIDTH, PX); - setInlineStyle(element, PropCMProperty.P_HEIGHT, PX); - setInlineStyle(element, PropCMProperty.P_TOP, PX); - setInlineStyle(element, PropCMProperty.P_LEFT, PX); - - assertEquals(ABSOLUTE, getInlineStyle(element, PropCMProperty.P_POSITION)); - assertEquals(ONE, getInlineStyle(element, PropCMProperty.P_Z_INDEX)); - assertEquals(PX, getInlineStyle(element, PropCMProperty.P_WIDTH)); - assertEquals(PX, getInlineStyle(element, PropCMProperty.P_HEIGHT)); - assertEquals(PX, getInlineStyle(element, PropCMProperty.P_TOP)); - assertEquals(PX, getInlineStyle(element, PropCMProperty.P_LEFT)); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - private void setInlineStyle(Element element, String name, String value) { - ICSSStyleDeclaration decl = null; - try { - decl = (ICSSStyleDeclaration) ((ElementCSSInlineStyle) element).getStyle(); - } - catch (ClassCastException ex) { - // do nothing - } - if (decl != null) { - String priority = decl.getPropertyPriority(name); - decl.setProperty(name, value, priority); - } - } - - - private String getInlineStyle(Element element, String name) { - String value = null; - ICSSStyleDeclaration decl = null; - try { - decl = (ICSSStyleDeclaration) ((ElementCSSInlineStyle) element).getStyle(); - } - catch (ClassCastException ex) { - // do nothing - } - if (decl != null) { - value = decl.getPropertyValue(name); - } - return value; - } -} diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/GetOverrideStyleTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/GetOverrideStyleTest.java deleted file mode 100644 index 71d12ac34..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/GetOverrideStyleTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.model; - - -import junit.framework.TestCase; - -import org.eclipse.wst.html.core.tests.utils.FileUtil; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.w3c.dom.css.DocumentCSS; - -public class GetOverrideStyleTest extends TestCase { - /** - * Constructor for StyleTest. - * - * @param name - */ - public GetOverrideStyleTest(String name) { - super(name); - } - - public GetOverrideStyleTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new GetOverrideStyleTest().testModel(); - } - - public void testModel() { - IDOMModel model = FileUtil.createHTMLModel(); - try { - model.getStructuredDocument().setText(null, "<style>p { border-color: blue; margin: 0; } </style> <p style=\"border-color: red; margin: 1;\">"); - Document document = model.getDocument(); - - DocumentCSS ddd = (DocumentCSS) document; - NodeList n = document.getElementsByTagName("p"); - ddd.getOverrideStyle((Element) n.item(0), ""); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/ModelModifications.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/ModelModifications.java deleted file mode 100644 index 768776297..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/ModelModifications.java +++ /dev/null @@ -1,304 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * - *******************************************************************************/ - -package org.eclipse.wst.html.core.tests.model; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; - -import junit.framework.TestCase; - -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.Document; -import org.eclipse.jface.text.IDocument; -import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace; -import org.eclipse.wst.html.core.tests.utils.TestWriter; -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.encoding.util.NullInputStream; -import org.eclipse.wst.sse.core.internal.provisional.IModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Element; - -public class ModelModifications extends TestCase { - - public void testPlainDocument() throws BadLocationException { - IDocument document = new Document(); - document.set(""); - document.replace(0, 0, "test"); - document.set(""); - document.replace(0, 0, "test2"); - assertTrue(true); - - } - - public void testRepDocumentHTMLMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createHTMLModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.replaceText(this, 0, structuredDocument.getLength(), "<tag>text</tag>"); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testSetDocumentXMLMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createXMLModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.setText(this, ""); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testRepDocumentJSPMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createJSPModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.replaceText(this, 0, structuredDocument.getLength(), "<tag>text</tag>"); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testSetDocumentHTMLMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createHTMLModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.setText(this, ""); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testSetDocumentJSPMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createJSPModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.setText(this, ""); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testRepDocumentXMLMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createXMLModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.replaceText(this, 0, structuredDocument.getLength(), "<tag>text</tag>"); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testDocumentHTMLMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createHTMLModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.replaceText(this, 0, structuredDocument.getLength(), ""); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testDocumentJSPMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createJSPModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.replaceText(this, 0, structuredDocument.getLength(), ""); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - public void testDocumentXMLMods() throws UnsupportedEncodingException, IOException { - IDOMModel model = null; // assumes 0-byte html empty file - - model = createXMLModel(); - - try { - IDOMDocument doc = model.getDocument(); - Element ele = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.replaceText(this, 0, structuredDocument.getLength(), ""); - Element ele2 = doc.createElement(HTML40Namespace.ElementName.P); - doc.appendChild(ele2); - } - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - } - - /** - * Be sure to release any models obtained from this method. - * - * @return - * @throws IOException - * @throws UnsupportedEncodingException - */ - private static IDOMModel createXMLModel() throws UnsupportedEncodingException, IOException { - - IStructuredModel model = null; - IModelManager modelManager = StructuredModelManager.getModelManager(); - - model = modelManager.getModelForEdit("test.xml", new NullInputStream(), null); - - // always use the same line delimiter for these tests, regardless - // of - // plaform or preference settings - model.getStructuredDocument().setLineDelimiter(TestWriter.commonEOL); - return (IDOMModel) model; - - } - - /** - * Be sure to release any models obtained from this method. - * - * @return - * @throws IOException - * @throws UnsupportedEncodingException - */ - private static IDOMModel createHTMLModel() throws UnsupportedEncodingException, IOException { - - IStructuredModel model = null; - IModelManager modelManager = StructuredModelManager.getModelManager(); - - model = modelManager.getModelForEdit("test.html", new NullInputStream(), null); - - // always use the same line delimiter for these tests, regardless - // of - // plaform or preference settings - model.getStructuredDocument().setLineDelimiter(TestWriter.commonEOL); - return (IDOMModel) model; - - } - - /** - * Be sure to release any models obtained from this method. - * - * @return - * @throws IOException - * @throws UnsupportedEncodingException - */ - private static IDOMModel createJSPModel() throws UnsupportedEncodingException, IOException { - - IStructuredModel model = null; - - IModelManager modelManager = StructuredModelManager.getModelManager(); - - model = modelManager.getModelForEdit("test.xml", new NullInputStream(), null); - - // always use the same line delimiter for these tests, regardless - // of - // plaform or preference settings - model.getStructuredDocument().setLineDelimiter(TestWriter.commonEOL); - - - return (IDOMModel) model; - - } - -} diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/TestForNPEInCSSCreation.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/TestForNPEInCSSCreation.java deleted file mode 100644 index 597a34139..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/model/TestForNPEInCSSCreation.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * - *******************************************************************************/ - -package org.eclipse.wst.html.core.tests.model; - -import junit.framework.TestCase; - -import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleSheetAdapter; -import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule; -import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet; -import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace; -import org.eclipse.wst.html.core.tests.utils.FileUtil; -import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.w3c.dom.Text; - -public class TestForNPEInCSSCreation extends TestCase { - - - public void testCSSModel() { - - IDOMModel model = FileUtil.createHTMLModel(); - - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - structuredDocument.set(getHTMLDocumentText()); - - IDOMDocument doc = model.getDocument(); - - // get head tag - NodeList list = doc.getElementsByTagName(HTML40Namespace.ElementName.HEAD); - Element head = (Element) list.item(0); - - // create and append style element - Element ele = doc.createElement(HTML40Namespace.ElementName.STYLE); - ele.setAttribute(HTML40Namespace.ATTR_NAME_TYPE, "text/css"); - - String delim = model.getStructuredDocument().getLineDelimiter(); - if (delim == null) - delim = "\n";//$NON-NLS-1$ - StringBuffer buffer = new StringBuffer(delim); - buffer.append("<!--");//$NON-NLS-1$ - buffer.append(delim); - buffer.append("-->");//$NON-NLS-1$ - buffer.append(delim); - Text text = doc.createTextNode(buffer.toString()); - ele.appendChild(text); - - head.insertBefore(ele, null); - - // get adapter for StyleSheet - ICSSStyleSheet sheet = (ICSSStyleSheet) ((IStyleSheetAdapter) ((INodeNotifier) ele).getAdapterFor(IStyleSheetAdapter.class)).getSheet(); - - // create style declaration - ICSSStyleRule rule = sheet.createCSSStyleRule(); - rule.getStyle().setProperty("background-color", "lime", ""); - rule.getStyle().setProperty("background-color", "blue", ""); - rule.getStyle().setProperty("background-color", "#0080ff", ""); - - //model.save(); - - - } - - - finally { - if (model != null) { - model.releaseFromEdit(); - } - } - - } - - private String getHTMLDocumentText() { - return "<html><head></head><body></body></html>"; - } - -} diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AllModelParserTests.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AllModelParserTests.java deleted file mode 100644 index 0ed2256c9..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AllModelParserTests.java +++ /dev/null @@ -1,152 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - - -import junit.framework.TestSuite; - - -public class AllModelParserTests { - - // public AllModelParserTests(String name) { - // //super(name); - // } - - public void holdOldTestMain() { - runTest(new ParserTest()); - runTest(new ParserTest2()); - runTest(new ParserTest3()); - runTest(new ParserTest4()); - runTest(new UpdaterTest()); - runTest(new UpdaterTest2()); - runTest(new UpdaterTest3()); - runTest(new UpdaterTest4()); - runTest(new UpdaterTest5()); - runTest(new UpdaterTest6()); - runTest(new UpdaterTest7()); - runTest(new UpdaterTest8()); - runTest(new UpdaterTest9()); - runTest(new UpdaterTest10()); - runTest(new UpdaterTest11()); - runTest(new UpdaterTest12()); - runTest(new UpdaterTest13()); - runTest(new UpdaterTest14()); - runTest(new ElementTest()); - runTest(new ElementTest2()); - runTest(new ElementTest3()); - runTest(new TableTest()); - runTest(new TextTest()); - runTest(new TextTest2()); - runTest(new TextTest3()); - runTest(new SplitTextTest()); - runTest(new SplitTextTest2()); - runTest(new SplitTextTest3()); - runTest(new SplitTextTest4()); - runTest(new SplitTextTest5()); - runTest(new SplitTextTest6()); - runTest(new SplitTextTest7()); - runTest(new SplitTextTest8()); - runTest(new EmptyTextTest()); - runTest(new EmptyTextTest2()); - runTest(new EmptyTextTest3()); - runTest(new AttrTest()); - runTest(new AttrTest2()); - runTest(new EntityTest()); - runTest(new EntityTest2()); - runTest(new EntityTest3()); - runTest(new EntityTest4()); - runTest(new EntityTest5()); - runTest(new EntityTest6()); - runTest(new EntityTest7()); - runTest(new EntityTest8()); - runTest(new EntityTest9()); - runTest(new DocTypeTest()); - runTest(new CDATASectionTest()); - runTest(new CDATASectionTest2()); - runTest(new CDATASectionTest3()); - runTest(new PITest()); - } - - public static TestSuite getAllTests() { - - - TestSuite testSuite = new TestSuite(); - - testSuite.addTestSuite(ParserTest.class); - testSuite.addTestSuite(ParserTest2.class); - testSuite.addTestSuite(ParserTest3.class); - testSuite.addTestSuite(ParserTest4.class); - testSuite.addTestSuite(UpdaterTest.class); - testSuite.addTestSuite(UpdaterTest2.class); - testSuite.addTestSuite(UpdaterTest3.class); - testSuite.addTestSuite(UpdaterTest4.class); - testSuite.addTestSuite(UpdaterTest5.class); - testSuite.addTestSuite(UpdaterTest6.class); - testSuite.addTestSuite(UpdaterTest7.class); - testSuite.addTestSuite(UpdaterTest8.class); - testSuite.addTestSuite(UpdaterTest9.class); - testSuite.addTestSuite(UpdaterTest10.class); - testSuite.addTestSuite(UpdaterTest11.class); - testSuite.addTestSuite(UpdaterTest12.class); - testSuite.addTestSuite(UpdaterTest13.class); - testSuite.addTestSuite(UpdaterTest14.class); - testSuite.addTestSuite(ElementTest.class); - testSuite.addTestSuite(ElementTest2.class); - testSuite.addTestSuite(ElementTest3.class); - testSuite.addTestSuite(TableTest.class); - testSuite.addTestSuite(TextTest.class); - testSuite.addTestSuite(TextTest2.class); - testSuite.addTestSuite(TextTest3.class); - testSuite.addTestSuite(SplitTextTest.class); - testSuite.addTestSuite(SplitTextTest2.class); - testSuite.addTestSuite(SplitTextTest3.class); - testSuite.addTestSuite(SplitTextTest4.class); - testSuite.addTestSuite(SplitTextTest5.class); - testSuite.addTestSuite(SplitTextTest6.class); - testSuite.addTestSuite(SplitTextTest7.class); - testSuite.addTestSuite(SplitTextTest8.class); - testSuite.addTestSuite(EmptyTextTest.class); - testSuite.addTestSuite(EmptyTextTest2.class); - testSuite.addTestSuite(EmptyTextTest3.class); - testSuite.addTestSuite(AttrTest.class); - testSuite.addTestSuite(AttrTest2.class); - testSuite.addTestSuite(EntityTest.class); - testSuite.addTestSuite(EntityTest2.class); - testSuite.addTestSuite(EntityTest3.class); - testSuite.addTestSuite(EntityTest4.class); - testSuite.addTestSuite(EntityTest5.class); - testSuite.addTestSuite(EntityTest6.class); - testSuite.addTestSuite(EntityTest7.class); - testSuite.addTestSuite(EntityTest8.class); - testSuite.addTestSuite(EntityTest9.class); - testSuite.addTestSuite(DocTypeTest.class); - testSuite.addTestSuite(CDATASectionTest.class); - testSuite.addTestSuite(CDATASectionTest2.class); - testSuite.addTestSuite(CDATASectionTest3.class); - testSuite.addTestSuite(PITest.class); - // the follow is fairly long running - //testSuite.addTestSuite(TestExampleFiles.class); - - return testSuite; - } - - - - private void runTest(ModelTest test) { - try { - test.testModel(); - } - catch (Exception ex) { - ModelTest.printException(ex); - } - } - -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest.java deleted file mode 100644 index 1e713e834..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; - -public class AttrTest extends ModelTest { - /** - * Constructor for AttrTest. - * - * @param name - */ - public AttrTest(String name) { - super(name); - } - - public AttrTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new AttrTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - //Document document = model.getDocument(); - - structuredDocument.setText(this, "<a href=\"<%=c%>\">a</a>"); - - printSource(model); - printTree(model); - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest2.java deleted file mode 100644 index 8dbef6aed..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest2.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class AttrTest2 extends ModelTest { - /** - * Constructor for AttrTest2. - * - * @param name - */ - public AttrTest2(String name) { - super(name); - } - - public AttrTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new AttrTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - a.setAttribute("b", "c"); - a.setAttribute("d", "e"); - Text t = document.createTextNode("f"); - document.appendChild(a); - a.appendChild(t); - - printSource(model); - printTree(model); - - Attr b = a.getAttributeNode("b"); - b.setPrefix("x"); - - fOutputWriter.writeln("b.name=" + b.getName()); - fOutputWriter.writeln("b.value=" + b.getValue()); - String ab = a.getAttribute("b"); - fOutputWriter.writeln("a b=" + ab); - String axb = a.getAttribute("x:b"); - fOutputWriter.writeln("a x:b=" + axb); - - printSource(model); - printTree(model); - - a.getAttributeNode("d").setPrefix("y"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest3.java deleted file mode 100644 index 7630665c4..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/AttrTest3.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class AttrTest3 extends ModelTest { - /** - * Constructor for AttrTest3. - * - * @param name - */ - public AttrTest3(String name) { - super(name); - } - - public AttrTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new AttrTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - Document document = model.getDocument(); - - structuredDocument.setText(this, "<a xmlns='default-uri' xmlns:b='b-uri'><c d='d-value' b:e='e-value'/></a>"); - - printSource(model); - printTree(model); - - Element a = (Element) document.getFirstChild(); - Element c = (Element) a.getFirstChild(); - - Attr xmlns = a.getAttributeNode("xmlns"); - fOutputWriter.writeln("xmlns [" + xmlns.getNamespaceURI() + "]"); - Attr xmlns_b = a.getAttributeNode("xmlns:b"); - fOutputWriter.writeln("xmlns:b [" + xmlns_b.getNamespaceURI() + "]"); - Attr d = c.getAttributeNode("d"); - fOutputWriter.writeln("d [" + d.getNamespaceURI() + "]"); - Attr b_e = c.getAttributeNode("b:e"); - fOutputWriter.writeln("b:e [" + b_e.getNamespaceURI() + "]"); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest.java deleted file mode 100644 index 64e8c889e..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.CDATASection; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -public class CDATASectionTest extends ModelTest { - /** - * Constructor for CDATASectionTest. - * - * @param name - */ - public CDATASectionTest(String name) { - super(name); - } - - public CDATASectionTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new CDATASectionTest().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "<a><![CDATA[contentOfCDATASection]]></a>"); - - printSource(model); - printTree(model); - - Node a = document.getFirstChild(); - for (Node child = a.getFirstChild(); child != null; child = child.getNextSibling()) { - if (child.getNodeType() != Node.CDATA_SECTION_NODE) - continue; - CDATASection cdata = (CDATASection) child; - fOutputWriter.writeln(cdata.getData()); - } - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest2.java deleted file mode 100644 index bb476623f..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest2.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.CDATASection; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class CDATASectionTest2 extends ModelTest { - /** - * Constructor for CDATASectionTest2. - * - * @param name - */ - public CDATASectionTest2(String name) { - super(name); - } - - public CDATASectionTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new CDATASectionTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - CDATASection cdata = document.createCDATASection("contentOfCDATASection"); - a.appendChild(cdata); - - printSource(model); - printTree(model); - - fOutputWriter.writeln(cdata.getData()); - - cdata.setData("new content"); - - - printSource(model); - printTree(model); - - fOutputWriter.writeln(cdata.getData()); - - cdata.setData("new content"); - - printSource(model); - printTree(model); - - fOutputWriter.writeln(cdata.getData()); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest3.java deleted file mode 100644 index 3e014cd5e..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/CDATASectionTest3.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.CDATASection; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class CDATASectionTest3 extends ModelTest { - /** - * Constructor for CDATASectionTest3. - * - * @param name - */ - public CDATASectionTest3(String name) { - super(name); - } - - public CDATASectionTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new CDATASectionTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - CDATASection cdata = document.createCDATASection("contentOfCDATASection"); - a.appendChild(cdata); - - printSource(model); - printTree(model); - - fOutputWriter.writeln(cdata.getData()); - - cdata.setData("new < content"); - - - printSource(model); - printTree(model); - - fOutputWriter.writeln(cdata.getData()); - - cdata.setData("new > content"); - - printSource(model); - printTree(model); - - fOutputWriter.writeln(cdata.getData()); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/DocTypeTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/DocTypeTest.java deleted file mode 100644 index 4aede0361..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/DocTypeTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocumentType; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Element; - -public class DocTypeTest extends ModelTest { - /** - * Constructor for DocTypeTest. - * - * @param name - */ - public DocTypeTest(String name) { - super(name); - } - - public DocTypeTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new DocTypeTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - IDOMDocument document = model.getDocument(); - - IDOMDocumentType docType = (IDOMDocumentType) document.createDoctype("HTML"); - document.appendChild(docType); - Element html = document.createElement("HTML"); - document.appendChild(html); - - printSource(model); - printTree(model); - - docType.setSystemId("sytem"); - - printSource(model); - printTree(model); - - docType.setPublicId("public"); - - printSource(model); - printTree(model); - - document.insertBefore(document.createTextNode(" "), docType); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest.java deleted file mode 100644 index 6cf7cad05..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -public class ElementTest extends ModelTest { - /** - * Constructor for ElementTest. - * - * @param name - */ - public ElementTest(String name) { - super(name); - } - - public ElementTest() { - super(); - } - - public Element changeTagName(Element element, String tagName) { - Document document = element.getOwnerDocument(); - Node parent = element.getParentNode(); - Element newElement = document.createElement(tagName); - NamedNodeMap attributes = element.getAttributes(); - while (attributes.getLength() > 0) { - Attr attr = (Attr) attributes.item(0); - attr = element.removeAttributeNode(attr); - newElement.setAttributeNode(attr); - } - while (element.hasChildNodes()) { - Node child = element.getFirstChild(); - child = element.removeChild(child); - newElement.appendChild(child); - } - parent.insertBefore(newElement, element); - parent.removeChild(element); - return newElement; - } - - public static void main(java.lang.String[] args) { - new ElementTest().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - Document document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<a><b e=\"f\" c=\"d\"><g /><h /></b></a>"); - Node a = document.getFirstChild(); - Element b = (Element) a.getFirstChild(); - - printSource(model); - printTree(model); - - //Element i = - changeTagName(b, "i"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest2.java deleted file mode 100644 index 23f1a75cb..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest2.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class ElementTest2 extends ModelTest { - /** - * Constructor for ElementTest2. - * - * @param name - */ - public ElementTest2(String name) { - super(name); - } - - public ElementTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new ElementTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - Element b = document.createElement("b"); - Text t = document.createTextNode("c"); - document.appendChild(a); - a.appendChild(b); - b.appendChild(t); - - printSource(model); - printTree(model); - - a.setPrefix("x"); - - fOutputWriter.writeln("a.tagName=" + a.getTagName()); - - printSource(model); - printTree(model); - - b.setPrefix("y"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest3.java deleted file mode 100644 index 71f465b64..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ElementTest3.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class ElementTest3 extends ModelTest { - /** - * Constructor for ElementTest3. - * - * @param name - */ - public ElementTest3(String name) { - super(name); - } - - public ElementTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new ElementTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("x:a"); - Element b = document.createElement("b"); - Text t = document.createTextNode("c"); - document.appendChild(a); - a.appendChild(b); - b.appendChild(t); - - printSource(model); - printTree(model); - - a.setPrefix(""); - - fOutputWriter.writeln("a.tagName=" + a.getTagName()); - - printSource(model); - printTree(model); - - a.setPrefix("y"); - - fOutputWriter.writeln("a.tagName=" + a.getTagName()); - - printSource(model); - printTree(model); - - a.setPrefix("y"); - - printSource(model); - printTree(model); - - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest.java deleted file mode 100644 index f50cbf75f..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EmptyTextTest extends ModelTest { - /** - * Constructor for EmptyTextTest. - * - * @param name - */ - public EmptyTextTest(String name) { - super(name); - } - - public EmptyTextTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new EmptyTextTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("a"); - p.appendChild(text); - Element br = document.createElement("BR"); - p.appendChild(br); - Text text2 = document.createTextNode(""); - p.appendChild(text2); - - printSource(model); - printTree(model); - - Text text3 = document.createTextNode(""); - p.insertBefore(text3, text2); - - printSource(model); - printTree(model); - - text3.setData("b"); - - printSource(model); - printTree(model); - - p.removeChild(text2); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest2.java deleted file mode 100644 index f3006450b..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest2.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EmptyTextTest2 extends ModelTest { - /** - * Constructor for EmptyTextTest2. - * - * @param name - */ - public EmptyTextTest2(String name) { - super(name); - } - - public EmptyTextTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new EmptyTextTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode(""); - p.appendChild(text); - - printSource(model); - printTree(model); - - text.setData("a"); - - printSource(model); - printTree(model); - - text.setData(""); - - printSource(model); - printTree(model); - - Element b = document.createElement("B"); - p.appendChild(b); - p.removeChild(text); - b.appendChild(text); - - printSource(model); - printTree(model); - - text.setData("a"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest3.java deleted file mode 100644 index 49dfb7a40..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EmptyTextTest3.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EmptyTextTest3 extends ModelTest { - /** - * Constructor for EmptyTextTest3. - * - * @param name - */ - public EmptyTextTest3(String name) { - super(name); - } - - public EmptyTextTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new EmptyTextTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Text text = document.createTextNode(""); - document.appendChild(text); - - printSource(model); - printTree(model); - - Element a = document.createElement("a"); - document.insertBefore(a, text); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest.java deleted file mode 100644 index 6deb9cf7c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EntityTest extends ModelTest { - /** - * Constructor for EntityTest. - * - * @param name - */ - public EntityTest(String name) { - super(name); - } - - public EntityTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - - printSource(model); - printTree(model); - - Text text = document.createTextNode(">"); - p.appendChild(text); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest2.java deleted file mode 100644 index 7bb1459b0..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest2.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EntityTest2 extends ModelTest { - /** - * Constructor for EntityTest2. - * - * @param name - */ - public EntityTest2(String name) { - super(name); - } - - public EntityTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("a"); - p.appendChild(text); - - printSource(model); - printTree(model); - - text.setData("a>"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest3.java deleted file mode 100644 index 12591e707..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest3.java +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EntityTest3 extends ModelTest { - /** - * Constructor for EntityTest3. - * - * @param name - */ - public EntityTest3(String name) { - super(name); - } - - public EntityTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("a"); - p.appendChild(text); - - printSource(model); - printTree(model); - - text.setData("ab"); - - printSource(model); - printTree(model); - - text.setData("ab&"); - - printSource(model); - printTree(model); - - text.setData("ab&c"); - - printSource(model); - printTree(model); - - text.setData("dab&c"); - - printSource(model); - printTree(model); - - text.setData("dab&ce"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest4.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest4.java deleted file mode 100644 index 5f1744c16..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest4.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EntityTest4 extends ModelTest { - /** - * Constructor for EntityTest4. - * - * @param name - */ - public EntityTest4(String name) { - super(name); - } - - public EntityTest4() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest4().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("a&b"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Text text2 = document.createTextNode(""); - p.insertBefore(text2, text); - - printSource(model); - printTree(model); - - text2.setData("c"); - - printSource(model); - printTree(model); - - text2.setData("ca&b"); - - printSource(model); - printTree(model); - - p.removeChild(text); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest5.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest5.java deleted file mode 100644 index 5d6e2692b..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest5.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EntityTest5 extends ModelTest { - /** - * Constructor for EntityTest5. - * - * @param name - */ - public EntityTest5(String name) { - super(name); - } - - public EntityTest5() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest5().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("a&b"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Text text2 = document.createTextNode("a&b"); - p.insertBefore(text2, text); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest6.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest6.java deleted file mode 100644 index c55a9c20c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest6.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class EntityTest6 extends ModelTest { - /** - * Constructor for EntityTest6. - * - * @param name - */ - public EntityTest6(String name) { - super(name); - } - - public EntityTest6() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest6().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("a&"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Text text2 = document.createTextNode("a&"); - p.insertBefore(text2, text); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest7.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest7.java deleted file mode 100644 index 4a092d033..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest7.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; - -public class EntityTest7 extends ModelTest { - /** - * Constructor for EntityTest7. - * - * @param name - */ - public EntityTest7(String name) { - super(name); - } - - public EntityTest7() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest7().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - //Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "<a>aAA&unk;&unk&unk</a>"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest8.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest8.java deleted file mode 100644 index b22f9389c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest8.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; - -public class EntityTest8 extends ModelTest { - /** - * Constructor for EntityTest8. - * - * @param name - */ - public EntityTest8(String name) { - super(name); - } - - public EntityTest8() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest8().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - //Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "&ibm;&rtp;"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest9.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest9.java deleted file mode 100644 index a1eff8b36..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/EntityTest9.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; - -public class EntityTest9 extends ModelTest { - /** - * Constructor for EntityTest9. - * - * @param name - */ - public EntityTest9(String name) { - super(name); - } - - public EntityTest9() { - super(); - } - - public static void main(java.lang.String[] args) { - new EntityTest9().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - //Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "<"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(this, 4, 0, ">"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(this, 7, 0, ";"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ModelTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ModelTest.java deleted file mode 100644 index d59cfe7c2..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ModelTest.java +++ /dev/null @@ -1,291 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Writer; - -import junit.framework.TestCase; - -import org.eclipse.wst.html.core.tests.utils.DateUtil; -import org.eclipse.wst.html.core.tests.utils.FileUtil; -import org.eclipse.wst.html.core.tests.utils.StringCompareUtil; -import org.eclipse.wst.html.core.tests.utils.TestWriter; -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.utils.StringUtils; -import org.eclipse.wst.xml.core.internal.document.StructuredDocumentRegionChecker; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Node; - -public abstract class ModelTest extends TestCase { - - public final static String testResultsDirectoryPrefix = "ParserResults"; - private final static String fileExtension = ".txt"; - protected TestWriter fOutputWriter = new TestWriter(); - private int READ_BUFFER_SIZE = 4096; - - private boolean echoToSystemOut = false; - private boolean printedOnce; - private boolean printSummaryToSystemOut; - - /** - * Constructor for ModelTest. - * - * @param name - */ - public ModelTest(String name) { - super(name); - try { - printClass(); - } - catch (IOException e) { - e.printStackTrace(); - } - } - - public ModelTest() { - this("dummy"); - // try { - // printClass(); - // } catch (IOException e) { - // e.printStackTrace(); - // } - } - - public static IDOMModel createHTMLModel() { - - //return new XMLModelImpl(); - - IStructuredModel model = null; - try { - IModelManager modelManager = StructuredModelManager.getModelManager(); - - model = modelManager.getModelForEdit("test.html", new NullInputStream(), null); - - // always use the same line delimiter for these tests, regardless - // of - // plaform or preference settings - model.getStructuredDocument().setLineDelimiter(TestWriter.commonEOL); - } - catch (Exception e) { - e.printStackTrace(); - } - //assertTrue("basic XML empty model could not be created", model != - // null); - return (IDOMModel) model; - - } - - public static IDOMModel createXMLModel() { - - //return new XMLModelImpl(); - - IStructuredModel model = null; - try { - IModelManager modelManager = StructuredModelManager.getModelManager(); - //assertTrue("modelManager must not be null", modelManager != - // null); - - model = modelManager.getModelForEdit("test.xml", new NullInputStream(), null); - - // always use the same line delimiter for these tests, regardless - // of - // plaform or preference settings - model.getStructuredDocument().setLineDelimiter(TestWriter.commonEOL); - - - } - catch (Exception e) { - e.printStackTrace(); - } - //assertTrue("basic XML empty model could not be created", model != - // null); - return (IDOMModel) model; - - } - - /** - */ - private void printClass() throws IOException { - fOutputWriter.writeln(getClass().getName()); - } - - public static void printException(Exception ex) { - ex.printStackTrace(); - } - - private void printNode(Node node, int indent) { - try { - StringBuffer buffer = new StringBuffer(10); - for (int i = 0; i < indent; i++) - buffer.append("--"); - buffer.append(StringUtils.escape(node.toString())); - fOutputWriter.writeln(buffer.toString()); - indent++; - Node child = node.getFirstChild(); - while (child != null) { - printNode(child, indent); - child = child.getNextSibling(); - } - } - catch (Exception ex) { - printException(ex); - } - } - - public void printSource(IDOMModel model) { - try { - fOutputWriter.writeln("Source :"); - fOutputWriter.writeln(model.getStructuredDocument().getText()); - fOutputWriter.writeln(""); - } - catch (Exception ex) { - printException(ex); - } - } - - public void printTree(IDOMModel model) { - try { - printFlatModel(model.getStructuredDocument()); - new StructuredDocumentRegionChecker(fOutputWriter).checkModel(model); - fOutputWriter.writeln("Tree :"); - printNode(model.getDocument(), 0); - fOutputWriter.writeln(""); - - } - catch (Exception ex) { - printException(ex); - } - - } - - protected void saveAndCompareTestResults() { - try { - String testOutputDirectory = testResultsDirectoryPrefix + DateUtil.now(); - String currentFilename = getClass().getName() + fileExtension; - File fileout = FileUtil.makeFileFor(testOutputDirectory, currentFilename, testResultsDirectoryPrefix); - Writer fileWriter = new FileWriter(fileout); - fileWriter.write(fOutputWriter.toString()); - fileWriter.close(); - compareWithPreviousResults(fOutputWriter, currentFilename); - - if (echoToSystemOut) { - System.out.println(fOutputWriter.toString()); - } - - fOutputWriter.close(); - } - catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * Method compareWithPreviousResults. - * - * @param outputWriter - * @param currentFilename - */ - private void compareWithPreviousResults(TestWriter outputWriter, String currentFilename) throws IOException { - boolean success = false; - File previousResultsDir = FileUtil.getPreviousResultsDirectory(testResultsDirectoryPrefix); - if (previousResultsDir != null) { - String currentResults = outputWriter.toString(); - File previousResultsFile = new File(previousResultsDir, currentFilename); - FileReader previousResultsFileReader = new FileReader(previousResultsFile); - String previousResults = readString(previousResultsFileReader); - StringCompareUtil stringCompare = new StringCompareUtil(); - // trying to "force" the same linedelimter didn't work well, - // I think since the line delimiter is input on some tests, - // and CVS is likely to change anyway (for ASCII files). - // so we'll ignore in our comparisons. Note: we wouldn't - // want to ignore whitespace. There might actually be some - // tests that are not as accurate if we ignore EOL, but there - // seems to be no easy way to handle, with out a lot of trouble. - if (!stringCompare.equalsIgnoreLineSeperator(previousResults, currentResults)) { - // previousResults.equals(currentResults)) { - // fail - success = false; - - System.out.println(); - System.out.println(currentFilename + " failed comparison to previous results"); - System.out.println("Previous: "); - System.out.println(previousResults); - System.out.println(); - System.out.println("Current: "); - System.out.println(currentResults); - System.out.println(); - } - else { - success = true; - if (printSummaryToSystemOut) { - System.out.println(); - System.out.println(currentFilename + " compared ok"); - System.out.println(); - } - } - } - else { - if (!printedOnce) { - System.out.println(); - System.out.println("No Previous Directory found ... couldn't compare " + currentFilename + " with previous results"); - printedOnce = true; - System.out.println(); - } - } - assertTrue("current is not equal to reference results for " + currentFilename, success); - } - - /** - * Method readString. - * - * @param previousResultsFileReader - * @return String - */ - private String readString(FileReader fileReader) throws IOException { - return readInputStream(fileReader); - } - - private String readInputStream(InputStreamReader inputStreamReader) throws IOException { - int numRead = 0; - StringBuffer buffer = new StringBuffer(); - char tBuff[] = new char[READ_BUFFER_SIZE]; - while ((numRead = inputStreamReader.read(tBuff, 0, tBuff.length)) != -1) { - buffer.append(tBuff, 0, numRead); - } - // remember -- we didn't open stream ... so we don't close it - return buffer.toString(); - } - - public abstract void testModel(); - - protected void printFlatModel(IStructuredDocument flatModel) { - fOutputWriter.writeln(""); - fOutputWriter.writeln("StructuredDocument Regions :"); - IStructuredDocumentRegion flatnode = flatModel.getFirstStructuredDocumentRegion(); - while (flatnode != null) { - - fOutputWriter.writeln(flatnode.toString()); - flatnode = flatnode.getNext(); - - } - fOutputWriter.writeln(""); - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/NodeListTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/NodeListTest.java deleted file mode 100644 index e5f4b16d8..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/NodeListTest.java +++ /dev/null @@ -1,142 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -public class NodeListTest extends ModelTest { - /** - * Constructor for PITest. - * - * @param name - */ - public NodeListTest(String name) { - super(name); - } - - public NodeListTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new NodeListTest().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "<p></p>"); - Node parent = document.getFirstChild(); - - for (int i = 0; i < 1; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 1; i < 5; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 5; i < 10; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 10; i < 20; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 20; i < 50; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 50; i < 100; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 100; i < 200; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 200; i < 500; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 500; i < 1000; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 1000; i < 2000; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 2000; i < 5000; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - - for (int i = 5000; i < 10000; i++) { - parent.appendChild(document.createElement("c")); - } - - iterate(parent); - } - finally { - model.releaseFromEdit(); - } - - } - - private void iterate(Node parent) { - long start = System.currentTimeMillis(); - int i = 0; - int t = 0; - while (t < 1000) { - NodeList childNodes = parent.getChildNodes(); - int length = childNodes.getLength(); - for (i = 0; i < length; i++) { - childNodes.item(i); - } - // these 2 lines are required to invalidate the cache - parent.appendChild(parent.getOwnerDocument().createTextNode("")); - parent.removeChild(parent.getLastChild()); - t++; - } - float d = ((float) (System.currentTimeMillis() - start)) / t; - System.out.println(d + " ms for " + i + " child nodes"); - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/NullInputStream.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/NullInputStream.java deleted file mode 100644 index e4810c3d9..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/NullInputStream.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import java.io.IOException; -import java.io.InputStream; - - -class NullInputStream extends InputStream { - - /* - * (non-Javadoc) - * - * @see java.io.InputStream#mark(int) - */ - public synchronized void mark(int readlimit) { - // nothing to do - } - - /* - * (non-Javadoc) - * - * @see java.io.InputStream#markSupported() - */ - public boolean markSupported() { - // we can mark nothing. - // and, we are using this Null class specifically for - // a "fake" resettable stream. - return true; - } - - /* - * (non-Javadoc) - * - * @see java.io.InputStream#read() - */ - public int read() throws IOException { - - return -1; - } - - /* - * (non-Javadoc) - * - * @see java.io.InputStream#reset() - */ - public synchronized void reset() throws IOException { - // nothing to do - } - - /* - * (non-Javadoc) - * - * @see java.io.InputStream#skip(long) - */ - public long skip(long n) throws IOException { - return 0; - } -} diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/PITest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/PITest.java deleted file mode 100644 index ce72a8d26..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/PITest.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.ProcessingInstruction; - -public class PITest extends ModelTest { - /** - * Constructor for PITest. - * - * @param name - */ - public PITest(String name) { - super(name); - } - - public PITest() { - super(); - } - - public static void main(java.lang.String[] args) { - new PITest().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "<a><?echo $PHP_SELF?></a>"); - - printSource(model); - printTree(model); - - Node a = document.getFirstChild(); - for (Node child = a.getFirstChild(); child != null; child = child.getNextSibling()) { - if (child.getNodeType() != Node.PROCESSING_INSTRUCTION_NODE) - continue; - ProcessingInstruction pi = (ProcessingInstruction) child; - String target = pi.getTarget(); - if (target == null) - target = "null"; - String data = pi.getData(); - if (data == null) - data = "null"; - fOutputWriter.writeln("target(" + target + ") data (" + data + ")"); - } - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest.java deleted file mode 100644 index d1d9b9c04..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -public class ParserTest extends ModelTest { - /** - * Constructor for ParserTest. - * - * @param name - */ - public ParserTest(String name) { - super(name); - } - - public ParserTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new ParserTest().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - Document document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<P><B></B><B></B></P><P></P>"); - Node p = document.getFirstChild(); - Node b = p.getFirstChild(); - Node b2 = b.getNextSibling(); - Node p2 = p.getNextSibling(); - /* - * Element p = document.createElement("P"); - * document.appendChild(p); Element b = - * document.createElement("B"); p.appendChild(b); Element b2 = - * document.createElement("B"); p.appendChild(b2); Element p2 = - * document.createElement("P"); document.appendChild(p2); - */ - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 0, 0, "a"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, ((IDOMNode) b).getStartOffset(), 0, "b"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, ((IDOMNode) b2).getStartOffset(), 0, "c"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, ((IDOMNode) b2).getEndOffset(), 0, "d"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, ((IDOMNode) p2).getStartOffset(), 0, "e"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, ((IDOMNode) p2).getStartOffset() + 3, 0, "f"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, ((IDOMNode) p2).getEndOffset(), 0, "g"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest2.java deleted file mode 100644 index 2790ba33d..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest2.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -public class ParserTest2 extends ModelTest { - /** - * Constructor for ParserTest2. - * - * @param name - */ - public ParserTest2(String name) { - super(name); - } - - public ParserTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new ParserTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - Document document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<a b=\"\" c=\"c\">"); - - printSource(model); - printTree(model); - - Element a = (Element) document.getFirstChild(); - NamedNodeMap attributes = a.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - Node attr = attributes.item(i); - String name = attr.getNodeName(); - String value = attr.getNodeValue(); - fOutputWriter.writeln(name + "=[" + value + "]"); - } - - structuredDocument.replaceText(null, 8, 0, "d"); - - printSource(model); - printTree(model); - - a = (Element) document.getFirstChild(); - attributes = a.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - Node attr = attributes.item(i); - String name = attr.getNodeName(); - String value = attr.getNodeValue(); - fOutputWriter.writeln(name + "=[" + value + "]"); - } - - structuredDocument.replaceText(null, 8, 1, ""); - - printSource(model); - printTree(model); - - a = (Element) document.getFirstChild(); - attributes = a.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - Node attr = attributes.item(i); - String name = attr.getNodeName(); - String value = attr.getNodeValue(); - fOutputWriter.writeln(name + "=[" + value + "]"); - } - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest3.java deleted file mode 100644 index be59eb676..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest3.java +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -public class ParserTest3 extends ModelTest { - /** - * Constructor for ParserTest3. - * - * @param name - */ - public ParserTest3(String name) { - super(name); - } - - public ParserTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new ParserTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - Document document = model.getDocument(); - - //StructuredDocumentEvent event = - structuredDocument.replaceText(null, 0, 0, "<a b >"); - // dont's print instance of event, or many tests will fail when - // event class is changed (exactly what is not needed for unit - // tests!) - // fOutputWriter.writeln(event.toString()); - - printSource(model); - printTree(model); - - Element a = (Element) document.getFirstChild(); - NamedNodeMap attributes = a.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - Node attr = attributes.item(i); - String name = attr.getNodeName(); - String value = attr.getNodeValue(); - fOutputWriter.writeln(name + "=[" + value + "]"); - } - - StructuredDocumentEvent event2 = structuredDocument.replaceText(null, 4, 1, ""); - // I removed this part of output, since renaming class or package - // will cause test to fail! - fOutputWriter.writeln(event2.toString()); - - printSource(model); - printTree(model); - - a = (Element) document.getFirstChild(); - attributes = a.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - Node attr = attributes.item(i); - String name = attr.getNodeName(); - String value = attr.getNodeValue(); - fOutputWriter.writeln(name + "=[" + value + "]"); - } - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest4.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest4.java deleted file mode 100644 index 4d6e60c29..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/ParserTest4.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; - -public class ParserTest4 extends ModelTest { - /** - * Constructor for ParserTest4. - * - * @param name - */ - public ParserTest4(String name) { - super(name); - } - - public ParserTest4() { - super(); - } - - public static void main(java.lang.String[] args) { - new ParserTest4().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - - IStructuredDocument structuredDocument = model.getStructuredDocument(); - //Document document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<a>\n\n<% a %>\n<% b %>\n</a>"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 4, 0, "<"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 5, 0, "b"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 6, 0, "c"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 7, 0, "d"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 8, 0, "e"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 9, 0, ">"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest.java deleted file mode 100644 index 7b4d018ef..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.document.InvalidCharacterException; -import org.eclipse.wst.xml.core.internal.document.SourceValidator; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Text; - -public class SourceTest extends ModelTest { - /** - * Constructor for SourceTest. - * - * @param name - */ - public SourceTest(String name) { - super(name); - } - - public SourceTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new SourceTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Text t = document.createTextNode("t"); - document.appendChild(t); - SourceValidator validator = new SourceValidator(t); - - String source = null; - String result = null; - - source = "aaa<bbb>ccc"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "aaa&\"'bbb><ccc"@"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "&&&"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "&bbb&<>ccc"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "&unk;&unk"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest2.java deleted file mode 100644 index 96bbec3ce..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest2.java +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.document.InvalidCharacterException; -import org.eclipse.wst.xml.core.internal.document.SourceValidator; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class SourceTest2 extends ModelTest { - /** - * Constructor for SourceTest2. - * - * @param name - */ - public SourceTest2(String name) { - super(name); - } - - public SourceTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new SourceTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - Attr b = document.createAttribute("b"); - a.setAttributeNode(b); - document.appendChild(a); - SourceValidator validator = new SourceValidator(b); - - String source = null; - String result = null; - - source = "aaa<bbb>ccc"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "aaa&bbb><ccc"@"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "&&&"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "\"aaa\""; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "\"a'a\""; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest3.java deleted file mode 100644 index 3d9fa8400..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SourceTest3.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.document.InvalidCharacterException; -import org.eclipse.wst.xml.core.internal.document.SourceValidator; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class SourceTest3 extends ModelTest { - /** - * Constructor for SourceTest3. - * - * @param name - */ - public SourceTest3(String name) { - super(name); - } - - public SourceTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new SourceTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - Attr b = document.createAttribute("b"); - a.setAttributeNode(b); - document.appendChild(a); - SourceValidator validator = new SourceValidator(b); - - String source = null; - String result = null; - - source = "<% aaa %><%= bbb %>/<%! ccc %>ddd"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = "<% aaa"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - source = ">< % aaa %>"; - fOutputWriter.writeln("source: " + source); - try { - validator.validateSource(source); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - result = validator.convertSource(source); - fOutputWriter.writeln("result: " + result); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest.java deleted file mode 100644 index efb9deb09..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest extends ModelTest { - /** - * Constructor for SplitTextTest. - * - * @param name - */ - public SplitTextTest(String name) { - super(name); - } - - public SplitTextTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("aabbbbccc"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Text text2 = text.splitText(2); - - printSource(model); - printTree(model); - - Text text3 = text2.splitText(4); - - printSource(model); - printTree(model); - - p.removeChild(text2); - - printSource(model); - printTree(model); - - text.appendData("ddddddd"); - - printSource(model); - printTree(model); - - text3.appendData("eee"); - - printSource(model); - printTree(model); - - p.insertBefore(text2, text3); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest2.java deleted file mode 100644 index fc09d0cd3..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest2.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest2 extends ModelTest { - /** - * Constructor for SplitTextTest2. - * - * @param name - */ - public SplitTextTest2(String name) { - super(name); - } - - public SplitTextTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("aabbbbccc"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Text text2 = text.splitText(2); - - printSource(model); - printTree(model); - - Text text3 = text2.splitText(4); - - printSource(model); - printTree(model); - - p.removeChild(text2); - - printSource(model); - printTree(model); - - Element b = document.createElement("B"); - b.appendChild(text2); - p.insertBefore(b, text3); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest3.java deleted file mode 100644 index 9eb3cc121..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest3.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest3 extends ModelTest { - /** - * Constructor for SplitTextTest3. - * - * @param name - */ - public SplitTextTest3(String name) { - super(name); - } - - public SplitTextTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("aa"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Element b = document.createElement("B"); - Text text2 = document.createTextNode("bbbb"); - b.appendChild(text2); - p.appendChild(b); - - printSource(model); - printTree(model); - - Text text3 = document.createTextNode("ccc"); - p.appendChild(text3); - - printSource(model); - printTree(model); - - p.removeChild(b); - - printSource(model); - printTree(model); - - p.insertBefore(b, text3); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - - } - finally { - model.releaseFromEdit(); - } - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest4.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest4.java deleted file mode 100644 index e7eb96ce2..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest4.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest4 extends ModelTest { - /** - * Constructor for SplitTextTest4. - * - * @param name - */ - public SplitTextTest4(String name) { - super(name); - } - - public SplitTextTest4() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest4().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode(""); - p.appendChild(text); - - printSource(model); - printTree(model); - - text.appendData("aaa"); - - printSource(model); - printTree(model); - - text.deleteData(0, 3); - - printSource(model); - printTree(model); - - Text text2 = document.createTextNode("cccc"); - p.insertBefore(text2, text); - - printSource(model); - printTree(model); - - text.appendData("aaa"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - - - } - finally { - model.releaseFromEdit(); - } - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest5.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest5.java deleted file mode 100644 index 37861f4ea..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest5.java +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest5 extends ModelTest { - /** - * Constructor for SplitTextTest5. - * - * @param name - */ - public SplitTextTest5(String name) { - super(name); - } - - public SplitTextTest5() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest5().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("aabbbbccc"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Text text2 = text.splitText(6); - - printSource(model); - printTree(model); - - Element br = document.createElement("BR"); - p.insertBefore(br, text2); - - printSource(model); - printTree(model); - - text2.setData("cccd"); - - printSource(model); - printTree(model); - - text2.setData("cccde"); - - printSource(model); - printTree(model); - - Text text3 = text.splitText(2); - Element b = document.createElement("B"); - b.appendChild(text3); - p.insertBefore(b, br); - - printSource(model); - printTree(model); - - Text text4 = text2.splitText(3); - Element i = document.createElement("I"); - i.appendChild(text2); - p.insertBefore(i, text4); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - - } - finally { - model.releaseFromEdit(); - } - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest6.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest6.java deleted file mode 100644 index 165f429ae..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest6.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest6 extends ModelTest { - /** - * Constructor for SplitTextTest6. - * - * @param name - */ - public SplitTextTest6(String name) { - super(name); - } - - public SplitTextTest6() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest6().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("aabbbbccc"); - p.appendChild(text); - Text text2 = text.splitText(2); - // ==> // Text text3 = - text2.splitText(4); - - printSource(model); - printTree(model); - - text2.setData("bbbbd"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest7.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest7.java deleted file mode 100644 index 31ab275ba..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest7.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest7 extends ModelTest { - /** - * Constructor for SplitTextTest7. - * - * @param name - */ - public SplitTextTest7(String name) { - super(name); - } - - public SplitTextTest7() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest7().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("aaaa"); - Text text2 = document.createTextNode("bbbb"); - p.appendChild(text); - p.appendChild(text2); - - printSource(model); - printTree(model); - - - // delete accross node boundry - model.getStructuredDocument().replaceText(this, 6, 3, ""); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest8.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest8.java deleted file mode 100644 index 2a94e4410..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/SplitTextTest8.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class SplitTextTest8 extends ModelTest { - /** - * Constructor for SplitTextTest8. - * - * @param name - */ - public SplitTextTest8(String name) { - super(name); - } - - public SplitTextTest8() { - super(); - } - - public static void main(java.lang.String[] args) { - new SplitTextTest8().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Text text = document.createTextNode("aaaa"); - Text text2 = document.createTextNode("bbbb"); - p.appendChild(text); - p.appendChild(text2); - - printSource(model); - printTree(model); - - - // delete accross node boundry - model.getStructuredDocument().replaceText(this, 4, 6, ""); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TableTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TableTest.java deleted file mode 100644 index 02851e78a..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TableTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class TableTest extends ModelTest { - /** - * Constructor for TableTest. - * @param name - */ - public TableTest(String name) { - super(name); - } - - public TableTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new TableTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element html = document.createElement("HTML"); - document.appendChild(html); - - printSource(model); - printTree(model); - - Element body = document.createElement("BODY"); - html.appendChild(body); - - printSource(model); - printTree(model); - - Element table = document.createElement("TABLE"); - table.setAttribute("border", "1"); - Element td = null; - for (int row = 0; row < 2; row++) { - Element tr = document.createElement("TR"); - table.appendChild(tr); - for (int col = 0; col < 2; col++) { - td = document.createElement("TD"); - tr.appendChild(td); - } - } - body.appendChild(table); - - printSource(model); - printTree(model); - - Element font = document.createElement("FONT"); - font.setAttribute("color", "red"); - Text text = document.createTextNode("text"); - font.appendChild(text); - td.appendChild(font); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest.java deleted file mode 100644 index 125ac1983..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.CharacterData; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class TextTest extends ModelTest { - /** - * Constructor for TextTest. - * - * @param name - */ - public TextTest(String name) { - super(name); - } - - public TextTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new TextTest().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - CharacterData text = document.createTextNode("text"); - a.appendChild(text); - - text.setData("hello <"); - - printSource(model); - printTree(model); - - fOutputWriter.writeln(text.getData()); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest2.java deleted file mode 100644 index 593e61a1d..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest2.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.CharacterData; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class TextTest2 extends ModelTest { - /** - * Constructor for TextTest2. - * - * @param name - */ - public TextTest2(String name) { - super(name); - } - - public TextTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new TextTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - CharacterData text = document.createTextNode("text"); - a.appendChild(text); - - text.setNodeValue("hello <"); - - printSource(model); - printTree(model); - - fOutputWriter.writeln(text.getNodeValue()); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest3.java deleted file mode 100644 index ab5d11a57..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/TextTest3.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.document.InvalidCharacterException; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class TextTest3 extends ModelTest { - /** - * Constructor for TextTest3. - * - * @param name - */ - public TextTest3(String name) { - super(name); - } - - public TextTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new TextTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - IDOMNode text = (IDOMNode) document.createTextNode("text"); - a.appendChild(text); - - try { - text.setSource("hello <"); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - - printSource(model); - printTree(model); - - try { - text.setSource("hello <"); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - - printSource(model); - printTree(model); - - try { - text.setSource("hello &unk;"); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - - printSource(model); - printTree(model); - - try { - text.setSource("hello A"); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - - printSource(model); - printTree(model); - - try { - text.setSource("hello & good-bye"); - } - catch (InvalidCharacterException ex) { - fOutputWriter.writeln(ex.getMessage()); - } - - printSource(model); - printTree(model); - - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest.java deleted file mode 100644 index 805965ef6..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest extends ModelTest { - /** - * Constructor for UpdaterTest. - * - * @param name - */ - public UpdaterTest(String name) { - super(name); - } - - public UpdaterTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element html = document.createElement("HTML"); - document.appendChild(html); - - printSource(model); - printTree(model); - - Element body = document.createElement("BODY"); - html.appendChild(body); - - printSource(model); - printTree(model); - - Element p = document.createElement("P"); - body.appendChild(p); - - printSource(model); - printTree(model); - - Text text = document.createTextNode("text"); - p.appendChild(text); - - printSource(model); - printTree(model); - - Element br = document.createElement("BR"); - p.insertBefore(br, text); - - printSource(model); - printTree(model); - - Element img = document.createElement("IMG"); - p.appendChild(img); - - printSource(model); - printTree(model); - - p.removeChild(text); - - printSource(model); - printTree(model); - - p.insertBefore(text, img); - - printSource(model); - printTree(model); - - body.removeChild(p); - - printSource(model); - printTree(model); - - body.appendChild(p); - - printSource(model); - printTree(model); - - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest10.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest10.java deleted file mode 100644 index d8b6a90f2..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest10.java +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import java.util.Iterator; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class UpdaterTest10 extends ModelTest { - /** - * Constructor for UpdaterTest10. - * - * @param name - */ - public UpdaterTest10(String name) { - super(name); - } - - public UpdaterTest10() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest10().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - a.setAttribute("b", "c"); - Element b = document.createElement("b"); - a.appendChild(b); - - printSource(model); - printTree(model); - - fOutputWriter.writeln("IStructuredDocumentRegion:"); - IDOMNode node = (IDOMNode) b; - IStructuredDocumentRegion flatNode = node.getStartStructuredDocumentRegion(); - fOutputWriter.writeln(flatNode.getText()); - Iterator e = flatNode.getRegions().iterator(); - int i = 0; - while (e.hasNext()) { - ITextRegion region = (ITextRegion) e.next(); - boolean ok = true; // no longer has parent. - // //(region.getParent() == flatNode); - fOutputWriter.writeln(i + "(" + flatNode.getText(region) + ")" + ok); - } - fOutputWriter.writeln(""); - - b.setAttribute("c", "d"); - - printSource(model); - printTree(model); - - fOutputWriter.writeln("IStructuredDocumentRegion:"); - node = (IDOMNode) b; - flatNode = node.getStartStructuredDocumentRegion(); - fOutputWriter.writeln(flatNode.getText()); - e = flatNode.getRegions().iterator(); - i = 0; - while (e.hasNext()) { - ITextRegion region = (ITextRegion) e.next(); - boolean ok = true; // no longer has parent. - // (region.getParent() == flatNode); - fOutputWriter.writeln(i + "(" + flatNode.getText(region) + ")" + ok); - } - fOutputWriter.writeln(""); - - a.setAttribute("b", "cd"); - - printSource(model); - printTree(model); - - fOutputWriter.writeln("IStructuredDocumentRegion:"); - node = (IDOMNode) b; - flatNode = node.getStartStructuredDocumentRegion(); - fOutputWriter.writeln(flatNode.getText()); - e = flatNode.getRegions().iterator(); - i = 0; - while (e.hasNext()) { - ITextRegion region = (ITextRegion) e.next(); - boolean ok = true; // (region.getParent() == flatNode); - fOutputWriter.writeln(i + "(" + flatNode.getText(region) + ")" + ok); - } - fOutputWriter.writeln(""); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest11.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest11.java deleted file mode 100644 index baf6fbbea..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest11.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest11 extends ModelTest { - /** - * Constructor for UpdaterTest11. - * - * @param name - */ - public UpdaterTest11(String name) { - super(name); - } - - public UpdaterTest11() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest11().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - Text text = document.createTextNode("b"); - a.appendChild(text); - - printSource(model); - printTree(model); - - text.setData("b"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest12.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest12.java deleted file mode 100644 index 1d313ac05..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest12.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class UpdaterTest12 extends ModelTest { - /** - * Constructor for UpdaterTest12. - * - * @param name - */ - public UpdaterTest12(String name) { - super(name); - } - - public UpdaterTest12() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest12().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - - printSource(model); - printTree(model); - - Element a2 = document.createElement("a"); - document.insertBefore(a2, a); - - printSource(model); - printTree(model); - - document.removeChild(a2); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest13.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest13.java deleted file mode 100644 index 81341762e..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest13.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest13 extends ModelTest { - /** - * Constructor for UpdaterTest13. - * - * @param name - */ - public UpdaterTest13(String name) { - super(name); - } - - public UpdaterTest13() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest13().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - Document document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<a>\r\n<b>\r\n</a>"); - - Element a = (Element) document.getFirstChild(); - Element b = (Element) a.getLastChild(); - Text text = document.createTextNode(" "); - a.appendChild(text); - - printSource(model); - printTree(model); - - a.removeChild(b); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest14.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest14.java deleted file mode 100644 index a27c9ea17..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest14.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; - -public class UpdaterTest14 extends ModelTest { - /** - * Constructor for UpdaterTest14. - * - * @param name - */ - public UpdaterTest14(String name) { - super(name); - } - - public UpdaterTest14() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest14().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - //Document document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<%= aaaa %>"); - - printSource(model); - printTree(model); - - structuredDocument.replaceText(null, 2, 0, " "); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest15.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest15.java deleted file mode 100644 index 532b11c80..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest15.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; - -public class UpdaterTest15 extends ModelTest { - /** - * Constructor for UpdaterTest15. - * - * @param name - */ - public UpdaterTest15(String name) { - super(name); - } - - public UpdaterTest15() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest15().testModel(); - } - - public void testModel() { - // XML case - IDOMModel model = createXMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - //Document document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<%= aaaa %><P>"); - - printSource(model); - printTree(model); - - // HTML case - model = createHTMLModel(); - structuredDocument = model.getStructuredDocument(); - //document = model.getDocument(); - - structuredDocument.replaceText(null, 0, 0, "<%= aaaa %><P>"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest2.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest2.java deleted file mode 100644 index 4b5da1c28..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest2.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest2 extends ModelTest { - /** - * Constructor for UpdaterTest2. - * - * @param name - */ - public UpdaterTest2(String name) { - super(name); - } - - public UpdaterTest2() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest2().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - IStructuredDocument structuredDocument = model.getStructuredDocument(); - Document document = model.getDocument(); - - structuredDocument.setText(this, "<HTML>\r\n<HEAD></HEAD>\r\n<BODY></BODY>\r\n</HTML>\r\n"); - Element html = (Element) document.getFirstChild(); - Element head = (Element) html.getFirstChild().getNextSibling(); - - printSource(model); - printTree(model); - - Element meta = document.createElement("META"); - meta.setAttribute("name", "GENERATOR"); - meta.setAttribute("content", "Updater Test 2"); - head.appendChild(meta); - Text text4 = document.createTextNode("\r\n"); - head.insertBefore(text4, meta); - Text text5 = document.createTextNode("\r\n"); - head.appendChild(text5); - - printSource(model); - printTree(model); - - Element title = document.createElement("TITLE"); - Text text6 = document.createTextNode(""); - title.appendChild(text6); - head.appendChild(title); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest3.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest3.java deleted file mode 100644 index 7e8fb76ea..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest3.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest3 extends ModelTest { - /** - * Constructor for UpdaterTest3. - * - * @param name - */ - public UpdaterTest3(String name) { - super(name); - } - - public UpdaterTest3() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest3().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - Element b = document.createElement("b"); - a.appendChild(b); - - printSource(model); - printTree(model); - - Text t1 = document.createTextNode("\n"); - a.insertBefore(t1, b); - - printSource(model); - printTree(model); - - Text t2 = document.createTextNode("\n"); - a.appendChild(t2); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest4.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest4.java deleted file mode 100644 index 964e56517..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest4.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest4 extends ModelTest { - /** - * Constructor for UpdaterTest4. - * - * @param name - */ - public UpdaterTest4(String name) { - super(name); - } - - public UpdaterTest4() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest4().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - Text t = document.createTextNode("b"); - a.appendChild(t); - - printSource(model); - printTree(model); - - t.setData("b"); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest5.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest5.java deleted file mode 100644 index c32e9f496..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest5.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -public class UpdaterTest5 extends ModelTest { - /** - * Constructor for UpdaterTest5. - * - * @param name - */ - public UpdaterTest5(String name) { - super(name); - } - - public UpdaterTest5() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest5().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "<a>'</a>"); - - printSource(model); - printTree(model); - - Node a = document.getFirstChild(); - Node t = a.getFirstChild(); - a.removeChild(t); - a.appendChild(t); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest6.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest6.java deleted file mode 100644 index ca2839f68..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest6.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest6 extends ModelTest { - /** - * Constructor for UpdaterTest6. - * - * @param name - */ - public UpdaterTest6(String name) { - super(name); - } - - public UpdaterTest6() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest6().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element a = document.createElement("a"); - document.appendChild(a); - Text t = document.createTextNode("b"); - a.appendChild(t); - - printSource(model); - printTree(model); - - a.removeChild(t); - - printSource(model); - printTree(model); - - a.appendChild(t); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest7.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest7.java deleted file mode 100644 index 2c041889b..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest7.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class UpdaterTest7 extends ModelTest { - /** - * Constructor for UpdaterTest7. - * - * @param name - */ - public UpdaterTest7(String name) { - super(name); - } - - public UpdaterTest7() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest7().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - Element b = document.createElement("B"); - p.appendChild(b); - - printSource(model); - printTree(model); - - Element b2 = document.createElement("B"); - p.insertBefore(b2, b); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest8.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest8.java deleted file mode 100644 index c54f47adb..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest8.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class UpdaterTest8 extends ModelTest { - /** - * Constructor for UpdaterTest8. - * - * @param name - */ - public UpdaterTest8(String name) { - super(name); - } - - public UpdaterTest8() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest8().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - - Element p = document.createElement("P"); - document.appendChild(p); - - printSource(model); - printTree(model); - - Element p2 = document.createElement("P"); - document.appendChild(p2); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - } - finally { - model.releaseFromEdit(); - } - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest9.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest9.java deleted file mode 100644 index 92f9165c0..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTest9.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -public class UpdaterTest9 extends ModelTest { - /** - * Constructor for UpdaterTest9. - * - * @param name - */ - public UpdaterTest9(String name) { - super(name); - } - - public UpdaterTest9() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTest9().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); - try { - Document document = model.getDocument(); - - Element style = document.createElement("STYLE"); - document.appendChild(style); - - printSource(model); - printTree(model); - - Text text2 = document.createTextNode("p"); - style.appendChild(text2); - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTestRegionChanged.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTestRegionChanged.java deleted file mode 100644 index 8ba3c2ec3..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/UpdaterTestRegionChanged.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser; - -import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -public class UpdaterTestRegionChanged extends ModelTest { - /** - * Constructor for UpdaterTestRegionChanged. - * - * @param name - */ - public UpdaterTestRegionChanged(String name) { - super(name); - } - - public UpdaterTestRegionChanged() { - super(); - } - - public static void main(java.lang.String[] args) { - new UpdaterTestRegionChanged().testModel(); - } - - public void testModel() { - IDOMModel model = createXMLModel(); - try { - Document document = model.getDocument(); - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - structuredDocument.setText(this, "<a b= c></a>"); - - Node before = document.getFirstChild(); - - StructuredDocumentEvent fmEvent = structuredDocument.replaceText(null, 5, 1, ""); - if (fmEvent instanceof RegionChangedEvent) { - fOutputWriter.writeln("ok: RegionChangedEvent"); - } - else { - fOutputWriter.writeln("not ok: " + fmEvent.getClass().getName()); - } - - Node after = document.getFirstChild(); - - if (before != after) { - fOutputWriter.writeln("not ok: Node replaced"); - } - else { - fOutputWriter.writeln("ok: Node not replaced"); - } - - saveAndCompareTestResults(); - } - finally { - model.releaseFromEdit(); - } - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/css/StyleTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/css/StyleTest.java deleted file mode 100644 index 29a582e0e..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/parser/css/StyleTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.parser.css; - -import org.eclipse.wst.html.core.tests.parser.ModelTest; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; -import org.w3c.dom.css.CSSStyleSheet; -import org.w3c.dom.stylesheets.DocumentStyle; -import org.w3c.dom.stylesheets.LinkStyle; -import org.w3c.dom.stylesheets.StyleSheetList; - -public class StyleTest extends ModelTest { - /** - * Constructor for StyleTest. - * @param name - */ - public StyleTest(String name) { - super(name); - } - - public StyleTest() { - super(); - } - - public static void main(java.lang.String[] args) { - new StyleTest().testModel(); - } - - public void testModel() { - IDOMModel model = createHTMLModel(); //new HTMLModelImpl(); - Document document = model.getDocument(); - - Element style = document.createElement("STYLE"); - Text text = document.createTextNode("BODY { color : red; } P { color : green; } B { color : blue; }"); - style.appendChild(text); - document.appendChild(style); - - printSource(model); - printTree(model); - - DocumentStyle ds = (DocumentStyle) document; - StyleSheetList ssl = ds.getStyleSheets(); - if (ssl.getLength() > 0) { - CSSStyleSheet ss = (CSSStyleSheet) ssl.item(0); - ss.deleteRule(1); - } - - printSource(model); - printTree(model); - - LinkStyle ls = (LinkStyle) style; - CSSStyleSheet ss2 = (CSSStyleSheet) ls.getSheet(); - if (ss2 != null) { - ss2.deleteRule(0); - } - - printSource(model); - printTree(model); - - saveAndCompareTestResults(); - - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/TestStructuredPartitionerHTML.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/TestStructuredPartitionerHTML.java deleted file mode 100644 index fcde0d514..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/TestStructuredPartitionerHTML.java +++ /dev/null @@ -1,319 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.text; - -import java.io.IOException; -import java.io.InputStream; -import java.io.StringBufferInputStream; - -import junit.framework.TestCase; - -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.IDocumentExtension3; -import org.eclipse.jface.text.IDocumentPartitioner; -import org.eclipse.jface.text.ITypedRegion; -import org.eclipse.wst.html.core.text.IHTMLPartitions; -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextPartitioner; -import org.eclipse.wst.sse.core.utils.StringUtils; -import org.eclipse.wst.xml.core.text.IXMLPartitions; - -import com.ibm.icu.text.DecimalFormat; - -public class TestStructuredPartitionerHTML extends TestCase { - - private boolean DEBUG_PRINT_RESULT = false; - protected ITypedRegion[] partitions = null; - - private boolean useFormatter = true; - protected DecimalFormat formatter; - - public TestStructuredPartitionerHTML(String name) { - super(name); - if (DEBUG_PRINT_RESULT && useFormatter) - formatter = new DecimalFormat(); - } - - /** - * must release model (from edit) after - * @param filename relative to this class (TestStructuredPartitioner) - */ - private IStructuredModel getModelForEdit(String filename) { - - IStructuredModel model = null; - try { - IModelManager modelManager = StructuredModelManager.getModelManager(); - InputStream inStream = getClass().getResourceAsStream(filename); - if (inStream == null) - inStream = new StringBufferInputStream(""); - model = modelManager.getModelForEdit(filename, inStream, null); - } - catch (IOException ex) { - ex.printStackTrace(); - } - return model; - } - - public void testDisconnectConnect() { - IStructuredModel model = null; - try { - model =getModelForEdit("testfiles/html/example01.xml"); - if(model != null) { - IStructuredDocument sDoc = model.getStructuredDocument(); - assertTrue("sDoc implementation not instance of IDocumentExtension3", sDoc instanceof IDocumentExtension3); - - IDocumentPartitioner partitioner = ((IDocumentExtension3)sDoc).getDocumentPartitioner(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING); - assertTrue("partitioner doesn't implement IStructuredTextPartitioner", partitioner instanceof IStructuredTextPartitioner); - - IStructuredTextPartitioner stp = (IStructuredTextPartitioner)partitioner; - assertNotNull("partitioner was null for sDoc:" + sDoc, partitioner); - try { - stp.disconnect(); - } - catch(Exception e) { - assertTrue("problem disconnecting w/:" +sDoc + "/n" + e, false); - } - try { - stp.connect(sDoc); - } - catch(Exception e) { - assertTrue("problem connecting w/:" + sDoc + "/n" + e, false); - } - } - else { - assertTrue("could not retrieve structured model", false); - } - } - finally { - if(model != null) - model.releaseFromEdit(); - } - } - - public void testGetDefaultPartitionType() { - IStructuredModel model = null; - try { - model =getModelForEdit("testfiles/html/example01.xml"); - if(model != null) { - IStructuredDocument sDoc = model.getStructuredDocument(); - assertTrue("sDoc implementation not instance of IDocumentExtension3", sDoc instanceof IDocumentExtension3); - - IDocumentPartitioner partitioner = ((IDocumentExtension3)sDoc).getDocumentPartitioner(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING); - assertTrue("partitioner doesn't implement IStructuredTextPartitioner", partitioner instanceof IStructuredTextPartitioner); - - IStructuredTextPartitioner stp = (IStructuredTextPartitioner)partitioner; - String defaultPartitionType = stp.getDefaultPartitionType(); - assertTrue("wrong default partition type was: [" + defaultPartitionType + "] should be: [" + IXMLPartitions.XML_DEFAULT + "]", defaultPartitionType.equals(IXMLPartitions.XML_DEFAULT)); - } - else { - assertTrue("could not retrieve structured model", false); - } - } - finally { - if(model != null) - model.releaseFromEdit(); - } - } - - public void testGetPartitionType() { - IStructuredModel model = null; - try { - model =getModelForEdit("testfiles/html/example01.xml"); - if(model != null) { - IStructuredDocument sDoc = model.getStructuredDocument(); - assertTrue("sDoc implementation not instance of IDocumentExtension3", sDoc instanceof IDocumentExtension3); - - IDocumentPartitioner partitioner = ((IDocumentExtension3)sDoc).getDocumentPartitioner(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING); - assertTrue("paritioner doesn't implement IStructuredTextPartitioner", partitioner instanceof IStructuredTextPartitioner); - - IStructuredTextPartitioner stp = (IStructuredTextPartitioner)partitioner; - String defaultPartitionType = stp.getDefaultPartitionType(); - assertTrue("wrong default partition type was: [" + defaultPartitionType + "] should be: [" + IXMLPartitions.XML_DEFAULT + "]", defaultPartitionType.equals(IXMLPartitions.XML_DEFAULT)); - } - else { - assertTrue("could not retrieve structured model", false); - } - } - finally { - if(model != null) - model.releaseFromEdit(); - } - } - - public void testHTML1() throws IOException, BadLocationException { - int expectedPartitions = 4; - int nPartitions = doComputePartitioningTest("testfiles/html/example01.html"); - assertTrue("wrong number of partitions", nPartitions == expectedPartitions); - checkSeams(); - verifyPartitionTypes(partitions, new String[]{IHTMLPartitions.HTML_DECLARATION, IHTMLPartitions.HTML_DEFAULT, IHTMLPartitions.HTML_COMMENT, IHTMLPartitions.HTML_DEFAULT}); - } - - public void testHTML2() throws IOException, BadLocationException { - int expectedPartitions = 7; - //TODO Nitin, we need to review the Unknown to Script change (8/1/03, 9:00PM) - int nPartitions = doComputePartitioningTest("testfiles/html/example02.html"); - assertTrue("wrong number of partitions", nPartitions == expectedPartitions); - checkSeams(); - verifyPartitionTypes(partitions, new String[]{IHTMLPartitions.HTML_DEFAULT, IHTMLPartitions.SCRIPT, IHTMLPartitions.HTML_DEFAULT, IHTMLPartitions.SCRIPT, IHTMLPartitions.HTML_DEFAULT, IHTMLPartitions.SCRIPT, IHTMLPartitions.HTML_DEFAULT}); - } - - public void testHTML3() throws IOException, BadLocationException { - int expectedPartitions = 1; - String file = "testfiles/html/example03.html"; - int nPartitions = doComputePartitioningTest(file); - assertTrue("wrong number of partitions", nPartitions == expectedPartitions); - checkSeams(); - verifyPartitionTypes(partitions, new String[]{IHTMLPartitions.HTML_DEFAULT}); - - // 121 if CRLF - // ITypedRegion scriptPartition = getPartitionTest(file, 121); - // 116 if LF or CR only - // ITypedRegion scriptPartition = getPartitionTest(file, 121); - - ITypedRegion part1 = getPartitionTest(file, 121); - ITypedRegion part2 = getPartitionTest(file, 116); - -// assertEquals("partition is wrong type!", scriptPartition.getType(), IHTMLPartitions.ST_SCRIPT); - // the critical position is surrounded with HTML > 5 characters in either direction; this should be good enough - assertTrue("partition is wrong type! :(" + part1.getType() + "|" + part2.getType() + ")", part1.getType().equals(IHTMLPartitions.SCRIPT) || part2.getType().equals(IHTMLPartitions.SCRIPT)); - assertTrue("partition is not zero length!", (part1.getLength() == 0 || part2.getLength() == 0)); - } - - /** - * Ensure that the current list of partitions are all adjacent to one another - */ - protected void checkSeams() { - if (partitions == null) - return; - int offset = 0; - for (int i = 0; i < partitions.length; i++) { - assertEquals("partitions are not contiguous!", partitions[i].getOffset(), offset); - offset = partitions[i].getOffset() + partitions[i].getLength(); - } - } - - /** - * Compute the partitions for the given filename using the default partitioner - * for that file type. - * - * @param filename - * @return int - * @throws IOException - * @throws BadLocationException - */ - protected int doComputePartitioningTest(String filename) throws IOException, BadLocationException { - - IModelManager modelManager = StructuredModelManager.getModelManager(); - InputStream inStream = getClass().getResourceAsStream(filename); - if (inStream == null) - inStream = new StringBufferInputStream(""); - IStructuredModel model = modelManager.getModelForEdit(filename, inStream, null); - - IStructuredDocument structuredDocument = model.getStructuredDocument(); - if (DEBUG_PRINT_RESULT && useFormatter) { - double baseTen = Math.log(10); - formatter.setMinimumIntegerDigits((int) (Math.log(structuredDocument.getLength()) / baseTen) + 1); - formatter.setGroupingUsed(false); - } - - partitions = structuredDocument.computePartitioning(0, structuredDocument.getLength()); - if (DEBUG_PRINT_RESULT) { - String contents = null; - - System.out.println("\nfilename: " + filename); - for (int i = 0; i < partitions.length; i++) { - try { - contents = structuredDocument.get(partitions[i].getOffset(), partitions[i].getLength()); - } - catch (BadLocationException e) { - contents = "*error*"; - } - if (useFormatter) - System.out.println(formatter.format(partitions[i].getOffset()) + ":" + formatter.format(partitions[i].getLength()) + " - " + partitions[i].getType() + " [" + StringUtils.escape(contents) + "]"); - else - System.out.println(partitions[i] + " [" + StringUtils.escape(contents) + "]"); - } - } - checkSeams(); - model.releaseFromEdit(); - inStream.close(); - - if (partitions == null) - return -1; - return partitions.length; - } - - /** - * Retrieves the single partition at the given offset for the given file, using the - * default partitioner for that file type. This test allows for verifying the zero-length - * partitioning behavior. - * - * @param filename - * @param offset - * @return ITypedRegion - * @throws IOException - * @throws BadLocationException - */ - protected ITypedRegion getPartitionTest(String filename, int offset) throws IOException, BadLocationException { - IModelManager modelManager = StructuredModelManager.getModelManager(); - InputStream inStream = getClass().getResourceAsStream(filename); - IStructuredModel model = modelManager.getModelForEdit(filename, inStream, null); - - IStructuredDocument structuredDocument = model.getStructuredDocument(); - - partitions = null; - ITypedRegion partition = structuredDocument.getPartition(offset); - if (DEBUG_PRINT_RESULT) { - String contents = null; - - System.out.println("\nfilename: " + filename); - try { - contents = structuredDocument.get(partition.getOffset(), partition.getLength()); - } - catch (BadLocationException e) { - contents = "*error*"; - } - System.out.println(partition + " [" + StringUtils.escape(contents) + "]"); - } - model.releaseFromEdit(); - inStream.close(); - - return partition; - } - - /** - * Verifies that the given partitions are of the given partition types - * @param typedRegions - * @param types - */ - protected void verifyPartitionTypes(ITypedRegion actualTypedRegions[], String expectedTypes[]) { - for (int i = 0; i < expectedTypes.length; i++) - assertEquals("partition type mismatched", expectedTypes[i], actualTypedRegions[i].getType()); - } - - /** - * Verifies that the given partitions begin at the given offsets - * @param typedRegions - * @param types - */ - protected void verifyPartitionRegions(ITypedRegion typedRegions[], int offsets[]) { - for (int i = 0; i < offsets.length; i++) { - assertEquals("offset mismatched", typedRegions[i].getOffset(), offsets[i]); - if (i > 0) { - assertEquals("lengths misaligned", typedRegions[i].getOffset(), typedRegions[i - 1].getOffset() + typedRegions[i - 1].getLength()); - } - } - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example01.html b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example01.html deleted file mode 100644 index 4a0ffe208..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example01.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html SYSTEM nonsense> -<html> -<bo<!--comments-->dy> -abcdefghijklmnopqrstuvwxyz -</body></html> diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example02.html b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example02.html deleted file mode 100644 index a0286c4e6..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example02.html +++ /dev/null @@ -1,14 +0,0 @@ -<html><head> -<META creator=wssa/4.0pre119> -<title>Script Tests</title> -</head> -<body> -<Script language="javascript"> - protected void foo() {
String value = "true";
return value;
}
</script> -<Script type="text/jscript"> - protected void foo() {
String value = "true";
return value;
}
</script> - -<SCRIPT> "foo" </SCRIPT> -<a href="http://example.com/" name="ref" >Example</a> -</body> -</html> diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example03.html b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example03.html deleted file mode 100644 index dc8daf360..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/text/testfiles/html/example03.html +++ /dev/null @@ -1,8 +0,0 @@ -<html><head> -<META creator=wssa/4.0pre119> -<title>Script Tests</title> -</head> -<body> -<Script language="javascript"></SCRIPT> -</body> -</html> diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/CommonXML.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/CommonXML.java deleted file mode 100644 index 94e16a24e..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/CommonXML.java +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - - - -import java.io.IOException; -import java.io.OutputStream; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.TransformerFactoryConfigurationError; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.eclipse.wst.html.core.tests.Logger; -import org.w3c.dom.Document; - -/** - */ -public class CommonXML { - - public synchronized static DocumentBuilder getDocumentBuilder() { - DocumentBuilder result = null; - try { - result = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - } - catch (ParserConfigurationException e) { - Logger.logException(e); - } - return result; - } - - public synchronized static DocumentBuilder getDocumentBuilder(boolean validating) { - DocumentBuilder result = null; - try { - DocumentBuilderFactory instance = DocumentBuilderFactory.newInstance(); - instance.setValidating(validating); - result = instance.newDocumentBuilder(); - } - catch (ParserConfigurationException e) { - Logger.logException(e); - } - return result; - } - - public static void serialize(Document document, OutputStream ostream) throws IOException { - Source domSource = new DOMSource(document); - try { - Transformer serializer = TransformerFactory.newInstance().newTransformer(); - try { - serializer.setOutputProperty(OutputKeys.INDENT, "yes"); - serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); - serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-16"); - } - catch (IllegalArgumentException e) { - // unsupported properties - } - serializer.transform(domSource, new StreamResult(ostream)); - } - catch (TransformerConfigurationException e) { - throw new IOException(e.getMessage()); - } - catch (TransformerFactoryConfigurationError e) { - throw new IOException(e.getMessage()); - } - catch (TransformerException e) { - throw new IOException(e.getMessage()); - } - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/DateUtil.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/DateUtil.java deleted file mode 100644 index e4d1834fd..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/DateUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - -import com.ibm.icu.text.DateFormat; -import com.ibm.icu.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; - -/** - * @author davidw - * - * To change this generated comment edit the template variable "typecomment": - * Window>Preferences>Java>Templates. - * To enable and disable the creation of type comments go to - * Window>Preferences>Java>Code Generation. - */ -public class DateUtil { - - /** - * Constructor for AllTests. - * @param name - */ - private static String now = null; - - - public static String now() { - // just calculate once, so whole run as same timestamp - if (DateUtil.now == null) { - DateFormat format = new SimpleDateFormat("yyyy'-'MM'-'dd'-'kk'-'mm'-'ss"); - Calendar calendar = Calendar.getInstance(); - Date today = calendar.getTime(); - DateUtil.now = format.format(today); - } - return DateUtil.now; - } - -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/FileUtil.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/FileUtil.java deleted file mode 100644 index 587143875..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/FileUtil.java +++ /dev/null @@ -1,193 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - -import java.io.File; -import java.io.FilenameFilter; -import java.io.IOException; -import java.net.URL; - -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.Platform; -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.encoding.util.NullInputStream; -import org.eclipse.wst.sse.core.internal.provisional.IModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.osgi.framework.Bundle; - -/** - * @author davidw - * - */ -public class FileUtil { - private static final String PLUGIN_ID = "org.eclipse.wst.html.core.tests"; - public static final String commonEOL = "\r\n"; - public static String fLineSeparator = System.getProperty("line.separator"); - public static String fPathSeparator = System.getProperty("path.separator"); - public static String fFileSeparator = System.getProperty("file.separator"); - - static File previousResultsDirectory = null; - static private String logSubDirectoryPath; - - private static boolean notTriedYet = true; - static int uniqueNum = 0; - - public static class DirFilenameFilter implements FilenameFilter { - String startOfAcceptableNames; - - public DirFilenameFilter(String startOfDirName) { - startOfAcceptableNames = startOfDirName; - } - - /** - * @see java.io.FileFilter#accept(File) - */ - public boolean accept(File pathname, String filename) { - // we'll just assume if it starts with right key, it is a directory ... for now - return filename.startsWith(startOfAcceptableNames); - } - - } - - public static File getPreviousResultsDirectory(String directoryRootName) throws IOException { - if (previousResultsDirectory == null && notTriedYet) { - Bundle bundle = Platform.getBundle(PLUGIN_ID); - URL url = bundle.getEntry("/"); //$NON-NLS-1$ - //String installPath = url.getPath(); - // add known file so URL method below can be used - // (doesn't seem to work for directory?) - URL totalURL = new URL(url, "plugin.xml"); - URL finalurl = FileLocator.toFileURL(totalURL); - String finalFile = finalurl.getFile(); - File file = new File(finalFile); - String finalPath = file.getParent(); - File pluginHomeDir = new File(finalPath); - FilenameFilter dirFilter = new DirFilenameFilter(directoryRootName); - File[] allDirs = pluginHomeDir.listFiles(dirFilter); - - // assume first in list is newest, then start looking with the - // second item ... just to avoid "null" case checking - if (allDirs.length > 0) { - File currentNewest = allDirs[0]; - for (int i = 1; i < allDirs.length; i++) { - File current = allDirs[i]; - // NOTE: we go by modified date, not by the actual time stamp in name. - // This should work for all normal cases, but may not if someone does some - // "funny" copying, or updating from repository. - if (current.lastModified() > currentNewest.lastModified()) { - currentNewest = current; - } - } - previousResultsDirectory = currentNewest; - } - notTriedYet = false; - } - return previousResultsDirectory; - } - - public static File makeFileFor(String directory, String filename, String testResultsDirectoryPrefix) throws IOException { - Bundle bundle = Platform.getBundle(PLUGIN_ID); - URL url = bundle.getEntry("/"); //$NON-NLS-1$ - URL localURL = FileLocator.toFileURL(url); - String installPath = localURL.getPath(); - String totalDirectory = installPath + directory; - String totalPath = totalDirectory + "/" + filename; - URL totalURL = new URL(url, totalPath); - //URL finalurl = Platform.asLocalURL(totalURL); - String finalFile = totalURL.getFile(); - File file = new File(finalFile); - String finalPath = file.getParent(); - File dir = new File(finalPath); - if (!dir.exists()) { - // a little safety net, be sure the previous newest directory - // is initialized, just in case no one else has done so - if (testResultsDirectoryPrefix != null && testResultsDirectoryPrefix.length() > 0) { - FileUtil.getPreviousResultsDirectory(testResultsDirectoryPrefix); - } - // now its "safe" to make the new one - dir.mkdirs(); - } - return file; - } - - /** - * Just a general utility method - * @param filename - * @return String - */ - public static String getExtension(String filename) { - String extension = null; - int dotPostion = filename.lastIndexOf('.'); - if (dotPostion > -1) { - extension = filename.substring(dotPostion + 1); - } - else { - extension = new String(); - } - return extension; - } - - /** - * General purpose utility method to ensure the log - * directory exists, and returns the name. - */ - public static String getLogDirectory() { - if (logSubDirectoryPath == null) { - String mainDirectory = "/logs"; - File dir = new File(mainDirectory); - ensureExists(dir); - String subDirectory = TimestampUtil.timestamp(); - logSubDirectoryPath = mainDirectory + "/" + subDirectory; - File subdir = new File(logSubDirectoryPath); - ensureExists(subdir); - } - return logSubDirectoryPath; - } - - public static void ensureExists(File dir) { - if (!dir.exists()) { - dir.mkdirs(); - } - } - - public static String getPerformanceOutputLogName() { - String result = null; - String directoryName = FileUtil.getLogDirectory(); - String extension = ".out"; - String baseName = "sedTests"; - long now = System.currentTimeMillis(); - String nowStr = String.valueOf(now); - result = directoryName + FileUtil.fFileSeparator + baseName + nowStr + extension; - return result; - } - public static IDOMModel createHTMLModel() { - IStructuredModel model = null; - try { - - IModelManager modelManager = StructuredModelManager.getModelManager(); - - model = modelManager.getModelForEdit("test" + uniqueNum++ + ".html", new NullInputStream(), null); //$NON-NLS-1$ - - // always use the same line delimiter for these tests, regardless - // of plaform or preference settings - model.getStructuredDocument().setLineDelimiter(commonEOL); - - - } - catch (Exception e) { - e.printStackTrace(); - } - return (IDOMModel) model; - - } - -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/StringCompareUtil.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/StringCompareUtil.java deleted file mode 100644 index a33ba6a6c..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/StringCompareUtil.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - -import java.io.IOException; -import java.io.StringReader; - -public class StringCompareUtil { - - public boolean equalsIgnoreLineSeperator(String string1, String string2) { - - if (string1 == null) - return false; - if (string2 == null) - return false; - - StringReader s1Reader = new StringReader(string1); - StringReader s2Reader = new StringReader(string2); - - // assume true unless find evidence to the contrary - boolean result = true; - int s1Char = -1; - int s2Char = -1; - do { - - s1Char = getNextChar(s1Reader); - - s2Char = getNextChar(s2Reader); - - if (s1Char != s2Char) { - result = false; - break; - } - } - while (s1Char != -1 && s2Char != -1); - - return result; - } - - /** - * Method getNextChar. - * @param s1Reader - * @return char - */ - private int getNextChar(StringReader reader) { - int nextChar = -1; - try { - nextChar = reader.read(); - while (isEOL(nextChar)) { - nextChar = reader.read(); - } - } - catch (IOException e) { - e.printStackTrace(); - } - return nextChar; - } - - private boolean isEOL(int aChar) { - return (aChar == '\n' || aChar == '\r'); - } - -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TestRuntimeException.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TestRuntimeException.java deleted file mode 100644 index ad7d6cee7..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TestRuntimeException.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - - - -/** - * The SourceEditingRuntimeException is often thrown by Source Editor methods when - * a service we use throws a checked exception, but we want to convert and treat - * as a runtime exception. (Such as BadLocationException is a common example). - */ -public class TestRuntimeException extends RuntimeException { - /** - * Default <code>serialVersionUID</code> - */ - private static final long serialVersionUID = 1L; - private Throwable originalException; - - public TestRuntimeException() { - super(); - } - - public TestRuntimeException(String s) { - super(s); - } - - /** - * This form of the constructor is used to wrapper another exception. - */ - public TestRuntimeException(Throwable t) { - super(); - originalException = t; - } - - /** - * This form of the constructor is used to wrapper another exception, but still - * provide a new descriptive message. - */ - public TestRuntimeException(Throwable t, String s) { - super(s); - originalException = t; - } - - public String getMessage() { - String result = super.getMessage(); - if ((result != null) && (!result.endsWith("."))) //$NON-NLS-1$ - result = result + "."; //$NON-NLS-1$ - if (originalException != null) { - String embeddedMessage = originalException.getMessage(); - // not all exceptions (e.g. many NullPointer exception) have messages - String originalError = "Original error:"; //$NON-NLS-1$ - if (embeddedMessage != null) - result = result + " " + originalError + " " + embeddedMessage;//$NON-NLS-2$//$NON-NLS-1$ - else - result = result + " " + originalError + " " + originalException.toString();//$NON-NLS-2$//$NON-NLS-1$ - } - return result; - } - - public Throwable getOriginalException() { - return originalException; - } - - public String toString() { - // we don't put super.toString or getClass to "hide" that it was a - // SourceEditing exception (otherwise, focus goes on that, - // instead of original exception. - String message = getMessage(); - // message should never be null ... but just in case - return (message != null) ? message : super.toString(); - - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TestWriter.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TestWriter.java deleted file mode 100644 index 593f562ca..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TestWriter.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - -import java.io.StringWriter; - -public class TestWriter extends StringWriter { - // we don't really want to use the system EOL, since - // we want a common once across platforms, CVS, etc. - public final static String commonEOL = "\r\n"; - - //System.getProperty("line.separator"); - - public void writeln(String line) { - write(line); - write(commonEOL); - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TimestampUtil.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TimestampUtil.java deleted file mode 100644 index e398bb0e7..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/TimestampUtil.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - -import com.ibm.icu.text.DateFormat; -import com.ibm.icu.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; - -/** - * @author davidw - * - * This class provides one timestamp per VM run. - * (Technically, per class loading.) - */ -public class TimestampUtil { - - private static Date timestamp = null; - private static DateFormat shortFormat = new SimpleDateFormat("yyyy'-'MM'-'dd"); - // private static DateFormat longFormat = new SimpleDateFormat("yyyy'-'MM'-'dd'-'kk'-'mm'-'ss"); - - private static String nowShort = null; - - public static String timestamp() { - - if (TimestampUtil.nowShort == null) { - TimestampUtil.nowShort = shortFormat.format(ensureTimestamp()); - } - return TimestampUtil.nowShort; - } - - protected static Date ensureTimestamp() { - // just calculate 'timestamp' once per class loading, - // so this 'timestamp' remains the same during - // entire run. - if (TimestampUtil.timestamp == null) { - Calendar calendar = Calendar.getInstance(); - TimestampUtil.timestamp = calendar.getTime(); - } - return TimestampUtil.timestamp; - } - -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/WorkspaceProgressMonitor.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/WorkspaceProgressMonitor.java deleted file mode 100644 index 9370ace02..000000000 --- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/utils/WorkspaceProgressMonitor.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.html.core.tests.utils; - -import org.eclipse.core.runtime.IProgressMonitor; - -class WorkspaceProgressMonitor implements IProgressMonitor { - private boolean finished = false; - - public void beginTask(String name, int totalWork) { - // we dont' care - } - - public void done() { - finished = true; - } - - public boolean isFinished() { - return finished; - } - - public void internalWorked(double work) { - // we dont' care - } - - public boolean isCanceled() { - return finished; - } - - public void setCanceled(boolean value) { - if (value == true) - finished = true; - } - - public void setTaskName(String name) { - // we don't care - } - - public void subTask(String name) { - // we don't care - } - - public void worked(int work) { - // we don't care - } -}
\ No newline at end of file diff --git a/tests/org.eclipse.wst.html.core.tests/test.xml b/tests/org.eclipse.wst.html.core.tests/test.xml deleted file mode 100644 index 9a0a196ed..000000000 --- a/tests/org.eclipse.wst.html.core.tests/test.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> - -<project - name="testsuite" - default="run" - basedir="."> - <!-- The property ${eclipse-home} should be passed into this script --> - <!-- Set a meaningful default value for when it is not. --> - <!-- <property name="eclipse-home" value="${basedir}\..\.." /> --> - - <echo message="basedir ${basedir}" /> - <echo message="eclipse place ${eclipse-home}" /> - - <!-- sets the properties plugin-name, and library-file --> - <property - name="plugin-name" - value="org.eclipse.wst.html.core.tests" /> - <property - name="library-file" - value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" /> - - <!-- This target holds all initialization code that needs to be done for --> - <!-- all tests that are to be run. Initialization for individual tests --> - <!-- should be done within the body of the suite target. --> - <target name="init"> - <tstamp /> - <delete> - <fileset - dir="${eclipse-home}" - includes="org.eclipse.wst.html.core.tests.*xml" /> - </delete> - </target> - - <!-- This target defines the tests that need to be run. --> - <target name="suite"> - <property - name="wst-folder" - value="${eclipse-home}/wst_folder" /> - <delete - dir="${wst-folder}" - quiet="true" /> - <ant - target="core-test" - antfile="${library-file}" - dir="${eclipse-home}"> - <property - name="data-dir" - value="${wst-folder}" /> - <property - name="plugin-name" - value="${plugin-name}" /> - <property - name="classname" - value="org.eclipse.wst.html.core.tests.HTMLCoreTestSuite" /> - <property - name="plugin-path" - value="${eclipse-home}/plugins/${plugin-name}" /> - </ant> - </target> - - <!-- This target holds code to cleanup the testing environment after --> - <!-- after all of the tests have been run. You can use this target to --> - <!-- delete temporary files that have been created. --> - <target name="cleanup"> - <!--<delete dir="${workspace}" quiet="true" />--> - </target> - - <!-- This target runs the test suite. Any actions that need to happen --> - <!-- after all the tests have been run should go here. --> - <target - name="run" - depends="init,suite,cleanup"> - <ant - target="collect" - antfile="${library-file}" - dir="${eclipse-home}"> - <property - name="includes" - value="org.eclipse.wst.html.core.tests.*xml" /> - <property - name="output-file" - value="${plugin-name}.xml" /> - </ant> - <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> --> - </target> - -</project>
\ No newline at end of file |