Revision: 6557 Author: rj...@google.com Date: Thu Oct 29 22:34:03 2009 Log: Merges tr...@6554, 6555, 6556 into releases/2.0 uibinder.sample -> uibinder.test, run parser tests, fix XMLElementTestWarnings svn merge --ignore-ancestry -r 6552:6556 https://google-web-toolkit.googlecode.com/svn/trunk .
http://code.google.com/p/google-web-toolkit/source/detail?r=6557 Added: /releases/2.0/user/test/com/google/gwt/uibinder/rebind/DocumentTestHelp.java /releases/2.0/user/test/com/google/gwt/uibinder/test Deleted: /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderTestModule.gwt.xml /releases/2.0/user/test/com/google/gwt/uibinder/sample /releases/2.0/user/test/com/google/gwt/uibinder/testing Modified: /releases/2.0/branch-info.txt /releases/2.0/user/src/com/google/gwt/uibinder/client/UiHandler.java /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderGwtSuite.java /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderJreSuite.java /releases/2.0/user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java Replaced: /releases/2.0/user/test/com/google/gwt/uibinder/test/UiBinderTestApp.gwt.xml /releases/2.0/user/test/com/google/gwt/uibinder/test/client /releases/2.0/user/test/com/google/gwt/uibinder/test/client/AnnotatedStrictLabel.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/ArbitraryPojo.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/ClickyLink.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/CssImportScopeSample.css /releases/2.0/user/test/com/google/gwt/uibinder/test/client/CssImportScopeSample.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/CssImportScopeSample.ui.xml /releases/2.0/user/test/com/google/gwt/uibinder/test/client/DomBasedUi.css /releases/2.0/user/test/com/google/gwt/uibinder/test/client/DomBasedUi.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/DomBasedUi.ui.xml /releases/2.0/user/test/com/google/gwt/uibinder/test/client/ExplicitElementPanel.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/ExplicitElementWidget.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/FakeBundle.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/FooLabel.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/HandlerDemo.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/HandlerDemo.ui.xml /releases/2.0/user/test/com/google/gwt/uibinder/test/client/Menu.css /releases/2.0/user/test/com/google/gwt/uibinder/test/client/MyDatePicker.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/MyEntities.ent /releases/2.0/user/test/com/google/gwt/uibinder/test/client/NeedlesslyAnnotatedLabel.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/PointlessRadioButtonSubclass.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/StrictLabel.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/UiBinderTestApp.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.css /releases/2.0/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml /releases/2.0/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUiExternal.css /releases/2.0/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUiExternalResources.java /releases/2.0/user/test/com/google/gwt/uibinder/test/client/down.png /releases/2.0/user/test/com/google/gwt/uibinder/test/client/heart.cur /releases/2.0/user/test/com/google/gwt/uibinder/test/client/prettyImage.png /releases/2.0/user/test/com/google/gwt/uibinder/test/client/right.png /releases/2.0/user/test/com/google/gwt/uibinder/test/public /releases/2.0/user/test/com/google/gwt/uibinder/test/public/UiBinderDemo.html ======================================= --- /dev/null +++ /releases/2.0/user/test/com/google/gwt/uibinder/rebind/DocumentTestHelp.java Thu Oct 29 22:34:03 2009 @@ -0,0 +1,52 @@ +/* + * Copyright 2007 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.uibinder.rebind; + +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +import java.io.ByteArrayInputStream; +import java.io.IOException; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +/** + * Support methods for testing uibinder. + */ +class DocumentTestHelp { + /** + * Creates an XML document model with the given contents. + * + * @param string the document contents + */ + public static Document documentForString(String string) + throws ParserConfigurationException, SAXException, IOException { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + factory.setExpandEntityReferences(true); + DocumentBuilder builder = factory.newDocumentBuilder(); + Document doc = builder.parse(new ByteArrayInputStream(string.getBytes())); + return doc; + } + + /** + * Not instantiable. + */ + private DocumentTestHelp() { + } +} ======================================= --- /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderTestModule.gwt.xml Wed Aug 5 20:27:52 2009 +++ /dev/null @@ -1,18 +0,0 @@ -<!-- --> -<!-- Copyright 2007 Google Inc. --> -<!-- Licensed under the Apache License, Version 2.0 (the "License"); you --> -<!-- may not use this file except in compliance with the License. You may --> -<!-- may obtain a copy of the License at --> -<!-- --> -<!-- http://www.apache.org/licenses/LICENSE-2.0 --> -<!-- --> -<!-- Unless required by applicable law or agreed to in writing, software --> -<!-- distributed under the License is distributed on an "AS IS" BASIS, --> -<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or --> -<!-- implied. License for the specific language governing permissions and --> -<!-- limitations under the License. --> - -<!-- UiBinder test support. --> -<module> - <inherits name="com.google.gwt.uibinder.sample.UiBinderDemo" /> -</module> ======================================= --- /releases/2.0/branch-info.txt Thu Oct 29 16:46:09 2009 +++ /releases/2.0/branch-info.txt Thu Oct 29 22:34:03 2009 @@ -126,3 +126,8 @@ tr...@6550, 6552 were merged into this branch Move UiBinder test app into user/test svn merge --ignore-ancestry -r 6549:6552 https://google-web-toolkit.googlecode.com/svn/trunk . + +tr...@6554, 6555, 6556 were merged into this branch + uibinder.sample -> uibinder.test, run parser tests, fix XMLElementTestWarnings + svn merge --ignore-ancestry -r 6552:6556 https://google-web-toolkit.googlecode.com/svn/trunk . + ======================================= --- /releases/2.0/user/src/com/google/gwt/uibinder/client/UiHandler.java Wed Aug 5 20:27:52 2009 +++ /releases/2.0/user/src/com/google/gwt/uibinder/client/UiHandler.java Thu Oct 29 22:34:03 2009 @@ -23,7 +23,7 @@ /** * Marks a method to be automatically bound as an event handler. See examples - * in {...@link com.google.gwt.uibinder.sample.client.HandlerDemo}. + * in {...@link com.google.gwt.uibinder.test.client.HandlerDemo}. * * <p>The annotation values must be declared in the "ui:field" * template attribute. ======================================= --- /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderGwtSuite.java Wed Oct 7 14:54:10 2009 +++ /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderGwtSuite.java Thu Oct 29 22:34:03 2009 @@ -16,7 +16,7 @@ package com.google.gwt.uibinder; import com.google.gwt.junit.tools.GWTTestSuite; -import com.google.gwt.uibinder.sample.client.UiBinderTest; +import com.google.gwt.uibinder.test.client.UiBinderTest; import junit.framework.Test; ======================================= --- /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderJreSuite.java Tue Oct 6 09:46:04 2009 +++ /releases/2.0/user/test/com/google/gwt/uibinder/UiBinderJreSuite.java Thu Oct 29 22:34:03 2009 @@ -15,6 +15,10 @@ */ package com.google.gwt.uibinder; +import com.google.gwt.uibinder.parsers.FieldReferenceConverterTest; +import com.google.gwt.uibinder.parsers.SimpleAttributeParserTest; +import com.google.gwt.uibinder.parsers.StrictAttributeParserTest; +import com.google.gwt.uibinder.parsers.StringAttributeParserTest; import com.google.gwt.uibinder.rebind.GwtResourceEntityResolverTest; import com.google.gwt.uibinder.rebind.HandlerEvaluatorTest; import com.google.gwt.uibinder.rebind.TokenatorTest; @@ -44,6 +48,12 @@ suite.addTestSuite(OwnerFieldClassTest.class); suite.addTestSuite(OwnerFieldTest.class); + // parsers + suite.addTestSuite(FieldReferenceConverterTest.class); + suite.addTestSuite(SimpleAttributeParserTest.class); + suite.addTestSuite(StrictAttributeParserTest.class); + suite.addTestSuite(StringAttributeParserTest.class); + return suite; } ======================================= --- /releases/2.0/user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java Tue Oct 13 10:44:52 2009 +++ /releases/2.0/user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java Thu Oct 29 22:34:03 2009 @@ -17,7 +17,6 @@ import com.google.gwt.core.ext.UnableToCompleteException; import com.google.gwt.uibinder.parsers.NullInterpreter; -import com.google.gwt.uibinder.testing.UiBinderTesting; import junit.framework.TestCase; @@ -109,14 +108,14 @@ private void init(final String domString) throws ParserConfigurationException, SAXException, IOException { - doc = UiBinderTesting.documentForString(domString); + doc = DocumentTestHelp.documentForString(domString); item = (Element) doc.getDocumentElement().getElementsByTagName("elm").item( 0); elm = new XMLElement(item, new UiBinderWriter()); } private void appendText(final String text) { - Text t = doc.createTextNode(STRING_WITH_DOUBLEQUOTE); + Text t = doc.createTextNode(text); item.appendChild(t); } @@ -130,13 +129,11 @@ assertEquals("", elm.consumeUnescapedInnerText()); } - public void testEmptyStringOnMissingAttribute() - throws ParserConfigurationException, SAXException, IOException { + public void testEmptyStringOnMissingAttribute() { assertEquals("", elm.consumeAttribute("fnord")); } - public void testIterator() throws ParserConfigurationException, SAXException, - IOException { + public void testIterator() { String[] expecteds = {"attr1", "attr2"}; Set<String> seen = new HashSet<String>(); for (int i = elm.getAttributeCount() - 1; i >= 0; i--) { @@ -152,7 +149,7 @@ } public void testNoEndTags() throws Exception { - Document doc = UiBinderTesting.documentForString("<doc><br/></doc>"); + Document doc = DocumentTestHelp.documentForString("<doc><br/></doc>"); Element item = (Element) doc.getDocumentElement().getElementsByTagName("br").item( 0); ======================================= --- /trunk/user/test/com/google/gwt/uibinder/test/client/down.png Thu Oct 29 21:43:40 2009 +++ /releases/2.0/user/test/com/google/gwt/uibinder/test/client/down.png Thu Oct 29 22:34:03 2009 Binary file, no diff available. ======================================= --- /trunk/user/test/com/google/gwt/uibinder/test/client/heart.cur Thu Oct 29 21:43:40 2009 +++ /releases/2.0/user/test/com/google/gwt/uibinder/test/client/heart.cur Thu Oct 29 22:34:03 2009 Binary file, no diff available. ======================================= --- /trunk/user/test/com/google/gwt/uibinder/test/client/prettyImage.png Thu Oct 29 21:43:40 2009 +++ /releases/2.0/user/test/com/google/gwt/uibinder/test/client/prettyImage.png Thu Oct 29 22:34:03 2009 Binary file, no diff available. ======================================= --- /trunk/user/test/com/google/gwt/uibinder/test/client/right.png Thu Oct 29 21:43:40 2009 +++ /releases/2.0/user/test/com/google/gwt/uibinder/test/client/right.png Thu Oct 29 22:34:03 2009 Binary file, no diff available. --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---