diff options
author | Curtis D'Entremont | 2006-03-28 00:04:08 +0000 |
---|---|---|
committer | Curtis D'Entremont | 2006-03-28 00:04:08 +0000 |
commit | 00f34df469506f27923247657278c2d14f4e83cf (patch) | |
tree | ea63653bd38a724a8cbefdc9a75dc574c457cb34 /org.eclipse.ua.tests | |
parent | 2d87dded5e13b9da3bbadcac10ecefa02ee59a94 (diff) | |
download | eclipse.platform.ua-00f34df469506f27923247657278c2d14f4e83cf.tar.gz eclipse.platform.ua-00f34df469506f27923247657278c2d14f4e83cf.tar.xz eclipse.platform.ua-00f34df469506f27923247657278c2d14f4e83cf.zip |
132251 New: NOT function on filters
Diffstat (limited to 'org.eclipse.ua.tests')
81 files changed, 213 insertions, 2987 deletions
diff --git a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/FileUtil.java b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/FileUtil.java index a00f0336c..0d44496e5 100644 --- a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/FileUtil.java +++ b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/FileUtil.java @@ -16,7 +16,6 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; -import org.eclipse.core.runtime.Platform; import org.osgi.framework.Bundle; /* @@ -49,91 +48,10 @@ public class FileUtil { * for the intro xml referred to by the string. */ public static String getResultFile(String in) { - return getResultFile(in, false); + return in.substring(0, in.lastIndexOf('.')) + "_expected.txt"; } /** - * Same as above, but gives the option of appending os, ws, and arch. For example, - * myfile_serialized_macosx_carbon_ppc.txt. - */ - public static String getResultFile(String in, boolean env) { - StringBuffer buf = new StringBuffer(); - buf.append(in.substring(0, in.lastIndexOf('.')) + "_serialized"); - if (env) { - buf.append('_'); - buf.append(Platform.getOS()); - buf.append('_'); - buf.append(Platform.getWS()); - buf.append('_'); - buf.append(Platform.getOSArch()); - } - buf.append(".txt"); - return buf.toString(); - } - - /** - * Gets the contents of the result file with the given original relative path in - * the given bundle, as a String (file must be encoded as UTF-8). - */ - public static String getResultFileContents(Bundle bundle, String relative) throws IOException { - /* - * Try [filename]_serialized_os_ws_arch.txt. If it's not there, try - * [filename]_serialized.txt. - * - * We use different files for os/ws/arch combinations in order to test dynamic content, - * specifically filtering. Some of the files have filters by os, ws, and arch so the - * result is different on each combination. - */ - String contents = null; - try { - contents = getContents(bundle, getResultFile(relative, true)); - } - catch(Exception e) { - // didn't find the _serialized_os_ws_arch.txt file, try just _serialized.txt - } - if (contents == null) { - try { - contents = getContents(bundle, getResultFile(relative, false)); - } - catch(IOException e) { - throw e; - } - } - return contents; - } - - /** - * Gets the contents of the result file with the given original absolute path as - * a String (file must be encoded as UTF-8). - */ - public static String getResultFileContents(String absolutePath) throws IOException { - /* - * Try [filename]_serialized_os_ws_arch.txt. If it's not there, try - * [filename]_serialized.txt. - * - * We use different files for os/ws/arch combinations in order to test dynamic content, - * specifically filtering. Some of the files have filters by os, ws, and arch so the - * result is different on each combination. - */ - String contents = null; - try { - contents = getContents(getResultFile(absolutePath, true)); - } - catch(Exception e) { - // didn't find the _serialized_os_ws_arch.txt file, try just _serialized.txt - } - if (contents == null) { - try { - contents = getContents(getResultFile(absolutePath, false)); - } - catch(IOException e) { - throw e; - } - } - return contents; - } - - /** * Reads the contents of the input stream as UTF-8 and constructs and returns * as a String. */ @@ -146,8 +64,10 @@ public class FileUtil { } String result = new String(out.toByteArray(), "UTF-8"); if (result != null) { + // filter windows-specific newline result = result.replaceAll("\r", ""); } - return result; + // ignore whitespace at start or end + return result.trim(); } } diff --git a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XHTMLUtil.java b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XHTMLUtil.java new file mode 100644 index 000000000..b4dda1b26 --- /dev/null +++ b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XHTMLUtil.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2006 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.ua.tests.util; + +/** + * A utility class for working with XHTML. + */ +public class XHTMLUtil { + + /* + * Some of the XHTML content is environment-specific. This means it changes + * depending on the test machine, location on filesystem, etc. This content + * is not important for this test so just strip it out before comparing the + * serializations. + */ + public static String removeEnvironmentSpecificContent(String xhtml) { + /* + * The base tag is added before showing in browser. It contains an + * absolute path in filesystem. + */ + xhtml = xhtml.replaceAll("<base href=\".*\" />", ""); + + /* + * The order of the params for the meta tag comes out differently on + * different platforms. I'm not sure why, and why just this tag. We + * don't care about this one for our tests anyway, so just strip it. + */ + xhtml = xhtml.replaceAll("<meta .*/>", ""); + return xhtml; + } +} diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ValidTest.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ValidTest.java index 7ec173107..2979e5cb7 100644 --- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ValidTest.java +++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ValidTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2005, 2006 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 @@ -10,8 +10,8 @@ *******************************************************************************/ package org.eclipse.ua.tests.cheatsheet.parser; +import java.io.IOException; import java.net.URL; -import java.util.StringTokenizer; import junit.framework.Assert; import junit.framework.Test; @@ -19,7 +19,6 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.ua.tests.cheatsheet.util.CheatSheetModelSerializer; -import org.eclipse.ua.tests.intro.util.IntroModelSerializerTest; import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; import org.eclipse.ua.tests.util.FileUtil; import org.eclipse.ua.tests.util.ResourceFinder; @@ -41,7 +40,7 @@ public class ValidTest extends TestCase { /* * Test valid cheat sheets. */ - public void testParserValid() { + public void testParserValid() throws IOException { URL[] urls = ResourceFinder.findFiles(UserAssistanceTestPlugin.getDefault(), "data/cheatsheet/valid", ".xml", false); Assert.assertTrue("Unable to find sample cheat sheets to test parser", urls.length > 0); for (int i=0;i<urls.length;++i) { @@ -49,30 +48,10 @@ public class ValidTest extends TestCase { CheatSheet sheet = (CheatSheet)parser.parse(urls[i], CheatSheetParser.ANY); Assert.assertNotNull("Tried parsing a valid cheat sheet but parser returned null: " + urls[i], sheet); - String resultFile = IntroModelSerializerTest.getResultFile(urls[i].toString().substring("file:".length())); - - try { - String expected = FileUtil.getContents(resultFile); - String actual = CheatSheetModelSerializer.serialize(sheet); - - StringTokenizer tok1 = new StringTokenizer(expected, "\n"); - StringTokenizer tok2 = new StringTokenizer(actual, "\n"); - - /* - * Report the line number and line text where it didn't match, - * as well as the extension id and expected results file. - */ - int lineNumber = 0; - while (tok1.hasMoreTokens() && tok2.hasMoreTokens()) { - String a = tok1.nextToken(); - String b = tok2.nextToken(); - Assert.assertEquals("Serialized cheat sheet model text for \"" + resultFile + "\" did not match expected result. First difference occured on line " + lineNumber + ".", a, b); - ++lineNumber; - } - } - catch(Exception e) { - Assert.fail("An error occured while loading expected result file for intro at: " + resultFile + ": " + e); - } + String path = urls[i].toString().substring("file:".length()); + String expected = FileUtil.getContents(FileUtil.getResultFile(path)); + String actual = CheatSheetModelSerializer.serialize(sheet); + Assert.assertEquals("The model serialization generated for the cheatsheet did not match the expected result for: " + path, expected, actual); } } } diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializer.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializer.java index 0eb4e1031..ae0d5484f 100644 --- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializer.java +++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializer.java @@ -43,7 +43,7 @@ public class CheatSheetModelSerializer { buf.append(" title=\"" + sheet.getTitle() + "\">\n"); buf.append(serialize(sheet.getIntroItem(), " ")); buf.append(serialize(sheet.getItems(), " ")); - buf.append("</cheatsheet>\n"); + buf.append("</cheatsheet>"); } return buf.toString(); } diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializerTest.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializerTest.java index 26cee7279..c39a3749e 100644 --- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializerTest.java +++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/CheatSheetModelSerializerTest.java @@ -11,6 +11,7 @@ package org.eclipse.ua.tests.cheatsheet.util; import java.io.FileOutputStream; +import java.io.IOException; import java.io.PrintWriter; import java.net.URL; @@ -20,16 +21,17 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; +import org.eclipse.ua.tests.util.FileUtil; import org.eclipse.ua.tests.util.ResourceFinder; import org.eclipse.ui.internal.cheatsheets.data.CheatSheet; import org.eclipse.ui.internal.cheatsheets.data.CheatSheetParser; /* - * A utility for regenerating the _serialized.txt files that contain the expected - * output for the cheat sheet content when serialized. This reads all the cheat + * A utility for regenerating the _expected.txt files that contain the expected + * result for the cheat sheet model when serialized. This reads all the cheat * sheet content in the /data/cheatsheet/valid folder, constructs the cheat sheet * model, then serializes the model to a text file, which is stored in the same - * directory as the xml file, as <original_name>_serialized.txt. + * directory as the xml file, as <original_name>_expected.txt. * * These files are used by the JUnit tests to compare the result with the expected * result. @@ -50,7 +52,7 @@ public class CheatSheetModelSerializerTest extends TestCase { return new TestSuite(CheatSheetModelSerializerTest.class); } - public void testRunSerializer() { + public void testRunSerializer() throws IOException { URL[] urls = ResourceFinder.findFiles(UserAssistanceTestPlugin.getDefault(), "data/cheatsheet/valid", ".xml", true); Assert.assertTrue("Unable to find sample cheat sheets to test parser", urls.length > 0); for (int i=0;i<urls.length;++i) { @@ -58,22 +60,9 @@ public class CheatSheetModelSerializerTest extends TestCase { CheatSheet sheet = (CheatSheet)parser.parse(urls[i], CheatSheetParser.ANY); Assert.assertNotNull("Tried parsing a valid cheat sheet but parser returned null: " + urls[i], sheet); - try { - PrintWriter out = new PrintWriter(new FileOutputStream(getResultFile(urls[i].toString().substring("file:/".length())))); - out.print(CheatSheetModelSerializer.serialize(sheet)); - out.close(); - } - catch (Exception e) { - e.printStackTrace(); - } + PrintWriter out = new PrintWriter(new FileOutputStream(FileUtil.getResultFile(urls[i].toString().substring("file:/".length())))); + out.print(CheatSheetModelSerializer.serialize(sheet)); + out.close(); } } - - /* - * Generates a filename with path to the result file that will be generated - * for the intro xml referred to by the string. - */ - public static String getResultFile(String in) { - return in.substring(0, in.lastIndexOf('.')) + "_serialized.txt"; - } } diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithExtensions_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithExtensions_expected.txt index def146a50..def146a50 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithExtensions_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithExtensions_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithSubitems_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithSubitems_expected.txt index 2ebfaa173..2ebfaa173 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithSubitems_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorldWithSubitems_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorld_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorld_expected.txt index 07ffdfdaa..07ffdfdaa 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorld_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/HelloWorld_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestActions_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestActions_expected.txt index 355163600..355163600 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestActions_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestActions_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestCSActions_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestCSActions_expected.txt index 1798eddf7..1798eddf7 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestCSActions_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestCSActions_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestContext_Help_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestContext_Help_expected.txt index ea74cc953..ea74cc953 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestContext_Help_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestContext_Help_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestDescriptionFormatting_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestDescriptionFormatting_expected.txt index 22f5a562a..22f5a562a 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestDescriptionFormatting_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestDescriptionFormatting_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestDynamicSubItems_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestDynamicSubItems_expected.txt index a241930ac..a241930ac 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestDynamicSubItems_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestDynamicSubItems_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestOpeningURL_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestOpeningURL_expected.txt index 5ca3e521e..5ca3e521e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestOpeningURL_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestOpeningURL_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestParameters_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestParameters_expected.txt index 5d448d04a..5d448d04a 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestParameters_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestParameters_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/TestSubItems_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/TestSubItems_expected.txt index 9d144d5dd..9d144d5dd 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/TestSubItems_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/TestSubItems_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraAttr_expected.txt index 75a0c2a61..75a0c2a61 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraElement_expected.txt index 75a0c2a61..75a0c2a61 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ActionElement_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraAttr_expected.txt index 07536fe5e..07536fe5e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraElement_expected.txt index 07536fe5e..07536fe5e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/CheatSheetElement_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraAttr_expected.txt index e3935eb65..e3935eb65 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraElement_expected.txt index e3935eb65..e3935eb65 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ConditionalSubItem_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/DescriptionElement_ExtraElements_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/DescriptionElement_ExtraElements_expected.txt index f5dfe5f35..f5dfe5f35 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/DescriptionElement_ExtraElements_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/DescriptionElement_ExtraElements_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraAttr_expected.txt index 07536fe5e..07536fe5e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraElement_expected.txt index 07536fe5e..07536fe5e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ManyDescriptions_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ManyDescriptions_expected.txt index 07536fe5e..07536fe5e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ManyDescriptions_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/IntroElement_ManyDescriptions_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraAttr_expected.txt index 5d2c82f5c..5d2c82f5c 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraElement_expected.txt index 07536fe5e..07536fe5e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ManyDescriptions_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ManyDescriptions_expected.txt index cccd1247f..cccd1247f 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ManyDescriptions_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_ManyDescriptions_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_OneDefined_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_OneDefined_expected.txt index 07536fe5e..07536fe5e 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_OneDefined_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/ItemElement_OneDefined_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraAttr_expected.txt index 70628f56a..70628f56a 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraElement_expected.txt index 70628f56a..70628f56a 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/PerformWhen_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraAttr_expected.txt index 926687c66..926687c66 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraElement_expected.txt index 926687c66..926687c66 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/RepeatedSubItem_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraAttr_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraAttr_expected.txt index d00050603..d00050603 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraAttr_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraAttr_expected.txt diff --git a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraElement_serialized.txt b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraElement_expected.txt index d00050603..d00050603 100644 --- a/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraElement_serialized.txt +++ b/org.eclipse.ua.tests/data/cheatsheet/valid/tolerate/SubItemElement_ExtraElement_expected.txt diff --git a/org.eclipse.ua.tests/data/help/context/contexts.xml b/org.eclipse.ua.tests/data/help/context/contexts.xml index ed1c0fe00..19963f40c 100644 --- a/org.eclipse.ua.tests/data/help/context/contexts.xml +++ b/org.eclipse.ua.tests/data/help/context/contexts.xml @@ -5,52 +5,23 @@ <context id="test.id" > <description>This is a test context.</description> <topic label="This topic should always appear" href="data/help/context/simple_page.html"/> - <topic filter="os=win32" label="Your OS is win32" href="data/help/context/simple_page.html"/> - <topic filter="os=linux" label="Your OS is linux" href="data/help/context/simple_page.html"/> - <topic filter="os=macosx" label="Your OS is macosx" href="data/help/context/simple_page.html"/> <!-- should never appear --> <topic filter="os=invalid" label="Your OS is invalid" href="data/help/context/simple_page.html"/> - - <topic filter="ws=win32" label="Your WS is win32" href="data/help/context/simple_page.html"/> - <topic filter="ws=gtk" label="Your WS is gtk" href="data/help/context/simple_page.html"/> - <topic filter="ws=carbon" label="Your WS is carbon" href="data/help/context/simple_page.html"/> - - <!-- should never appear --> <topic filter="ws=invalid" label="Your WS is invalid" href="data/help/context/simple_page.html"/> - - <topic filter="arch=x86" label="Your ARCH is x86" href="data/help/context/simple_page.html"/> - <topic filter="arch=ppc" label="Your ARCH is ppc" href="data/help/context/simple_page.html"/> - - <!-- should never appear --> <topic filter="arch=invalid" label="Your ARCH is invalid" href="data/help/context/simple_page.html"/> - - <topic label="Your OS is win32 AND your WS is win32" href="data/help/context/simple_page.html"> - <filter name="os" value="win32"/> - <filter name="ws" value="win32"/> - </topic> - - <topic label="Your OS is linux AND your WS is gtk" href="data/help/context/simple_page.html"> - <filter name="os" value="linux"/> - <filter name="ws" value="gtk"/> - </topic> - - <topic label="Your OS is macosx AND your WS is carbon" href="data/help/context/simple_page.html"> - <filter name="os" value="macosx"/> - <filter name="ws" value="carbon"/> - </topic> - - <!-- should never appear --> <topic label="Your OS is win32 AND your WS is invalid" href="data/help/context/simple_page.html"> <filter name="os" value="win32"/> <filter name="ws" value="invalid"/> </topic> <topic filter="plugin=org.eclipse.help" label="The plugin org.eclipse.help is installed" href="data/help/context/simple_page.html"/> + <topic filter="plugin!=org.eclipse.help" label="The plugin org.eclipse.help is NOT installed" href="data/help/context/simple_page.html"/> <!-- should never appear --> - <topic filter="plugin=invalid" label="The plugin invalid is installed" href="data/help/context/simple_page.html"/> + <topic filter="plugin=my.invalid.plugin.id.12345" label="The plugin my.invalid.plugin.id.12345 is installed" href="data/help/context/simple_page.html"/> + <topic filter="plugin!=my.invalid.plugin.id.12345d" label="The plugin my.invalid.plugin.id.12345 is NOT installed" href="data/help/context/simple_page.html"/> <topic filter="product=org.eclipse.sdk.ide" label="The product org.eclipse.sdk.ide is running" href="data/help/context/simple_page.html"/> <!-- should never appear --> diff --git a/org.eclipse.ua.tests/data/help/context/contexts_serialized_linux_gtk_x86.txt b/org.eclipse.ua.tests/data/help/context/contexts_expected.txt index 1d86c68e4..fbd2fd71f 100644 --- a/org.eclipse.ua.tests/data/help/context/contexts_serialized_linux_gtk_x86.txt +++ b/org.eclipse.ua.tests/data/help/context/contexts_expected.txt @@ -7,23 +7,11 @@ href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> </topic> <topic - label="Your OS is linux" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your WS is gtk" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your ARCH is x86" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your OS is linux AND your WS is gtk" + label="The plugin org.eclipse.help is installed" href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> </topic> <topic - label="The plugin org.eclipse.help is installed" + label="The plugin my.invalid.plugin.id.12345 is NOT installed" href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> </topic> <topic @@ -39,4 +27,4 @@ href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> </topic> </context> -</contexts> +</contexts>
\ No newline at end of file diff --git a/org.eclipse.ua.tests/data/help/context/contexts_serialized_macosx_carbon_ppc.txt b/org.eclipse.ua.tests/data/help/context/contexts_serialized_macosx_carbon_ppc.txt deleted file mode 100644 index 76f03d888..000000000 --- a/org.eclipse.ua.tests/data/help/context/contexts_serialized_macosx_carbon_ppc.txt +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<contexts> - <context id="test.id"> - <description>This is a test context.<description> - <topic - label="This topic should always appear" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your OS is macosx" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your WS is carbon" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your ARCH is ppc" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your OS is macosx AND your WS is carbon" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The plugin org.eclipse.help is installed" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The product org.eclipse.sdk.ide is running" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The category org.eclipse.categories.developmentCategory is enabled" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The activity org.eclipse.javaDevelopment is enabled" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - </context> -</contexts> diff --git a/org.eclipse.ua.tests/data/help/context/contexts_serialized_win32_win32_x86.txt b/org.eclipse.ua.tests/data/help/context/contexts_serialized_win32_win32_x86.txt deleted file mode 100644 index c61019fe6..000000000 --- a/org.eclipse.ua.tests/data/help/context/contexts_serialized_win32_win32_x86.txt +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<contexts> - <context id="test.id"> - <description>This is a test context.<description> - <topic - label="This topic should always appear" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your OS is win32" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your WS is win32" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your ARCH is x86" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="Your OS is win32 AND your WS is win32" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The plugin org.eclipse.help is installed" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The product org.eclipse.sdk.ide is running" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The category org.eclipse.categories.developmentCategory is enabled" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - <topic - label="The activity org.eclipse.javaDevelopment is enabled" - href="/org.eclipse.ua.tests/data/help/context/simple_page.html"> - </topic> - </context> -</contexts> diff --git a/org.eclipse.ua.tests/data/help/producer/dynamic.xhtml b/org.eclipse.ua.tests/data/help/producer/dynamic.xhtml index c855300b7..17c02c356 100644 --- a/org.eclipse.ua.tests/data/help/producer/dynamic.xhtml +++ b/org.eclipse.ua.tests/data/help/producer/dynamic.xhtml @@ -18,8 +18,28 @@ This page contains filtered content. </p> <p filter="os=invalid"> -This paragraph should always be filtered out. +This paragraph, which has filter attribute "os=invalid" should always be filtered out. </p> +<p filter="os!=invalid"> +This paragraph, which has filter attribute "os!=invalid" should never be filtered out. +</p> +<p filter="plugin=my.invalid.plugin.id.012345"> +This paragraph, which has filter attribute "plugin=my.invalid.plugin.id.012345" should always be filtered out. +</p> +<p filter="plugin!=my.invalid.plugin.id.012345"> +This paragraph, which has filter attribute "plugin!=my.invalid.plugin.id.012345" should never be filtered out. +</p> +<p> + <filter name="plugin" value="my.invalid.plugin.id.012345"/> + This paragraph, which has filter element name="plugin", value="my.invalid.plugin.id.012345", + should always be filtered out. +</p> +<p> + <filter name="plugin" value="!my.invalid.plugin.id.012345"/> + This paragraph, which has filter element name="plugin", value="!my.invalid.plugin.id.012345", + should never be filtered out. +</p> + </body> </html> diff --git a/org.eclipse.ua.tests/data/help/producer/dynamicInZip_serialized.txt b/org.eclipse.ua.tests/data/help/producer/dynamicInZip_expected.txt index c82bdaaa0..4259491ce 100644 --- a/org.eclipse.ua.tests/data/help/producer/dynamicInZip_serialized.txt +++ b/org.eclipse.ua.tests/data/help/producer/dynamicInZip_expected.txt @@ -5,7 +5,7 @@ --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> + <title>dynamicInZip.xhtml</title> </head> <body> diff --git a/org.eclipse.ua.tests/data/help/producer/dynamic_serialized.txt b/org.eclipse.ua.tests/data/help/producer/dynamic_expected.txt index f839440a4..005f29040 100644 --- a/org.eclipse.ua.tests/data/help/producer/dynamic_serialized.txt +++ b/org.eclipse.ua.tests/data/help/producer/dynamic_expected.txt @@ -5,7 +5,7 @@ --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> + <title>dynamic.xhtml</title> </head> <body> @@ -15,6 +15,20 @@ This page contains filtered content. </p> +<p filter="os!=invalid"> +This paragraph, which has filter attribute "os!=invalid" should never be filtered out. +</p> + +<p filter="plugin!=my.invalid.plugin.id.012345"> +This paragraph, which has filter attribute "plugin!=my.invalid.plugin.id.012345" should never be filtered out. +</p> + +<p> + <filter name="plugin" value="!my.invalid.plugin.id.012345" /> + This paragraph, which has filter element name="plugin", value="!my.invalid.plugin.id.012345", + should never be filtered out. +</p> + </body> </html>
\ No newline at end of file diff --git a/org.eclipse.ua.tests/data/help/toc/extraContent/toc2_serialized.txt b/org.eclipse.ua.tests/data/help/toc/extraContent/toc2_expected.txt index e7b25dca4..e7b25dca4 100644 --- a/org.eclipse.ua.tests/data/help/toc/extraContent/toc2_serialized.txt +++ b/org.eclipse.ua.tests/data/help/toc/extraContent/toc2_expected.txt diff --git a/org.eclipse.ua.tests/data/help/toc/extraContent/toc_serialized.txt b/org.eclipse.ua.tests/data/help/toc/extraContent/toc_expected.txt index e35bbb632..e35bbb632 100644 --- a/org.eclipse.ua.tests/data/help/toc/extraContent/toc_serialized.txt +++ b/org.eclipse.ua.tests/data/help/toc/extraContent/toc_expected.txt diff --git a/org.eclipse.ua.tests/data/help/toc/filteredToc/filter.xml b/org.eclipse.ua.tests/data/help/toc/filteredToc/filter.xml index 2d1115349..bcbfe497a 100644 --- a/org.eclipse.ua.tests/data/help/toc/filteredToc/filter.xml +++ b/org.eclipse.ua.tests/data/help/toc/filteredToc/filter.xml @@ -8,67 +8,17 @@ <topic label="This topic should always appear" href="data/help/toc/filteredToc/simple_page.html"> <link toc="data/help/toc/filteredToc/simple_toc.xml" /> </topic> - <topic filter="os=win32" label="Your OS is win32" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - <topic filter="os=linux" label="Your OS is linux" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - <topic filter="os=macosx" label="Your OS is macosx" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> <!-- should never appear --> <topic filter="os=invalid" label="Your OS is invalid" href="data/help/toc/filteredToc/simple_page.html"> <link toc="data/help/toc/filteredToc/simple_toc.xml" /> </topic> - - <topic filter="ws=win32" label="Your WS is win32" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - <topic filter="ws=gtk" label="Your WS is gtk" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - <topic filter="ws=carbon" label="Your WS is carbon" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - - <!-- should never appear --> <topic filter="ws=invalid" label="Your WS is invalid" href="data/help/toc/filteredToc/simple_page.html"> <link toc="data/help/toc/filteredToc/simple_toc.xml" /> </topic> - - <topic filter="arch=x86" label="Your ARCH is x86" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - <topic filter="arch=ppc" label="Your ARCH is ppc" href="data/help/toc/filteredToc/simple_page.html"> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - - <!-- should never appear --> <topic filter="arch=invalid" label="Your ARCH is invalid" href="data/help/toc/filteredToc/simple_page.html"> <link toc="data/help/toc/filteredToc/simple_toc.xml" /> </topic> - - <topic label="Your OS is win32 AND your WS is win32" href="data/help/toc/filteredToc/simple_page.html"> - <filter name="os" value="win32"/> - <filter name="ws" value="win32"/> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - - <topic label="Your OS is linux AND your WS is gtk" href="data/help/toc/filteredToc/simple_page.html"> - <filter name="os" value="linux"/> - <filter name="ws" value="gtk"/> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - - <topic label="Your OS is macosx AND your WS is carbon" href="data/help/toc/filteredToc/simple_page.html"> - <filter name="os" value="macosx"/> - <filter name="ws" value="carbon"/> - <link toc="data/help/toc/filteredToc/simple_toc.xml" /> - </topic> - - <!-- should never appear --> <topic label="Your OS is win32 AND your WS is invalid" href="data/help/toc/filteredToc/simple_page.html"> <filter name="os" value="win32"/> <filter name="ws" value="invalid"/> @@ -115,42 +65,11 @@ <!-- Topics --> <topic label="This topic should always appear" href="data/help/toc/filteredToc/simple_page.html"/> - <topic filter="os=win32" label="Your OS is win32" href="data/help/toc/filteredToc/simple_page.html"/> - <topic filter="os=linux" label="Your OS is linux" href="data/help/toc/filteredToc/simple_page.html"/> - <topic filter="os=macosx" label="Your OS is macosx" href="data/help/toc/filteredToc/simple_page.html"/> <!-- should never appear --> <topic filter="os=invalid" label="Your OS is invalid" href="data/help/toc/filteredToc/simple_page.html"/> - - <topic filter="ws=win32" label="Your WS is win32" href="data/help/toc/filteredToc/simple_page.html"/> - <topic filter="ws=gtk" label="Your WS is gtk" href="data/help/toc/filteredToc/simple_page.html"/> - <topic filter="ws=carbon" label="Your WS is carbon" href="data/help/toc/filteredToc/simple_page.html"/> - - <!-- should never appear --> <topic filter="ws=invalid" label="Your WS is invalid" href="data/help/toc/filteredToc/simple_page.html"/> - - <topic filter="arch=x86" label="Your ARCH is x86" href="data/help/toc/filteredToc/simple_page.html"/> - <topic filter="arch=ppc" label="Your ARCH is ppc" href="data/help/toc/filteredToc/simple_page.html"/> - - <!-- should never appear --> <topic filter="arch=invalid" label="Your ARCH is invalid" href="data/help/toc/filteredToc/simple_page.html"/> - - <topic label="Your OS is win32 AND your WS is win32" href="data/help/toc/filteredToc/simple_page.html"> - <filter name="os" value="win32"/> - <filter name="ws" value="win32"/> - </topic> - - <topic label="Your OS is linux AND your WS is gtk" href="data/help/toc/filteredToc/simple_page.html"> - <filter name="os" value="linux"/> - <filter name="ws" value="gtk"/> - </topic> - - <topic label="Your OS is macosx AND your WS is carbon" href="data/help/toc/filteredToc/simple_page.html"> - <filter name="os" value="macosx"/> - <filter name="ws" value="carbon"/> - </topic> - - <!-- should never appear --> <topic label="Your OS is win32 AND your WS is invalid" href="data/help/toc/filteredToc/simple_page.html"> <filter name="os" value="win32"/> <filter name="ws" value="invalid"/> diff --git a/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_linux_gtk_x86.txt b/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_expected.txt index 70112dd80..72cb7236f 100644 --- a/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_linux_gtk_x86.txt +++ b/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_expected.txt @@ -14,38 +14,6 @@ </topic> </topic> <topic - label="Your OS is linux" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your WS is gtk" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your ARCH is x86" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your OS is linux AND your WS is gtk" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic label="The plugin org.eclipse.help is installed" href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> <topic @@ -82,22 +50,6 @@ href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> </topic> <topic - label="Your OS is linux" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your WS is gtk" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your ARCH is x86" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your OS is linux AND your WS is gtk" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic label="The plugin org.eclipse.help is installed" href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> </topic> diff --git a/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_macosx_carbon_ppc.txt b/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_macosx_carbon_ppc.txt deleted file mode 100644 index a62416e5c..000000000 --- a/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_macosx_carbon_ppc.txt +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<toc - label="filteredToc" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/toc.xml"> - <topic - label="filter.xml" - href="null"> - <topic - label="This topic should always appear" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your OS is macosx" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your WS is carbon" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your ARCH is ppc" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your OS is macosx AND your WS is carbon" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The plugin org.eclipse.help is installed" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The product org.eclipse.sdk.ide is running" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The category org.eclipse.categories.developmentCategory is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The activity org.eclipse.javaDevelopment is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="This topic should always appear" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your OS is macosx" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your WS is carbon" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your ARCH is ppc" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your OS is macosx AND your WS is carbon" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The plugin org.eclipse.help is installed" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The product org.eclipse.sdk.ide is running" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The category org.eclipse.categories.developmentCategory is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The activity org.eclipse.javaDevelopment is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - </topic> -</toc> diff --git a/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_win32_win32_x86.txt b/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_win32_win32_x86.txt deleted file mode 100644 index 97066bf6e..000000000 --- a/org.eclipse.ua.tests/data/help/toc/filteredToc/toc_serialized_win32_win32_x86.txt +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<toc - label="filteredToc" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/toc.xml"> - <topic - label="filter.xml" - href="null"> - <topic - label="This topic should always appear" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your OS is win32" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your WS is win32" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your ARCH is x86" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="Your OS is win32 AND your WS is win32" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The plugin org.eclipse.help is installed" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The product org.eclipse.sdk.ide is running" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The category org.eclipse.categories.developmentCategory is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="The activity org.eclipse.javaDevelopment is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - <topic - label="test" - href="/org.eclipse.ua.tests/data/help/filteredTOC/simple_page.html"> - </topic> - </topic> - <topic - label="This topic should always appear" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your OS is win32" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your WS is win32" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your ARCH is x86" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="Your OS is win32 AND your WS is win32" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The plugin org.eclipse.help is installed" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The product org.eclipse.sdk.ide is running" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The category org.eclipse.categories.developmentCategory is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - <topic - label="The activity org.eclipse.javaDevelopment is enabled" - href="/org.eclipse.ua.tests/data/help/toc/filteredToc/simple_page.html"> - </topic> - </topic> -</toc> diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor2_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor2_expected.txt index 7103980df..7103980df 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor2_serialized.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor2_expected.txt diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor_expected.txt index 380e0aa7f..380e0aa7f 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor_serialized.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/anchor_expected.txt diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter.xhtml b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter.xhtml index f073924c8..427b57111 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter.xhtml +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter.xhtml @@ -18,44 +18,12 @@ This page contains filtered content. </p> <ul> -<li filter="os=win32">Your OS is <strong>win32</strong>.</li> -<li filter="os=linux">Your OS is <strong>linux</strong>.</li> -<li filter="os=macosx">Your OS is <strong>macosx</strong>.</li> - <!-- should never appear --> <li filter="os=invalid">This line should never appear.</li> - -<li filter="ws=win32">Your WS is <strong>win32</strong>.</li> -<li filter="ws=gtk">Your WS is <strong>gtk</strong>.</li> -<li filter="ws=carbon">Your WS is <strong>carbon</strong>.</li> - -<!-- should never appear --> <li filter="ws=invalid">This line should never appear.</li> - -<li filter="arch=x86">Your ARCH is <strong>x86</strong>.</li> -<li filter="arch=ppc">Your ARCH is <strong>ppc</strong>.</li> - -<!-- should never appear --> <li filter="arch=invalid">Your ARCH is <strong>invalid</strong>.</li> <li> <filter name="os" value="win32"/> -<filter name="ws" value="win32"/> -Your OS is <strong>win32</strong> AND your WS is <strong>win32</strong>. -</li> -<li> -<filter name="os" value="linux"/> -<filter name="ws" value="gtk"/> -Your OS is <strong>linux</strong> AND your WS is <strong>gtk</strong>. -</li> -<li> -<filter name="os" value="macosx"/> -<filter name="ws" value="carbon"/> -Your OS is <strong>macosx</strong> AND your WS is <strong>carbon</strong>. -</li> - -<!-- should never appear --> -<li> -<filter name="os" value="win32"/> <filter name="ws" value="invalid"/> Your OS is <strong>win32</strong> AND your WS is <strong>invalid</strong>. </li> diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_linux_gtk_x86.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_expected.txt index 56c91ec81..2a53b71d8 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_linux_gtk_x86.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_expected.txt @@ -15,35 +15,11 @@ This page contains filtered content. </p> <ul> -<li filter="os=linux">Your OS is <strong>linux</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="ws=gtk">Your WS is <strong>gtk</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="arch=x86">Your ARCH is <strong>x86</strong>.</li> - - <!-- should never appear --> -<li> -<filter name="os" value="linux" /> -<filter name="ws" value="gtk" /> -Your OS is <strong>linux</strong> AND your WS is <strong>gtk</strong>. -</li> -<!-- should never appear --> - <li filter="plugin=org.eclipse.help">The plugin <code>org.eclipse.help</code> is installed.</li> @@ -66,4 +42,4 @@ Your OS is <strong>linux</strong> AND your WS is <strong>gtk</strong>. </ul> </body> -</html> +</html>
\ No newline at end of file diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized.txt deleted file mode 100644 index b19542ce4..000000000 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized.txt +++ /dev/null @@ -1,69 +0,0 @@ -<!-- - The filter examples page. This tests filtering in intro XHTML. When viewed, this page - displays facts about your environment. For example, your os is linux, your ws is gtk, etc. - All the other content should be filtered out. ---><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - -<title>filter.xhtml</title> -</head> - -<body> -<h2>filter.xhtml</h2> -<p> -This page contains filtered content. -</p> -<ul> -<li filter="os=win32">Your OS is <strong>win32</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="ws=win32">Your WS is <strong>win32</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="arch=x86">Your ARCH is <strong>x86</strong>.</li> - - -<!-- should never appear --> - -<li> -<filter name="os" value="win32" /> -<filter name="ws" value="win32" /> -Your OS is <strong>win32</strong> AND your WS is <strong>win32</strong>. -</li> - - - -<!-- should never appear --> - - -<li filter="plugin=org.eclipse.help">The plugin <code>org.eclipse.help</code> is installed.</li> - -<!-- should never appear --> - - -<li filter="product=org.eclipse.sdk.ide">The product <code>org.eclipse.sdk.ide</code> is running.</li> - -<!-- should never appear --> - - -<li filter="category=org.eclipse.categories.developmentCategory">The category <code>org.eclipse.categories.developmentCategory</code> is enabled.</li> - -<!-- should never appear --> - - -<li filter="activity=org.eclipse.javaDevelopment">The activity <code>org.eclipse.javaDevelopment</code> is enabled.</li> - -<!-- should never appear --> - -</ul> -</body> -</html>
\ No newline at end of file diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_macosx_carbon_ppc.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_macosx_carbon_ppc.txt deleted file mode 100644 index 63685d8e3..000000000 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_macosx_carbon_ppc.txt +++ /dev/null @@ -1,69 +0,0 @@ -<!-- - The filter examples page. This tests filtering in intro XHTML. When viewed, this page - displays facts about your environment. For example, your os is linux, your ws is gtk, etc. - All the other content should be filtered out. ---><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - -<title>filter.xhtml</title> -</head> - -<body> -<h2>filter.xhtml</h2> -<p> -This page contains filtered content. -</p> -<ul> -<li filter="os=macosx">Your OS is <strong>macosx</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="ws=carbon">Your WS is <strong>carbon</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="arch=ppc">Your ARCH is <strong>ppc</strong>.</li> - - -<!-- should never appear --> - -<li> -<filter name="os" value="macosx" /> -<filter name="ws" value="carbon" /> -Your OS is <strong>macosx</strong> AND your WS is <strong>carbon</strong>. -</li> - - - -<!-- should never appear --> - - -<li filter="plugin=org.eclipse.help">The plugin <code>org.eclipse.help</code> is installed.</li> - -<!-- should never appear --> - - -<li filter="product=org.eclipse.sdk.ide">The product <code>org.eclipse.sdk.ide</code> is running.</li> - -<!-- should never appear --> - - -<li filter="category=org.eclipse.categories.developmentCategory">The category <code>org.eclipse.categories.developmentCategory</code> is enabled.</li> - -<!-- should never appear --> - - -<li filter="activity=org.eclipse.javaDevelopment">The activity <code>org.eclipse.javaDevelopment</code> is enabled.</li> - -<!-- should never appear --> - -</ul> -</body> -</html> diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_win32_win32_x86.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_win32_win32_x86.txt deleted file mode 100644 index 4e00a4367..000000000 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/filter_serialized_win32_win32_x86.txt +++ /dev/null @@ -1,69 +0,0 @@ -<!-- - The filter examples page. This tests filtering in intro XHTML. When viewed, this page - displays facts about your environment. For example, your os is linux, your ws is gtk, etc. - All the other content should be filtered out. ---><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - -<title>filter.xhtml</title> -</head> - -<body> -<h2>filter.xhtml</h2> -<p> -This page contains filtered content. -</p> -<ul> -<li filter="os=win32">Your OS is <strong>win32</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="ws=win32">Your WS is <strong>win32</strong>.</li> - - - -<!-- should never appear --> - - -<li filter="arch=x86">Your ARCH is <strong>x86</strong>.</li> - - -<!-- should never appear --> - -<li> -<filter name="os" value="win32" /> -<filter name="ws" value="win32" /> -Your OS is <strong>win32</strong> AND your WS is <strong>win32</strong>. -</li> - - - -<!-- should never appear --> - - -<li filter="plugin=org.eclipse.help">The plugin <code>org.eclipse.help</code> is installed.</li> - -<!-- should never appear --> - - -<li filter="product=org.eclipse.sdk.ide">The product <code>org.eclipse.sdk.ide</code> is running.</li> - -<!-- should never appear --> - - -<li filter="category=org.eclipse.categories.developmentCategory">The category <code>org.eclipse.categories.developmentCategory</code> is enabled.</li> - -<!-- should never appear --> - - -<li filter="activity=org.eclipse.javaDevelopment">The activity <code>org.eclipse.javaDevelopment</code> is enabled.</li> - -<!-- should never appear --> - -</ul> -</body> -</html> diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include2_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include2_expected.txt index 5376c3fe3..5376c3fe3 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include2_serialized.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include2_expected.txt diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include_expected.txt index 32542bef0..32542bef0 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include_serialized.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/include_expected.txt diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/root_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/root_expected.txt index 04a6a3988..04a6a3988 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/root_serialized.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/root_expected.txt diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/static_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/static_expected.txt index e97e28431..e97e28431 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/static_serialized.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/content/static_expected.txt diff --git a/org.eclipse.ua.tests/data/intro/dynamicXHTML/introContent_serialized.txt b/org.eclipse.ua.tests/data/intro/dynamicXHTML/introContent_expected.txt index 11cac79bf..40e52fb9e 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXHTML/introContent_serialized.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXHTML/introContent_expected.txt @@ -1,4 +1,3 @@ - Intro Model Content: ====================== @@ -128,4 +127,4 @@ Model Flag Tests: Anchors: 0 Content providers: 0 Elements with Text child(AbstractTextElemets): 0 - Groups and Links: 0 + Groups and Links: 0
\ No newline at end of file diff --git a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent.xml b/org.eclipse.ua.tests/data/intro/dynamicXML/introContent.xml index 333083765..8d64db34c 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent.xml +++ b/org.eclipse.ua.tests/data/intro/dynamicXML/introContent.xml @@ -41,43 +41,12 @@ <page id="filter"> <title>Filter Example</title> <group> - <link filter="os=win32" label="Your OS is win32." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - <link filter="os=linux" label="Your OS is linux." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - <link filter="os=macosx" label="Your OS is macosx." url="http://org.eclipse.ui.intro/showPage?id=filter"/> + <link label="Sanity test" url="http://org.eclipse.ui.intro/showPage?id=filter"/> <!-- should never appear --> <link filter="os=invalid" label="Your OS is invalid." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - </group> - <group> - <link filter="ws=win32" label="Your WS is win32." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - <link filter="ws=gtk" label="Your WS is gtk." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - <link filter="ws=carbon" label="Your WS is carbon." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - - <!-- should never appear --> <link filter="ws=invalid" label="Your WS is invalid." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - </group> - <group> - <link filter="arch=x86" label="Your ARCH is x86." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - <link filter="arch=ppc" label="Your ARCH is ppc." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - - <!-- should never appear --> <link filter="arch=invalid" label="Your ARCH is invalid." url="http://org.eclipse.ui.intro/showPage?id=filter"/> - </group> - <group> - <link label="Your OS is win32 AND your WS is win32." url="http://org.eclipse.ui.intro/showPage?id=filter"> - <filter name="os" value="win32"/> - <filter name="ws" value="win32"/> - </link> - <link label="Your OS is linux AND your WS is gtk." url="http://org.eclipse.ui.intro/showPage?id=filter"> - <filter name="os" value="linux"/> - <filter name="ws" value="gtk"/> - </link> - <link label="Your OS is macosx AND your WS is carbon." url="http://org.eclipse.ui.intro/showPage?id=filter"> - <filter name="os" value="macosx"/> - <filter name="ws" value="carbon"/> - </link> - - <!-- should never appear --> <link label="Your OS is win32 AND your WS is invalid." url="http://org.eclipse.ui.intro/showPage?id=filter"> <filter name="os" value="win32"/> <filter name="ws" value="invalid"/> diff --git a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_linux_gtk_x86.txt b/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_expected.txt index ee4adc03f..342a515ad 100644 --- a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_linux_gtk_x86.txt +++ b/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_expected.txt @@ -1,4 +1,3 @@ - Intro Model Content: ====================== @@ -93,7 +92,7 @@ PAGE id = filter style-id = null page styles are = page alt-styles are = - page children = 9 + page children = 6 TITLE: id = null title = Filter Example @@ -103,34 +102,7 @@ PAGE id = filter children = 1 style-id = null LINK: id = null - label = Your OS is linux. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your WS is gtk. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your ARCH is x86. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your OS is linux AND your WS is gtk. + label = Sanity test text = null url = http://org.eclipse.ui.intro/showPage?id=filter style-id = null @@ -276,4 +248,4 @@ Model Flag Tests: Anchors: 0 Content providers: 0 Elements with Text child(AbstractTextElemets): 0 - Groups and Links: 1 + Groups and Links: 1
\ No newline at end of file diff --git a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_macosx_carbon_ppc.txt b/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_macosx_carbon_ppc.txt deleted file mode 100644 index c2b422514..000000000 --- a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_macosx_carbon_ppc.txt +++ /dev/null @@ -1,279 +0,0 @@ - -Intro Model Content: -====================== - -Model has valid config = true -Presentation type = 2 -Home page id = root -Number of pages (not including Root Page) = 5 -Number of shared groups = 0 -Number of unresolved extensions = 0 - -HOME PAGE: --------------- - is dynamic= true - id = root - title = Dynamic XML Intro - style = null - alt-style = null - url = null - style-id = null - page styles are = - page alt-styles are = - page children = 5 - - TITLE: id = null - title = Dynamic XML Intro - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Static Content Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=static - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Filter Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Include Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Anchor Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=anchor - style-id = null - -PAGE id = static ----------- - title = Static Content Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 2 - - TITLE: id = null - title = Static Content Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = This page contains static content only. - text = null - url = http://org.eclipse.ui.intro/showPage?id=static - style-id = null - -PAGE id = filter ----------- - title = Filter Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 9 - - TITLE: id = null - title = Filter Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your OS is macosx. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your WS is carbon. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your ARCH is ppc. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your OS is macosx AND your WS is carbon. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The plugin org.eclipse.help is installed. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The product org.eclipse.sdk.ide is running. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The category org.eclipse.categories.developmentCategory is enabled. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The activity org.eclipse.javaDevelopment is enabled. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - -PAGE id = include ----------- - title = Include Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 3 - - TITLE: id = null - title = Include Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = There should be one link below included from another page. - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - GROUP: id = my.id.include2 - label = null - children = 1 - style-id = null - LINK: id = null - label = This link is from page id=include2 and is to be included into other pages. - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - -PAGE id = include2 ----------- - title = Include Example 2 - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 2 - - TITLE: id = null - title = Include Example 2 - style-id = null - GROUP: id = my.id.include2 - label = null - children = 1 - style-id = null - LINK: id = null - label = This link is from page id=include2 and is to be included into other pages. - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - -PAGE id = anchor ----------- - title = Anchor Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 4 - - TITLE: id = null - title = Anchor Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = There is an anchor below this link that should be populated from another page. - text = null - url = http://org.eclipse.ui.intro/showPage?id=anchor - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = This link is from extension content ext.xml and is to be contributed into a page with an anchor. - text = null - url = http://org.eclipse.ui.intro/showPage?id=anchor - style-id = null - ANCHOR: id = my.id.anchor - -Model Flag Tests: ----------------- - First page children are: - Groups: 1 - Links: 0 - Texts: 0 - HTMLs: 0 - Images: 0 - Includes: 0 - Page Titles: 1 - Page Heads: 0 - Model Elements: 2 - Containers: 1 - All Pages: 0 - Anchors: 0 - Content providers: 0 - Elements with Text child(AbstractTextElemets): 0 - Groups and Links: 1 diff --git a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_win32_win32_x86.txt b/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_win32_win32_x86.txt deleted file mode 100644 index 8f242151d..000000000 --- a/org.eclipse.ua.tests/data/intro/dynamicXML/introContent_serialized_win32_win32_x86.txt +++ /dev/null @@ -1,279 +0,0 @@ - -Intro Model Content: -====================== - -Model has valid config = true -Presentation type = 2 -Home page id = root -Number of pages (not including Root Page) = 5 -Number of shared groups = 0 -Number of unresolved extensions = 0 - -HOME PAGE: --------------- - is dynamic= true - id = root - title = Dynamic XML Intro - style = null - alt-style = null - url = null - style-id = null - page styles are = - page alt-styles are = - page children = 5 - - TITLE: id = null - title = Dynamic XML Intro - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Static Content Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=static - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Filter Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Include Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Anchor Example - text = null - url = http://org.eclipse.ui.intro/showPage?id=anchor - style-id = null - -PAGE id = static ----------- - title = Static Content Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 2 - - TITLE: id = null - title = Static Content Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = This page contains static content only. - text = null - url = http://org.eclipse.ui.intro/showPage?id=static - style-id = null - -PAGE id = filter ----------- - title = Filter Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 9 - - TITLE: id = null - title = Filter Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your OS is win32. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your WS is win32. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your ARCH is x86. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = Your OS is win32 AND your WS is win32. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The plugin org.eclipse.help is installed. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The product org.eclipse.sdk.ide is running. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The category org.eclipse.categories.developmentCategory is enabled. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = The activity org.eclipse.javaDevelopment is enabled. - text = null - url = http://org.eclipse.ui.intro/showPage?id=filter - style-id = null - -PAGE id = include ----------- - title = Include Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 3 - - TITLE: id = null - title = Include Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = There should be one link below included from another page. - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - GROUP: id = my.id.include2 - label = null - children = 1 - style-id = null - LINK: id = null - label = This link is from page id=include2 and is to be included into other pages. - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - -PAGE id = include2 ----------- - title = Include Example 2 - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 2 - - TITLE: id = null - title = Include Example 2 - style-id = null - GROUP: id = my.id.include2 - label = null - children = 1 - style-id = null - LINK: id = null - label = This link is from page id=include2 and is to be included into other pages. - text = null - url = http://org.eclipse.ui.intro/showPage?id=include - style-id = null - -PAGE id = anchor ----------- - title = Anchor Example - style = null - alt-style = null - style-id = null - page styles are = - page alt-styles are = - page children = 4 - - TITLE: id = null - title = Anchor Example - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = There is an anchor below this link that should be populated from another page. - text = null - url = http://org.eclipse.ui.intro/showPage?id=anchor - style-id = null - GROUP: id = null - label = null - children = 1 - style-id = null - LINK: id = null - label = This link is from extension content ext.xml and is to be contributed into a page with an anchor. - text = null - url = http://org.eclipse.ui.intro/showPage?id=anchor - style-id = null - ANCHOR: id = my.id.anchor - -Model Flag Tests: ----------------- - First page children are: - Groups: 1 - Links: 0 - Texts: 0 - HTMLs: 0 - Images: 0 - Includes: 0 - Page Titles: 1 - Page Heads: 0 - Model Elements: 2 - Containers: 1 - All Pages: 0 - Anchors: 0 - Content providers: 0 - Elements with Text child(AbstractTextElemets): 0 - Groups and Links: 1 diff --git a/org.eclipse.ua.tests/data/intro/platform/serialized.txt b/org.eclipse.ua.tests/data/intro/platform/serialized.txt deleted file mode 100644 index 5873bb081..000000000 --- a/org.eclipse.ua.tests/data/intro/platform/serialized.txt +++ /dev/null @@ -1,1062 +0,0 @@ - -Intro Model Content: -====================== - -Model has valid config = true -Presentation type = 2 -Home page id = root -Number of pages (not including Root Page) = 7 -Number of shared groups = 0 -Number of unresolved extensions = 0 - -HOME PAGE: --------------- - is dynamic= true - id = root - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/root.css - alt-style = file:/<filtered>/root.properties - url = null - style-id = page - page styles are = - page alt-styles are = - page children = 9 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = links-background - label = null - children = 1 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = Find out what Eclipse is all about - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left - LINK: id = tutorials - label = Tutorials - text = Go through tutorials - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left - LINK: id = samples - label = Samples - text = Try out the samples - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right - LINK: id = whatsnew - label = What's New - text = Find out what is new - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = right - GROUP: id = branding - label = null - children = 1 - style-id = null - IMAGE: id = null - src = file:/D:/eclipse/plugins/org.eclipse.sdk_3.2.0.v20060307/intro-eclipse.png - alt = Eclipse Project - style-id = null - GROUP: id = extra-group1 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group5 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -PAGE id = overview ----------- - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/overview.css - alt-style = file:/<filtered>/overview.properties - style-id = page - page styles are = file:/<filtered>/overview.css - file:/<filtered>/overview.css - file:/<filtered>/overview.css - - page alt-styles are = file:/<filtered>/overview.properties from org.eclipse.platform - file:/<filtered>/swt.properties from org.eclipse.jdt - file:/<filtered>/swt.properties from org.eclipse.pde - - page children = 7 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = extra-group1 - label = null - children = 0 - style-id = null - GROUP: id = navigation-links - label = null - children = 2 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = null - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left nav_link1 - LINK: id = tutorials - label = Tutorials - text = null - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left nav_link2 - LINK: id = samples - label = Samples - text = null - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right nav_link3 - LINK: id = whatsnew - label = What's New - text = null - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right nav_link4 - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = null - GROUP: id = page-content - label = null - children = 8 - style-id = null - GROUP: id = content-header - label = OVERVIEW - children = 0 - style-id = null - TEXT: id = page-title - text = Overview - style-id = page-title - TEXT: id = page-description - text = Eclipse is a kind of universal tool platform - an open extensible IDE for anything and nothing in particular. It provides a feature-rich development environment that allows the developer to efficiently create tools that integrate seamlessly into the Eclipse Platform. - style-id = page-description - GROUP: id = top-left - label = null - children = 3 - style-id = null - GROUP: id = content-group - label = null - children = 2 - style-id = content-group - LINK: id = basics - label = Workbench basics - text = Learn about basic Eclipse workbench concepts - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.platform.doc.user/gettingStarted/intro/overview.htm&embedTarget=page-content - style-id = content-link - LINK: id = team - label = Team support - text = Find out how to collaborate with other developers - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.platform.doc.user/concepts/concepts-26.htm&embedTarget=page-content - style-id = content-link - ANCHOR: id = org.eclipse.ui.workbench - ANCHOR: id = defaultAnchor - GROUP: id = top-right - label = null - children = 5 - style-id = null - GROUP: id = content-group - label = null - children = 1 - style-id = content-group - LINK: id = java - label = Java development - text = Get familiar with developing Java programs using Eclipse - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.jdt.doc.user/gettingStarted/intro/overview.htm&embedTarget=page-content - style-id = content-link - ANCHOR: id = org.eclipse.jdt - GROUP: id = content-group - label = null - children = 1 - style-id = content-group - LINK: id = pde - label = Eclipse plug-in development - text = Learn how to extend Eclipse by building new plug-ins - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.pde.doc.user/guide/intro/pde_overview.htm&embedTarget=page-content - style-id = content-link - ANCHOR: id = org.eclipse.pde - ANCHOR: id = defaultAnchor - GROUP: id = content-divider - label = null - children = 0 - style-id = null - GROUP: id = bottom-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = bottom-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -PAGE id = tutorials ----------- - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/tutorials.css - alt-style = file:/<filtered>/tutorials.properties - style-id = page - page styles are = file:/<filtered>/tutorials.css - file:/<filtered>/tutorials.css - - page alt-styles are = file:/<filtered>/swt.properties from org.eclipse.jdt - file:/<filtered>/swt.properties from org.eclipse.pde - - page children = 7 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = extra-group1 - label = null - children = 0 - style-id = null - GROUP: id = navigation-links - label = null - children = 2 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = null - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left nav_link1 - LINK: id = tutorials - label = Tutorials - text = null - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left nav_link2 - LINK: id = samples - label = Samples - text = null - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right nav_link3 - LINK: id = whatsnew - label = What's New - text = null - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right nav_link4 - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = null - GROUP: id = page-content - label = null - children = 8 - style-id = null - GROUP: id = content-header - label = TUTORIALS - children = 0 - style-id = null - TEXT: id = page-title - text = Tutorials - style-id = page-title - TEXT: id = page-description - text = Learn how to be productive using Eclipse by completing end-to-end tutorials that will guide you along the way. - style-id = page-description - GROUP: id = top-left - label = null - children = 3 - style-id = null - GROUP: id = java - label = JAVA DEVELOPMENT - children = 2 - style-id = content-group - LINK: id = hello-world - label = Build a simple Java application - text = Create a small Java program that will print "Hello, World" on the console - url = http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&input=org.eclipse.jdt.helloworld - style-id = content-link - LINK: id = swt - label = Build a standalone SWT application - text = Create a SWT application that runs without the workbench - url = http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&input=org.eclipse.jdt.helloworld.swt - style-id = content-link - ANCHOR: id = org.eclipse.jdt - ANCHOR: id = defaultAnchor - GROUP: id = top-right - label = null - children = 3 - style-id = null - GROUP: id = pde - label = ECLIPSE PLUG-IN DEVELOPMENT - children = 3 - style-id = content-group - LINK: id = pde-hello-world - label = Create a "Hello, World" plug-in - text = Create an Eclipse plug-in that will open a message box from the menu - url = http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&input=org.eclipse.pde.helloworld - style-id = content-link - LINK: id = features - label = Deploy a feature on an update site - text = End-to-end tutorial in building and deploying features - url = http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&input=org.eclipse.pde.updates - style-id = content-link - LINK: id = rcp - label = Build a Rich Client Platform application - text = Create a full RCP application step by step - url = http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&input=org.eclipse.pde.rcpapp - style-id = content-link - ANCHOR: id = org.eclipse.pde - ANCHOR: id = defaultAnchor - GROUP: id = content-divider - label = null - children = 0 - style-id = null - GROUP: id = bottom-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = bottom-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -PAGE id = samples ----------- - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/samples.css - alt-style = file:/<filtered>/samples.properties - style-id = page - page styles are = file:/<filtered>/samples.css - file:/<filtered>/samples.css - - page alt-styles are = file:/<filtered>/swt.properties from org.eclipse.jdt - file:/<filtered>/swt.properties from org.eclipse.pde - - page children = 7 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = extra-group1 - label = null - children = 0 - style-id = null - GROUP: id = navigation-links - label = null - children = 2 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = null - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left nav_link1 - LINK: id = tutorials - label = Tutorials - text = null - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left nav_link2 - LINK: id = samples - label = Samples - text = null - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right nav_link3 - LINK: id = whatsnew - label = What's New - text = null - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right nav_link4 - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = null - GROUP: id = page-content - label = null - children = 8 - style-id = null - GROUP: id = content-header - label = SAMPLES - children = 0 - style-id = null - TEXT: id = page-title - text = Samples - style-id = page-title - TEXT: id = page-description - text = Explore Eclipse by installing prefabricated samples (may require Internet connection). - style-id = page-description - GROUP: id = top-left - label = null - children = 3 - style-id = null - GROUP: id = workbench - label = WORKBENCH - children = 6 - style-id = content-group - TEXT: id = null - text = The following samples demonstrate how to tightly integrate into the Eclipse workbench. - style-id = group-description - LINK: id = multi-page-editor - label = Multi-page editor - text = Shows how to create an editor with multiple pages - url = http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.pde.ui&class=org.eclipse.pde.internal.ui.samples.ShowSampleAction&id=org.eclipse.sdk.samples.multipageeditor - style-id = content-link - LINK: id = property-sheet - label = Property sheet and outline - text = Demonstrates how to use property sheet and outline views - url = http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.pde.ui&class=org.eclipse.pde.internal.ui.samples.ShowSampleAction&id=org.eclipse.sdk.samples.propertysheet - style-id = content-link - LINK: id = readmetool - label = Readme tool - text = Shows how to create your own extension points - url = http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.pde.ui&class=org.eclipse.pde.internal.ui.samples.ShowSampleAction&id=org.eclipse.sdk.samples.readmetool - style-id = content-link - ANCHOR: id = jdtAnchor - ANCHOR: id = workbenchGroupAnchor - ANCHOR: id = org.eclipse.pde.workbench - ANCHOR: id = defaultAnchor - GROUP: id = top-right - label = null - children = 5 - style-id = null - GROUP: id = jdt - label = JDT - children = 2 - style-id = content-group - TEXT: id = null - text = Add the blurb about JDT samples here. - style-id = group-description - LINK: id = java-editor - label = Java editor - text = Demonstrates standard features available to custom text editors - url = http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.pde.ui&class=org.eclipse.pde.internal.ui.samples.ShowSampleAction&id=org.eclipse.sdk.samples.javaeditor - style-id = content-link - ANCHOR: id = org.eclipse.jdt - GROUP: id = swt - label = SWT - children = 3 - style-id = content-group - TEXT: id = null - text = Run SWT samples using either the standalone SWT launcher or as an integrated workbench view. - style-id = group-description - LINK: id = swt-examples - label = Workbench views and standalone applications - text = The SWT Example launcher will allow you to launch a collection of SWT examples. Some of the examples can be run independent of the eclipse platform and others will be available as views inside the workbench. - url = http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.pde.ui&class=org.eclipse.pde.internal.ui.samples.ShowSampleAction&id=org.eclipse.sdk.samples.swt.examples - style-id = content-link - ANCHOR: id = swtGroupAnchor - ANCHOR: id = org.eclipse.pde.swt - ANCHOR: id = defaultAnchor - GROUP: id = content-divider - label = null - children = 0 - style-id = null - GROUP: id = bottom-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = bottom-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -PAGE id = whatsnew ----------- - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/whatsnew.css - alt-style = file:/<filtered>/whatsnew.properties - style-id = page - page styles are = file:/<filtered>/news.css - file:/<filtered>/whatsnew.css - - page alt-styles are = file:/<filtered>/swt.properties from org.eclipse.pde - file:/<filtered>/whatsnew.properties from org.eclipse.platform - - page children = 7 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = extra-group1 - label = null - children = 0 - style-id = null - GROUP: id = navigation-links - label = null - children = 2 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = null - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left nav_link1 - LINK: id = tutorials - label = Tutorials - text = null - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left nav_link2 - LINK: id = samples - label = Samples - text = null - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right nav_link3 - LINK: id = whatsnew - label = What's New - text = null - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right nav_link4 - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = null - GROUP: id = page-content - label = null - children = 7 - style-id = null - GROUP: id = content-header - label = WHAT'S NEW - children = 0 - style-id = null - TEXT: id = page-title - text = What's New - style-id = page-title - GROUP: id = top-left - label = null - children = 7 - style-id = null - GROUP: id = content-group - label = null - children = 1 - style-id = content-group - LINK: id = platform-noteworthy - label = Eclipse Platform - text = Find out about the major new features in this release - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html&embedTarget=page-content - style-id = content-link - ANCHOR: id = org.eclipse.ui.workbench.news - GROUP: id = content-group - label = null - children = 1 - style-id = content-group - LINK: id = jdt-noteworthy - label = Java development tools - text = Find out about significant changes made to the Java development tools - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html&embedTarget=page-content - style-id = content-link - ANCHOR: id = org.eclipse.jdt - GROUP: id = content-group - label = null - children = 1 - style-id = content-group - LINK: id = pde-noteworthy - label = Plug-in Development Environment - text = Learn about significant changes made to PDE for this release - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.pde.doc.user/whatsNew/pde_whatsnew.htm&embedTarget=page-content - style-id = content-link - ANCHOR: id = org.eclipse.pde.changes - ANCHOR: id = defaultAnchor - GROUP: id = top-right - label = null - children = 3 - style-id = null - GROUP: id = content-group - label = null - children = 3 - style-id = content-group - LINK: id = updates - label = New Updates - text = Get the latest updates from Eclipse.org - url = http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.platform&class=org.eclipse.platform.internal.LaunchUpdateIntroAction - style-id = content-link - LINK: id = eclipse - label = Eclipse community - text = Join the community, read articles and news on Eclipse.org - url = http://www.eclipse.org - style-id = content-link - GROUP: id = rss-news - label = LATEST NEWS - children = 1 - style-id = null - CONTENT PROVIDER: id = rss-viewer - class = org.eclipse.platform.internal.EclipseRSSViewer - pluginId = org.eclipse.platform - ANCHOR: id = org.eclipse.ui.workbench - ANCHOR: id = defaultAnchor - GROUP: id = content-divider - label = null - children = 0 - style-id = null - GROUP: id = bottom-left - label = null - children = 3 - style-id = null - GROUP: id = content-group - label = null - children = 1 - style-id = content-group - LINK: id = migration - label = Migration from the previous release - text = Learn what you need to do to make your old code work in Eclipse 3.1 - url = http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.platform.doc.isv/porting/eclipse_3_1_porting_guide.html&embedTarget=page-content - style-id = content-link - ANCHOR: id = org.eclipse.pde.migration - ANCHOR: id = defaultAnchor - GROUP: id = bottom-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -PAGE id = firststeps ----------- - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/firststeps.css - alt-style = file:/<filtered>/firststeps.properties - style-id = page - page styles are = - page alt-styles are = - page children = 7 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = extra-group1 - label = null - children = 0 - style-id = null - GROUP: id = navigation-links - label = null - children = 2 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = null - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left nav_link1 - LINK: id = tutorials - label = Tutorials - text = null - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left nav_link2 - LINK: id = samples - label = Samples - text = null - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right nav_link3 - LINK: id = whatsnew - label = What's New - text = null - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right nav_link4 - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = null - GROUP: id = page-content - label = null - children = 7 - style-id = null - GROUP: id = content-header - label = FIRST STEPS - children = 0 - style-id = null - TEXT: id = page-title - text = First Steps - style-id = page-title - GROUP: id = top-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = top-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = content-divider - label = null - children = 0 - style-id = null - GROUP: id = bottom-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = bottom-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -PAGE id = webresources ----------- - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/webresources.css - alt-style = file:/<filtered>/webresources.properties - style-id = page - page styles are = - page alt-styles are = - page children = 7 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = extra-group1 - label = null - children = 0 - style-id = null - GROUP: id = navigation-links - label = null - children = 2 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = null - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left nav_link1 - LINK: id = tutorials - label = Tutorials - text = null - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left nav_link2 - LINK: id = samples - label = Samples - text = null - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right nav_link3 - LINK: id = whatsnew - label = What's New - text = null - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right nav_link4 - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = null - GROUP: id = page-content - label = null - children = 7 - style-id = null - GROUP: id = content-header - label = WEB RESOURCES - children = 0 - style-id = null - TEXT: id = page-title - text = Web Resources - style-id = page-title - GROUP: id = top-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = top-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = content-divider - label = null - children = 0 - style-id = null - GROUP: id = bottom-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = bottom-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -PAGE id = migrate ----------- - title = Welcome to Eclipse 3.2 - style = file:/<filtered>/migrate.css - alt-style = file:/<filtered>/migrate.properties - style-id = page - page styles are = - page alt-styles are = - page children = 7 - - TITLE: id = null - title = Welcome to Eclipse 3.2 - style-id = intro-header - GROUP: id = extra-group1 - label = null - children = 0 - style-id = null - GROUP: id = navigation-links - label = null - children = 2 - style-id = null - GROUP: id = page-links - label = null - children = 4 - style-id = null - LINK: id = overview - label = Overview - text = null - url = http://org.eclipse.ui.intro/showPage?id=overview - style-id = left nav_link1 - LINK: id = tutorials - label = Tutorials - text = null - url = http://org.eclipse.ui.intro/showPage?id=tutorials - style-id = left nav_link2 - LINK: id = samples - label = Samples - text = null - url = http://org.eclipse.ui.intro/showPage?id=samples - style-id = right nav_link3 - LINK: id = whatsnew - label = What's New - text = null - url = http://org.eclipse.ui.intro/showPage?id=whatsnew - style-id = right nav_link4 - GROUP: id = action-links - label = null - children = 1 - style-id = null - LINK: id = workbench - label = Workbench - text = Go to the workbench - url = http://org.eclipse.ui.intro/switchToLaunchBar - style-id = null - GROUP: id = page-content - label = null - children = 7 - style-id = null - GROUP: id = content-header - label = MIGRATE - children = 0 - style-id = null - TEXT: id = page-title - text = Migrate - style-id = page-title - GROUP: id = top-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = top-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = content-divider - label = null - children = 0 - style-id = null - GROUP: id = bottom-left - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = bottom-right - label = null - children = 1 - style-id = null - ANCHOR: id = defaultAnchor - GROUP: id = extra-group2 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group3 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - GROUP: id = extra-group4 - label = null - children = 1 - style-id = null - ANCHOR: id = anchor - -Model Flag Tests: ----------------- - First page children are: - Groups: 6 - Links: 0 - Texts: 0 - HTMLs: 0 - Images: 0 - Includes: 0 - Page Titles: 1 - Page Heads: 0 - Model Elements: 7 - Containers: 6 - All Pages: 0 - Anchors: 0 - Content providers: 0 - Elements with Text child(AbstractTextElemets): 0 - Groups and Links: 6 diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/context/ParserTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/context/ParserTest.java index f6c769f38..0f0dc8f8e 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/context/ParserTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/context/ParserTest.java @@ -57,7 +57,7 @@ public class ParserTest extends TestCase { String relativePath = file.getHref(); try { - String expected = FileUtil.getResultFileContents(bundle, relativePath); + String expected = FileUtil.getContents(bundle, FileUtil.getResultFile(relativePath)); String actual = ContextModelSerializer.serialize(contexts); Assert.assertEquals("Serialized context help model for " + relativePath + " did not match the expected result", expected, actual); } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/producer/DynamicContentTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/producer/DynamicContentTest.java index ad0a62e83..416e8c2bc 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/producer/DynamicContentTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/producer/DynamicContentTest.java @@ -22,6 +22,7 @@ import org.eclipse.help.IToc; import org.eclipse.help.ITopic; import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; import org.eclipse.ua.tests.util.FileUtil; +import org.eclipse.ua.tests.util.XHTMLUtil; import org.osgi.framework.Bundle; /* @@ -49,8 +50,9 @@ public class DynamicContentTest extends TestCase { Bundle bundle = UserAssistanceTestPlugin.getDefault().getBundle(); try { - String expected = FileUtil.getResultFileContents(bundle, relativePath); + String expected = FileUtil.getContents(bundle, FileUtil.getResultFile(relativePath)); String actual = FileUtil.readString(HelpSystem.getHelpContent(href)); + actual = XHTMLUtil.removeEnvironmentSpecificContent(actual); Assert.assertEquals("Processed file " + relativePath + " did not match the expected result", expected, actual); } catch(IOException e) { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java index 2bdb831fa..d8ede3fcf 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java @@ -65,7 +65,7 @@ public class ParserTest extends TestCase { */ if (relativePath.startsWith("data/help/toc/")) { try { - String expected = FileUtil.getResultFileContents(bundle, relativePath); + String expected = FileUtil.getContents(bundle, FileUtil.getResultFile(relativePath)); String actual = TocModelSerializer.serialize(toc); Assert.assertEquals("Serialized toc model for " + relativePath + " did not match the expected result", expected, actual); } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializer.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializer.java index 4832afe55..74fc2de92 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializer.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializer.java @@ -39,7 +39,7 @@ public class ContextModelSerializer { buf.append(serializeAux(entry, indent + " ")); } - buf.append(indent + "</contexts>\n"); + buf.append(indent + "</contexts>"); return buf.toString(); } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializerTest.java index 429af6c4f..d540b15b8 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializerTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ContextModelSerializerTest.java @@ -11,6 +11,7 @@ package org.eclipse.ua.tests.help.util; import java.io.FileOutputStream; +import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; @@ -31,11 +32,11 @@ import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; import org.eclipse.ua.tests.util.FileUtil; /* - * A utility for regenerating the _serialized.txt files that contain the expected - * output for the context content when serialized. This reads all the context content + * A utility for regenerating the _expected.txt files that contain the expected + * result for the context model when serialized. This reads all the context content * from the plugin manifest (for this test plugin only), constructs the model, then * serializes the model to a text file, which is stored in the same directory as the - * intro xml file, as <original_name>_serialized.txt. + * intro xml file, as <original_name>_expected.txt. * * These files are used by the JUnit tests to compare the result with the expected * result. @@ -46,13 +47,6 @@ import org.eclipse.ua.tests.util.FileUtil; * 2. Right-click in "Package Explorer -> Refresh". * * The new files should appear. - * - * Note: Some of the files have os, ws, and arch appended, for example - * <original_name>_serialized_linux_gtk_x86.txt. These are filtering tests that have - * filters by os/ws/arch so the result is different on each combination. This test will - * only generate the _serialized file and will be the one for the current platform. You - * need to make one copy for each combination and edit the files manually to have the - * correct content (or generate on each platform). */ public class ContextModelSerializerTest extends TestCase { @@ -71,7 +65,7 @@ public class ContextModelSerializerTest extends TestCase { HelpUIPlugin.getDefault(); } - public void testRunSerializer() { + public void testRunSerializer() throws IOException { Iterator iter = getContextFiles().iterator(); while (iter.hasNext()) { ContextsFile file = (ContextsFile)iter.next(); @@ -84,14 +78,9 @@ public class ContextModelSerializerTest extends TestCase { String absolutePath = pluginRoot + relativePath; String resultFile = FileUtil.getResultFile(absolutePath); - try { - PrintWriter out = new PrintWriter(new FileOutputStream(resultFile)); - out.print(ContextModelSerializer.serialize(contexts)); - out.close(); - } - catch (Exception e) { - e.printStackTrace(); - } + PrintWriter out = new PrintWriter(new FileOutputStream(resultFile)); + out.print(ContextModelSerializer.serialize(contexts)); + out.close(); } } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java index 98cb05d6e..19e13d9cb 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java @@ -22,13 +22,15 @@ import org.eclipse.help.IToc; import org.eclipse.help.ITopic; import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; import org.eclipse.ua.tests.util.FileUtil; +import org.eclipse.ua.tests.util.XHTMLUtil; /* - * A utility for regenerating the _serialized.txt files that contain the expected - * output for the producer content when serialized. This reads all the TOC content - * from data/help/producer, passes it through the dynamic content producer, then - * stores the result in a text file, which is stored in the same directory as the - * original xhtml file, as <original_name>_serialized.txt. + * A utility for regenerating the _expected.txt files that contain the + * expected result for the producer content model when serialized. + * This reads all the TOC content from data/help/producer, passes it + * through the dynamic content producer, then stores the result in a + * text file, which is stored in the same directory as the original + * xhtml file, as <original_name>_expected.txt. * * These files are used by the JUnit tests to compare the result with the expected * result. @@ -63,15 +65,11 @@ public class ProducerSerializerTest extends TestCase { String absolutePath = pluginRoot + relativePath; String resultFile = FileUtil.getResultFile(absolutePath); - try { - PrintWriter out = new PrintWriter(new FileOutputStream(resultFile)); - out.print(FileUtil.readString(HelpSystem.getHelpContent(href))); - out.close(); - } - catch (Exception e) { - e.printStackTrace(); - throw e; - } + PrintWriter out = new PrintWriter(new FileOutputStream(resultFile)); + String output = FileUtil.readString(HelpSystem.getHelpContent(href)); + output = XHTMLUtil.removeEnvironmentSpecificContent(output); + out.print(output); + out.close(); } } } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializer.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializer.java index c61e7f157..ad7b4a0c8 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializer.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializer.java @@ -37,7 +37,7 @@ public class TocModelSerializer { buf.append(serializeAux(topics[i], indent + " ")); } - buf.append(indent + "</toc>\n"); + buf.append(indent + "</toc>"); return buf.toString(); } return EMPTY_STRING; diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java index 136f68237..4a931a0fb 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java @@ -11,6 +11,7 @@ package org.eclipse.ua.tests.help.util; import java.io.FileOutputStream; +import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; @@ -33,11 +34,11 @@ import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; import org.eclipse.ua.tests.util.FileUtil; /* - * A utility for regenerating the _serialized.txt files that contain the expected - * output for the TOC content when serialized. This reads all the TOC content from + * A utility for regenerating the _expected.txt files that contain the expected + * result for the TOC model when serialized. This reads all the TOC content from * the plugin manifest (for this test plugin only), constructs the model, then * serializes the model to a text file, which is stored in the same directory as the - * intro xml file, as <original_name>_serialized.txt. + * TOC xml file, as <original_name>_expected.txt. * * These files are used by the JUnit tests to compare the result with the expected * result. @@ -48,13 +49,6 @@ import org.eclipse.ua.tests.util.FileUtil; * 2. Right-click in "Package Explorer -> Refresh". * * The new files should appear. - * - * Note: Some of the files have os, ws, and arch appended, for example - * <original_name>_serialized_linux_gtk_x86.txt. These are filtering tests that have - * filters by os/ws/arch so the result is different on each combination. This test will - * only generate the _serialized file and will be the one for the current platform. You - * need to make one copy for each combination and edit the files manually to have the - * correct content (or generate on each platform). */ public class TocModelSerializerTest extends TestCase { @@ -73,7 +67,7 @@ public class TocModelSerializerTest extends TestCase { HelpUIPlugin.getDefault(); } - public void testRunSerializer() { + public void testRunSerializer() throws IOException { Collection tocFiles = getTocFiles(); TocBuilder builder = new TocBuilder(); builder.build(tocFiles); @@ -89,17 +83,15 @@ public class TocModelSerializerTest extends TestCase { String absolutePath = pluginRoot + relativePath; String resultFile = FileUtil.getResultFile(absolutePath); - try { - PrintWriter out = new PrintWriter(new FileOutputStream(resultFile)); - out.print(TocModelSerializer.serialize(toc)); - out.close(); - } - catch (Exception e) { - e.printStackTrace(); - } + PrintWriter out = new PrintWriter(new FileOutputStream(resultFile)); + out.print(TocModelSerializer.serialize(toc)); + out.close(); } } + /** + * Find all the TOC files to use for this test. + */ public static Collection getTocFiles() { Collection tocFiles = new ArrayList(); IExtensionPoint xpt = Platform.getExtensionRegistry().getExtensionPoint(HelpPlugin.PLUGIN_ID, "toc"); @@ -110,11 +102,14 @@ public class TocModelSerializerTest extends TestCase { IConfigurationElement[] configElements = extensions[i].getConfigurationElements(); for (int j=0;j<configElements.length;j++) { if (configElements[j].getName().equals("toc")) { + // only get files in data/help/toc/ String href = configElements[j].getAttribute("file"); //$NON-NLS-1$ - boolean isPrimary = "true".equals(configElements[j].getAttribute("primary")); //$NON-NLS-1$ - String extraDir = configElements[j].getAttribute("extradir"); //$NON-NLS-1$ - String categoryId = configElements[j].getAttribute("category"); //$NON-NLS-1$ - tocFiles.add(new TocFile(pluginId, href, isPrimary, Platform.getNL(), extraDir, categoryId)); + if (href.startsWith("data/help/toc/")) { + boolean isPrimary = "true".equals(configElements[j].getAttribute("primary")); //$NON-NLS-1$ + String extraDir = configElements[j].getAttribute("extradir"); //$NON-NLS-1$ + String categoryId = configElements[j].getAttribute("category"); //$NON-NLS-1$ + tocFiles.add(new TocFile(pluginId, href, isPrimary, Platform.getNL(), extraDir, categoryId)); + } } } } diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java index fc727b468..c6b380f90 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java @@ -29,8 +29,6 @@ public class AllParserTests extends TestSuite { * Constructs a new test suite. */ public AllParserTests() { - // re-enable once universal welcome stabilizes - //addTest(PlatformTest.suite()); addTest(ValidTest.suite()); } } diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java deleted file mode 100644 index 7c4ed8668..000000000 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 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.ua.tests.intro.parser; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.StringTokenizer; - -import junit.framework.Assert; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.Platform; -import org.eclipse.ua.tests.intro.util.IntroModelSerializer; -import org.eclipse.ua.tests.intro.util.IntroModelSerializerTest; -import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; -import org.eclipse.ua.tests.util.FileUtil; -import org.eclipse.ua.tests.util.ResourceFinder; -import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot; -import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager; -import org.osgi.framework.Bundle; - -/* - * Tests the intro parser on valid intro content. - */ -public class PlatformTest extends TestCase { - - private static final String SERIALIZED_PATH = "data/intro/platform/serialized.txt"; - - /* - * Returns an instance of this Test. - */ - public static Test suite() { - return new TestSuite(PlatformTest.class); - } - - /* - * Test the platform's parsed intro content. - */ - public void testModel() { - final String INTRO_CONFIG_ID = "org.eclipse.ui.intro.universalConfig"; - IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.ui.intro.config"); - IConfigurationElement element = null; - for (int i=0;i<elements.length;++i) { - if (elements[i] != null) { - if (INTRO_CONFIG_ID.equals(elements[i].getAttribute("id"))) { - element = elements[i]; - } - } - } - Assert.assertNotNull("Could not find the \"org.eclipse.ui.intro.config\" extension with the id \"" + INTRO_CONFIG_ID + "\".", element); - - String pluginRoot = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(), "/").toString().substring("file:".length()); - String content = element.getAttribute("content"); - String id = element.getAttribute("id"); - String resultFile = pluginRoot + SERIALIZED_PATH; - - IntroModelRoot model = ExtensionPointManager.getInst().getModel(id); - IntroModelSerializer serializer = new IntroModelSerializer(model); - - try { - String expected = FileUtil.getContents(resultFile); - String actual = serializer.toString(); - StringTokenizer tok1 = new StringTokenizer(expected, "\n"); - StringTokenizer tok2 = new StringTokenizer(actual, "\n"); - - /* - * Report the line number and line text where it didn't match, - * as well as the extension id and expected results file. - */ - int tokenNumber = 0; - while (tok1.hasMoreTokens() && tok2.hasMoreTokens()) { - String a = tok1.nextToken(); - String b = tok2.nextToken(); - Assert.assertEquals("Serialized intro content model text for \"" + id + "\" did not match expected result (" + IntroModelSerializerTest.getResultFile(content) + "). First difference occured on token " + tokenNumber + ".", a, b); - ++tokenNumber; - } - } - catch(Exception e) { - Assert.fail("An error occured while loading expected result file for intro at: " + resultFile); - } - } - - /* - * Some extensions run samples that involve executing code. Check to make sure - * that the classes exist and can be instantiated. - */ - public void testClasses() { - String pluginRoot = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(), "/").toString().substring("file:".length()); - String resultFile = pluginRoot + SERIALIZED_PATH; - - try { - String contents = FileUtil.getContents(resultFile); - StringTokenizer tok = new StringTokenizer(contents); - while (tok.hasMoreTokens()) { - String next = tok.nextToken(); - if (next.startsWith("http://org.eclipse.ui.intro/runAction?")) { - Map map = createMap(next.substring("http://org.eclipse.ui.intro/runAction?".length())); - Assert.assertTrue("The runAction was missing the class attribute: " + next, map.containsKey("class")); - Assert.assertTrue("The runAction was missing the pluginId attribute: " + next, map.containsKey("pluginId")); - - String clazz = (String)map.get("class"); - String pluginId = (String)map.get("pluginId"); - - Bundle bundle = Platform.getBundle(pluginId); - Assert.assertNotNull("The plugin referenced in one of the platform's intro runAction URLs (" + next + ") was not found: " + pluginId, bundle); - - try { - Class c = bundle.loadClass(clazz); - c.newInstance(); - } - catch (ClassNotFoundException e) { - Assert.fail("One of the classes in the platform's intro runActions URLs was not found: " + clazz + " in plugin: " + pluginId); - } - catch (InstantiationException e) { - Assert.fail("One of the classes in the platform's intro runActions URLs could not be instantiated: " + clazz + " in plugin: " + pluginId); - } - catch (IllegalAccessException e) { - Assert.fail("One of the classes in the platform's intro runActions URLs could not be accessed (is it public?): " + clazz + " in plugin: " + pluginId); - } - } - } - } - catch (IOException e) { - Assert.fail("An IOException occured while reading platform's serialized.txt file"); - } - } - - /* - * Generates a map from the given string of the form: - * "key1=value1&key2=value2&..." (i.e. URL parameters) - */ - private static Map createMap(String args) { - Map map = new HashMap(); - StringTokenizer tok2 = new StringTokenizer(args, "&"); - while (tok2.hasMoreTokens()) { - String arg = tok2.nextToken(); - int separator = arg.indexOf('='); - map.put(arg.substring(0, separator), arg.substring(separator + 1)); - } - return map; - } -} diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java index a453772bf..d33d7fd7e 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2005, 2006 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 @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.ua.tests.intro.parser; +import java.io.IOException; import java.util.Iterator; import java.util.Map; @@ -50,11 +51,12 @@ public class ValidTest extends TestCase { } /* - * Test valid intro content. This goes through all the test intro content (xml files and - * xhtml files) and serializes them using the IntroModelSerializer, then compares the result - * of the serialization with the expected content (the _serialized.txt files). + * Test valid intro content. This goes through all the test intro content + * (xml files and xhtml files) and serializes them using the + * IntroModelSerializer, then compares the result of the serialization + * with the expected result (the _expected.txt files). */ - public void testParserValid() { + public void testParserValid() throws IOException { IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.ui.intro.config"); for (int i=0;i<elements.length;++i) { /* @@ -68,36 +70,9 @@ public class ValidTest extends TestCase { IntroModelRoot model = ExtensionPointManager.getInst().getModel(id); IntroModelSerializer serializer = new IntroModelSerializer(model); - /* - * Try [filename]_serialized_os_ws_arch.txt. If it's not there, try - * [filename]_serialized.txt. - * - * We use different files for os/ws/arch combinations in order to test dynamic content, - * specifically filtering. Some of the files have filters by os, ws, and arch so the - * result is different on each combination. - */ - String contents = null; - try { - contents = FileUtil.getContents(bundle, IntroModelSerializerTest.getResultFile(content, true)); - } - catch(Exception e) { - // didn't find the _serialized_os_ws_arch.txt file, try just _serialized.txt - } - if (contents == null) { - try { - contents = FileUtil.getContents(bundle, IntroModelSerializerTest.getResultFile(content)); - } - catch(Exception e) { - Assert.fail("An error occured while loading expected result file for intro XML for: " + content); - } - } - /* - * Do a fuzzy match. Ignore all whitespace then compare. This is to avoid platform - * specific newlines, etc. - */ - String expected = contents.replaceAll("[ \t\n\r]", ""); - String actual = serializer.toString().replaceAll("[ \t\n\r]", "");; - Assert.assertEquals("The serialization generated for intro did not match the expected result for: " + id, expected, actual); + String expected = FileUtil.getContents(bundle, FileUtil.getResultFile(content)); + String actual = serializer.toString(); + Assert.assertEquals("The model parsed for intro did not match the expected result for: " + id, expected, actual); Map map = IntroModelSerializerTest.getXHTMLFiles(model); Iterator iter = map.entrySet().iterator(); @@ -105,36 +80,8 @@ public class ValidTest extends TestCase { Map.Entry entry = (Map.Entry)iter.next(); String relativePath = (String)entry.getKey(); - /* - * Try [filename]_serialized_os_ws_arch.txt. If it's not there, try - * [filename]_serialized.txt. - * - * We use different files for os/ws/arch combinations in order to test dynamic content, - * specifically filtering. Some of the files have filters by os, ws, and arch so the - * result is different on each combination. - */ - contents = null; - try { - contents = FileUtil.getContents(bundle, IntroModelSerializerTest.getResultFile(relativePath, true)); - } - catch(Exception e) { - // didn't find the _serialized_os_ws_arch.txt file, try just _serialized.txt - } - if (contents == null) { - try { - contents = FileUtil.getContents(bundle, IntroModelSerializerTest.getResultFile(relativePath)); - } - catch(Exception e) { - Assert.fail("An error occured while loading expected result file for intro XHTML for: " + relativePath); - } - } - - /* - * Do a fuzzy match. Ignore all whitespace then compare.. the XML transformers - * seem to add whitespace to the resulting XML string differently. - */ - expected = contents.replaceAll("[ \t\n\r]", ""); - actual = ((String)entry.getValue()).replaceAll("[ \t\n\r]", "");; + expected = FileUtil.getContents(bundle, FileUtil.getResultFile(relativePath)); + actual = (String)entry.getValue(); Assert.assertEquals("The XHTML generated for intro did not match the expected result for: " + relativePath, expected, actual); } } diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java index 5f451708f..43b0cb1b7 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java @@ -65,7 +65,7 @@ public class IntroModelSerializer { } private void printModelRootInfo(IntroModelRoot model, StringBuffer text) { - text.append("\nIntro Model Content:"); //$NON-NLS-1$ + text.append("Intro Model Content:"); //$NON-NLS-1$ text.append("\n======================"); //$NON-NLS-1$ text.append("\n\nModel has valid config = " + model.hasValidConfig()); //$NON-NLS-1$ text.append("\nPresentation type = " //$NON-NLS-1$ @@ -344,7 +344,6 @@ public class IntroModelSerializer { .getChildrenOfType(AbstractIntroElement.GROUP | AbstractIntroElement.LINK); text.append("\n\t\t\tGroups and Links: " + linksAndGroups.length); //$NON-NLS-1$ - text.append("\n"); //$NON-NLS-1$ } /** diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java index 00a955d98..a8264c6a0 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2004 IBM Corporation and others. + * Copyright (c) 2005, 2006 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 @@ -12,7 +12,6 @@ package org.eclipse.ua.tests.intro.util; import java.io.FileNotFoundException; import java.io.FileOutputStream; -import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; @@ -28,7 +27,8 @@ import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.Platform; import org.eclipse.help.ui.internal.HelpUIPlugin; import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin; -import org.eclipse.ua.tests.util.ResourceFinder; +import org.eclipse.ua.tests.util.FileUtil; +import org.eclipse.ua.tests.util.XHTMLUtil; import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPage; import org.eclipse.ui.internal.intro.impl.model.IntroHomePage; import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot; @@ -39,11 +39,11 @@ import org.eclipse.ui.intro.config.IIntroContentProvider; import org.eclipse.ui.intro.config.IIntroContentProviderSite; /* - * A utility for regenerating the _serialized.txt files that contain the expected - * output for the intro content when serialized. This reads all the intro content from + * A utility for regenerating the _expected.txt files that contain the expected + * output for the intro model when serialized. This reads all the intro content from * the plugin manifest (for this test plugin only), constructs the intro model, then * serializes the model to a text file, which is stored in the same directory as the - * intro xml file, as <original_name>_serialized.txt. + * intro xml file, as <original_name>_expected.txt. * * These files are used by the JUnit tests to compare the result with the expected * result. @@ -54,13 +54,6 @@ import org.eclipse.ui.intro.config.IIntroContentProviderSite; * 2. Right-click in "Package Explorer -> Refresh". * * The new files should appear. - * - * Note: Some of the files have os, ws, and arch appended, for example - * <original_name>_serialized_linux_gtk_x86.txt. These are filtering tests that have - * filters by os/ws/arch so the result is different on each combination. This test will - * only generate the _serialized file and will be the one for the current platform. You - * need to make one copy for each combination and edit the files manually to have the - * correct content (or generate on each platform). */ public class IntroModelSerializerTest extends TestCase { @@ -72,42 +65,19 @@ public class IntroModelSerializerTest extends TestCase { } /* - * Ensure that org.eclipse.help.ui is started. It contributes extra content - * filtering that is used by this test. See UIContentFilterProcessor. + * Ensure that org.eclipse.help.ui is started. It contributes extra + * content filtering that is used by this test. See + * UIContentFilterProcessor. */ protected void setUp() throws Exception { HelpUIPlugin.getDefault(); } - public void testRunSerializer() { - /* - * Serialize the SDK's intro. - */ - IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.ui.intro.config"); - for (int i=0;i<elements.length;++i) { - String id = elements[i].getAttribute("id"); - if ("org.eclipse.ui.intro.universalConfig".equals(id)) { - String pluginRoot = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(), "/").toString().substring("file:".length()); - - IntroModelRoot model = ExtensionPointManager.getInst().getModel(id); - IntroModelSerializer serializer = new IntroModelSerializer(model); - - try { - PrintWriter out = new PrintWriter(new FileOutputStream(pluginRoot + "data/intro/platform/serialized.txt")); - out.print(serializer.toString()); - out.close(); - } - catch (FileNotFoundException e) { - e.printStackTrace(); - } - break; - } - } - + public void testRunSerializer() throws FileNotFoundException { /* * Serialize the test intros. */ - elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.ui.intro.config"); + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.ui.intro.config"); for (int i=0;i<elements.length;++i) { /* * Only use the ones from this test plugin. @@ -123,69 +93,33 @@ public class IntroModelSerializerTest extends TestCase { IntroModelRoot model = ExtensionPointManager.getInst().getModel(id); IntroModelSerializer serializer = new IntroModelSerializer(model); - try { - String file = getResultFile(pluginRoot + content); - PrintWriter out = new PrintWriter(new FileOutputStream(file)); - out.print(serializer.toString()); - out.close(); - } - catch(FileNotFoundException e) { - e.printStackTrace(); - } + String file = FileUtil.getResultFile(pluginRoot + content); + PrintWriter out = new PrintWriter(new FileOutputStream(file)); + out.print(serializer.toString()); + out.close(); /* - * Now do the intro XHTML files. Find all the XHTML files referenced - * from the model. + * Now do the intro XHTML files. Find all the XHTML files + * referenced from the model. */ Map map = getXHTMLFiles(model); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry)iter.next(); - try { - String file = getResultFile(pluginRoot + entry.getKey()); - PrintWriter out = new PrintWriter(new FileOutputStream(file)); - out.print((String)entry.getValue()); - out.close(); - } - catch(IOException e) { - e.printStackTrace(); - } + file = FileUtil.getResultFile(pluginRoot + entry.getKey()); + out = new PrintWriter(new FileOutputStream(file)); + out.print((String)entry.getValue()); + out.close(); } } } } - - /* - * Generates a filename with path to the result file that will be generated - * for the intro xml referred to by the string. - */ - public static String getResultFile(String in) { - return getResultFile(in, false); - } - - /* - * Same as above, but gives the option of appending os, ws, and arch. For example, - * myfile_serialized_macosx_carbon_ppc.txt. - */ - public static String getResultFile(String in, boolean env) { - StringBuffer buf = new StringBuffer(); - buf.append(in.substring(0, in.lastIndexOf('.')) + "_serialized"); - if (env) { - buf.append('_'); - buf.append(Platform.getOS()); - buf.append('_'); - buf.append(Platform.getWS()); - buf.append('_'); - buf.append(Platform.getOSArch()); - } - buf.append(".txt"); - return buf.toString(); - } /* - * Search through the given model and find all XHTML files referred to by the model. - * Also loads the contents of the XHTML files. The result is a mapping of filenames relative - * to the test plugin to Strings, the contents of the XHTML files. + * Search through the given model and find all XHTML files referred to by + * the model. Also loads the contents of the XHTML files. The result is a + * mapping of filenames relative to the test plugin to Strings, the + * contents of the XHTML files. */ public static Map getXHTMLFiles(IntroModelRoot model) { Map map = new HashMap(); @@ -209,30 +143,13 @@ public class IntroModelSerializerTest extends TestCase { // dummy site } }); - xhtml = removeEnvironmentSpecificContent(xhtml); + xhtml = XHTMLUtil.removeEnvironmentSpecificContent(xhtml); + // filter windows-specific newline + xhtml = xhtml.replaceAll("\r", ""); + // ignore all beginning and ending whitespace + xhtml = xhtml.trim(); map.put(page.getInitialBase() + page.getRawContent(), xhtml); } return map; } - - /* - * Some of the XHTML content is environment-specific. This means it changes depending on - * the test machine, location on filesystem, etc. This content is not important for this - * test so just strip it out before comparing the serializations. - */ - private static String removeEnvironmentSpecificContent(String xhtml) { - /* - * The base tag is added before showing in browser. It contains an absolute path - * in filesystem. - */ - xhtml = xhtml.replaceAll("<base href=\".*\" />", ""); - - /* - * The order of the params for the meta tag comes out differently on different platforms. - * I'm not sure why, and why just this tag. We don't care about this one for our tests anyway, - * so just strip it. - */ - xhtml = xhtml.replaceAll("<meta .*/>", ""); - return xhtml; - } } diff --git a/org.eclipse.ua.tests/plugin.xml b/org.eclipse.ua.tests/plugin.xml index dd298f091..791c72ddd 100644 --- a/org.eclipse.ua.tests/plugin.xml +++ b/org.eclipse.ua.tests/plugin.xml @@ -243,7 +243,7 @@ <toc file="data/help/toc/extraContent/toc2.xml" primary="true"/> <toc file="data/help/toc/extraContent/simple_toc.xml" /> <toc file="data/help/search/toc.xml" primary="true"/> - <toc file="data/help/producer/toc.xml"/> + <toc file="data/help/producer/toc.xml" primary="true"/> </extension> <!-- diff --git a/org.eclipse.ua.tests/readme.txt b/org.eclipse.ua.tests/readme.txt index 7dc19a9df..237ab1fd8 100644 --- a/org.eclipse.ua.tests/readme.txt +++ b/org.eclipse.ua.tests/readme.txt @@ -2,8 +2,9 @@ About: ------ -This plugin contains automated tests for the User Assistance component of eclipse, except -help, which is in org.eclipse.help.tests. This includes cheatsheets and intro (welcome). +This plugin contains automated tests for the User Assistance component of eclipse, +except help, which is in org.eclipse.help.tests. This includes cheatsheets and +intro (welcome). Running the tests: ------------------ @@ -14,15 +15,19 @@ Running the tests: Updating model tests: --------------------- -There are two sets of parser tests which load a model in memory, then serialize to text. Then -it compares with a pre-generated serialization that is known to be correct (the _serialized.txt) -files. If changes are made to the model, both the serializer and the saved serializations must -be updated. There are two special JUnit tests that are not part of the suites that are used to -regenerate the serializations to test on: +There are several sets of parser tests which load a model in memory, then serialize +to text. Then it compares with a pre-generated serialization that is known to be +correct (the _expected.txt) files. If changes are made to the model, both the +serializer and the saved results must be updated. There are special JUnit tests that +are not part of the suites that are used to regenerate the result files to test on, +e.g: - org.eclipse.ua.tests.intro.util.IntroModelSerializerTest - org.eclipse.ua.tests.cheatsheet.util.CheatSheetModelSerializerTest -To regenerate the serializations, simply run the tests individually, then refresh your workspace -(it changes the files in the filesystem). It is done as a test because we want to ensure that -the environment is identical for the serializer and the test. +To regenerate the results, simply run the serializer tests individually, then +refresh your workspace (select folder, hit F5 - it changes the files in the +filesystem). + +Note: It is done as a test because we want to ensure that the environment is +identical for the serializer and the test. |