Revision: 8451
Author: fre...@google.com
Date: Fri Jul 30 15:19:42 2010
Log: Rolling back the following change due to failing tests
Add two new ClientBundle DataResource annotations:
1. @DoNotEmbed which allows a DataResource to be designated as not
embeddable
2. @MimeType(String) which allows a MIME Type to be specified for use in
embedded resources
While in the neighborhood, adding @Document to ClientBundle's @Source
annotation.
Also allow MIME Types with double quotes as per RFC 4281
e.g. video/3gpp2; codecs="sevc, s263"
Original changed reviewed at http://gwt-code-reviews.appspot.com/714801
Review by: unn...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8451
Deleted:
/trunk/user/test/com/google/gwt/resources/client/DataResourceDoNotEmbedTest.java
/trunk/user/test/com/google/gwt/resources/client/DataResourceMimeTypeTest.java
/trunk/user/test/com/google/gwt/resources/client/fourZeros.dat
Modified:
/trunk/user/src/com/google/gwt/resources/client/ClientBundle.java
/trunk/user/src/com/google/gwt/resources/client/DataResource.java
/trunk/user/src/com/google/gwt/resources/ext/ResourceContext.java
/trunk/user/src/com/google/gwt/resources/rebind/context/AbstractResourceContext.java
/trunk/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java
/trunk/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java
/trunk/user/src/com/google/gwt/resources/rebind/context/StaticResourceContext.java
/trunk/user/src/com/google/gwt/resources/rg/DataResourceGenerator.java
/trunk/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java
/trunk/user/test/com/google/gwt/resources/ResourcesSuite.java
/trunk/user/test/com/google/gwt/resources/rg/CssTestCase.java
=======================================
---
/trunk/user/test/com/google/gwt/resources/client/DataResourceDoNotEmbedTest.java
Fri Jul 30 13:05:05 2010
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2010 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.resources.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.junit.client.GWTTestCase;
-
-/**
- * Tests for <code>{...@link DataResource.DoNotEmbed @DoNotEmbed}</code>
resource
- * annotations.
- */
-public class DataResourceDoNotEmbedTest extends GWTTestCase {
-
- static interface Resources extends ClientBundle {
-
- /**
- * This is a binary file containing four 0x00 bytes, which is small
enough
- * to be embeddable, and contains insufficient information for a
- * determination of a recognizable MIME Type.
- */
- String FOUR_ZEROS_SOURCE = "fourZeros.dat";
-
- // Purposely missing a @DoNotEmbed annotation
- @Source(FOUR_ZEROS_SOURCE)
- DataResource resourceDoNotEmbedAnnotationMissing();
-
- @DataResource.DoNotEmbed
- @Source(FOUR_ZEROS_SOURCE)
- DataResource resourceDoNotEmbedAnnotationPresent();
- }
-
- /**
- * RFC 2397 data URL scheme
- */
- private static final String DATA_URL_SCHEME = "data:";
-
- @Override
- public String getModuleName() {
- return "com.google.gwt.resources.Resources";
- }
-
- public void testDoNotEmbedAnnotationMissingShouldEmbed() {
- Resources r = GWT.create(Resources.class);
- assertTrue(r.resourceDoNotEmbedAnnotationMissing().getUrl().startsWith(
- DATA_URL_SCHEME));
- }
-
- public void testDoNotEmbedAnnotationPresentShouldNotEmbed() {
- Resources r = GWT.create(Resources.class);
-
assertFalse(r.resourceDoNotEmbedAnnotationPresent().getUrl().startsWith(
- DATA_URL_SCHEME));
- }
-}
=======================================
---
/trunk/user/test/com/google/gwt/resources/client/DataResourceMimeTypeTest.java
Fri Jul 30 13:05:05 2010
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright 2010 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.resources.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.junit.client.GWTTestCase;
-
-/**
- * Tests for <code>{...@link DataResource.MimeType @MimeType}</code> resource
- * annotations.
- */
-public class DataResourceMimeTypeTest extends GWTTestCase {
-
- static interface Resources extends ClientBundle {
-
- /**
- * This is a binary file containing four 0x00 bytes, which is small
enough
- * to be embeddable, and contains insufficient information for a
- * determination of a recognizable MIME Type.
- */
- static final String FOUR_ZEROS_SOURCE = "fourZeros.dat";
-
- /**
- * Simple custom MIME Type.
- */
- static final String MIME_TYPE_AUDIO_OGG = "audio/ogg";
-
- static final String MIME_TYPE_WITH_CODECS = "audio/3gpp; codecs=samr";
-
- static final String MIME_TYPE_WITH_QUOTED_CODECS_LIST =
- "video/3gpp; codecs=\"s263, samr\"";
-
- // Purposely missing a @MimeType annotation
- @Source(FOUR_ZEROS_SOURCE)
- DataResource resourceMimeTypeNoAnnotation();
-
- @DataResource.MimeType(MIME_TYPE_AUDIO_OGG)
- @Source(FOUR_ZEROS_SOURCE)
- DataResource resourceMimeTypeAnnotationAudioOgg();
-
- @DataResource.MimeType(MIME_TYPE_WITH_CODECS)
- @Source(FOUR_ZEROS_SOURCE)
- DataResource resourceMimeTypeAnnotationWithCodecs();
-
- @DataResource.MimeType(MIME_TYPE_WITH_QUOTED_CODECS_LIST)
- @Source(FOUR_ZEROS_SOURCE)
- DataResource resourceMimeTypeAnnotationWithQuotedCodecsList();
- }
-
- @Override
- public String getModuleName() {
- return "com.google.gwt.resources.Resources";
- }
-
- public void testMimeTypeAnnotationMissingDefaultsToContentUnknown() {
- Resources r = GWT.create(Resources.class);
- assertEquals("data:content/unknown;base64,AAAAAA==",
- r.resourceMimeTypeNoAnnotation().getUrl());
- }
-
- public void testMimeTypeAnnotationOverridesDefaultMimeType() {
- Resources r = GWT.create(Resources.class);
- assertEquals("data:audio/ogg;base64,AAAAAA==",
- r.resourceMimeTypeAnnotationAudioOgg().getUrl());
- }
-
- public void testMimeTypeAnnotationWithCodecs() {
- Resources r = GWT.create(Resources.class);
- assertEquals("data:audio/3gpp; codecs=samr;base64,AAAAAA==",
- r.resourceMimeTypeAnnotationWithCodecs().getUrl());
- }
-
- public void testMimeTypeAnnotationWithQuotedCodecsList() {
- Resources r = GWT.create(Resources.class);
- assertEquals("data:video/3gpp; codecs=\"s263, samr\";base64,AAAAAA==",
- r.resourceMimeTypeAnnotationWithQuotedCodecsList().getUrl());
- }
-}
=======================================
--- /trunk/user/test/com/google/gwt/resources/client/fourZeros.dat Fri Jul
30 13:05:05 2010
+++ /dev/null
@@ -1,1 +0,0 @@
-
=======================================
--- /trunk/user/src/com/google/gwt/resources/client/ClientBundle.java Fri
Jul 30 13:05:05 2010
+++ /trunk/user/src/com/google/gwt/resources/client/ClientBundle.java Fri
Jul 30 15:19:42 2010
@@ -18,7 +18,6 @@
import com.google.gwt.resources.ext.ResourceGeneratorType;
import com.google.gwt.resources.rg.BundleResourceGenerator;
-import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -38,7 +37,6 @@
* Specifies the classpath location of the resource or resources
associated
* with the {...@link ResourcePrototype}.
*/
- @Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Source {
=======================================
--- /trunk/user/src/com/google/gwt/resources/client/DataResource.java Fri
Jul 30 13:05:05 2010
+++ /trunk/user/src/com/google/gwt/resources/client/DataResource.java Fri
Jul 30 15:19:42 2010
@@ -18,42 +18,11 @@
import com.google.gwt.resources.ext.ResourceGeneratorType;
import com.google.gwt.resources.rg.DataResourceGenerator;
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
/**
- * A non-text resource. Use {...@link MimeType} to provide MIME Types for
embedded
- * resources which may not be determined automatically at compile time. Use
- * {...@link DoNotEmbed} to prevent the resource from being embedded.
+ * A non-text resource.
*/
@ResourceGeneratorType(DataResourceGenerator.class)
public interface DataResource extends ResourcePrototype {
- /**
- * Specifies the resource or resources associated with the
- * {...@link ResourcePrototype} should not be embedded into the compiled
output.
- * This may be useful, for exmaple, when it a particular browser or
plugin is
- * unable to handle RFC 2397 data URLs.
- */
- @Documented
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.METHOD)
- public @interface DoNotEmbed {
- }
-
- /**
- * Specifies the MIME Type of the resource or resources associated with
the
- * {...@link ResourcePrototype}.
- */
- @Documented
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.METHOD)
- public @interface MimeType {
- String value();
- }
-
/**
* Retrieves a URL by which the contents of the resource can be
obtained. This
* will be an absolute URL.
=======================================
--- /trunk/user/src/com/google/gwt/resources/ext/ResourceContext.java Fri
Jul 30 13:05:05 2010
+++ /trunk/user/src/com/google/gwt/resources/ext/ResourceContext.java Fri
Jul 30 15:19:42 2010
@@ -31,10 +31,9 @@
* Depending on the optimizations made by the implementation of {...@link
#deploy},
* the resulting URL may or may not be compatible with standard
* {...@link com.google.gwt.http.client.RequestBuilder} / XMLHttpRequest
security
- * semantics. If the resource is intended to be used with XHR, or if there
are
- * other reasons why embedding the resource is undesirable such as known
- * incompatibilities, the <code>forceExternal</code> parameter should be
set to
- * <code>true</code> when invoking {...@link #deploy}.
+ * semantics. If the resource is intended to be used with XHR, the
+ * <code>xhrCompatible</code> paramater should be set to <code>true</code>
when
+ * invoking {...@link #deploy}.
* </p>
*/
public interface ResourceContext {
@@ -44,39 +43,18 @@
* compiled output. The return value of this method is a Java expression
which
* will evaluate to the location of the resource at runtime. The exact
format
* should not be depended upon.
- *
+ *
* @param suggestedFileName an unobfuscated filename to possibly use for
the
* resource
* @param mimeType the MIME type of the data being provided
* @param data the bytes to add to the output
- * @param forceExternal prevents embedding of the resource, e.g. in case
of
- * known incompatibilities or for example to enforce
compatibility
- * with security restrictions if the resource is intended to be
- * accessed via an XMLHttpRequest
+ * @param xhrCompatible enforces compatibility with security
restrictions if
+ * the resource is intended to be accessed via an
XMLHttpRequest.
* @return a Java expression which will evaluate to the location of the
- * provided resource at runtime
+ * provided resource at runtime.
*/
String deploy(String suggestedFileName, String mimeType, byte[] data,
- boolean forceExternal) throws UnableToCompleteException;
-
- /**
- * Cause a specific collection of bytes to be available in the program's
- * compiled output. The return value of this method is a Java expression
which
- * will evaluate to the location of the resource at runtime. The exact
format
- * should not be depended upon.
- *
- * @param resource the resource to add to the compiled output
- * @param forceExternal prevents embedding of the resource, e.g. in case
of
- * known incompatibilities or for example to enforce
compatibility
- * with security restrictions if the resource is intended to be
- * accessed via an XMLHttpRequest
- * @return a Java expression which will evaluate to the location of the
- * provided resource at runtime
- * @deprecated use {...@link #deploy(URL, String, boolean)} instead
- */
- @Deprecated
- String deploy(URL resource, boolean forceExternal)
- throws UnableToCompleteException;
+ boolean xhrCompatible) throws UnableToCompleteException;
/**
* Cause a specific collection of bytes to be available in the program's
@@ -85,15 +63,12 @@
* should not be depended upon.
*
* @param resource the resource to add to the compiled output
- * @param mimeType optional MIME Type to be used for an embedded resource
- * @param forceExternal prevents embedding of the resource, e.g. in case
of
- * known incompatibilities or for example to enforce
compatibility
- * with security restrictions if the resource is intended to be
- * accessed via an XMLHttpRequest
+ * @param xhrCompatible enforces compatibility with security
restrictions if
+ * the resource is intended to be accessed via an
XMLHttpRequest.
* @return a Java expression which will evaluate to the location of the
- * provided resource at runtime
+ * provided resource at runtime.
*/
- String deploy(URL resource, String mimeType, boolean forceExternal)
+ String deploy(URL resource, boolean xhrCompatible)
throws UnableToCompleteException;
/**
=======================================
---
/trunk/user/src/com/google/gwt/resources/rebind/context/AbstractResourceContext.java
Fri Jul 30 13:05:05 2010
+++
/trunk/user/src/com/google/gwt/resources/rebind/context/AbstractResourceContext.java
Fri Jul 30 15:19:42 2010
@@ -89,18 +89,13 @@
this.cache = getCache(context.getTypeOracle());
}
- @Deprecated
- public String deploy(URL resource, boolean forceExternal) throws
UnableToCompleteException {
- return deploy(resource, null, forceExternal);
- }
-
- public String deploy(URL resource, String mimeType, boolean
forceExternal)
+ public String deploy(URL resource, boolean xhrCompatible)
throws UnableToCompleteException {
String fileName = ResourceGeneratorUtil.baseName(resource);
byte[] bytes = Util.readURLAsBytes(resource);
try {
- String finalMimeType = (mimeType != null) ? mimeType :
resource.openConnection().getContentType();
- return deploy(fileName, finalMimeType, bytes, forceExternal);
+ return deploy(fileName, resource.openConnection().getContentType(),
+ bytes, xhrCompatible);
} catch (IOException e) {
getLogger().log(TreeLogger.ERROR,
"Unable to determine mime type of resource", e);
=======================================
---
/trunk/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java
Fri Jul 30 13:05:05 2010
+++
/trunk/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java
Fri Jul 30 15:19:42 2010
@@ -33,18 +33,18 @@
@Override
public String deploy(String suggestedFileName, String mimeType, byte[]
data,
- boolean forceExternal) throws UnableToCompleteException {
+ boolean xhrCompatible) throws UnableToCompleteException {
TreeLogger logger = getLogger();
// data: URLs are not compatible with XHRs on FF and Safari browsers
- if ((!forceExternal) && (data.length < MAX_INLINE_SIZE)) {
+ if ((!xhrCompatible) && (data.length < MAX_INLINE_SIZE)) {
logger.log(TreeLogger.DEBUG, "Inlining", null);
String base64Contents = toBase64(data);
// CHECKSTYLE_OFF
- String encoded = "\"data:" + mimeType.replaceAll("\"", "\\\\\"")
- + ";base64," + base64Contents + "\"";
+ String encoded = "\"data:" + mimeType + ";base64," + base64Contents
+ + "\"";
// CHECKSTYLE_ON
/*
=======================================
---
/trunk/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java
Fri Jul 30 13:05:05 2010
+++
/trunk/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java
Fri Jul 30 15:19:42 2010
@@ -64,7 +64,7 @@
@Override
public String deploy(String suggestedFileName, String mimeType, byte[]
data,
- boolean forceExternal) throws UnableToCompleteException {
+ boolean xhrCompatible) throws UnableToCompleteException {
String strongName = Util.computeStrongName(data);
String toReturn = strongNameToExpressions.get(strongName);
@@ -80,13 +80,13 @@
* as a fallback.
*/
String staticLocation = super.deploy(suggestedFileName, mimeType, data,
- forceExternal);
+ xhrCompatible);
/*
* ie6 doesn't treat XHRs to mhtml as cross-site, but ie8 does, so
we'll
* play it safe here.
*/
- if (forceExternal || data.length > MAX_INLINE_SIZE) {
+ if (xhrCompatible || data.length > MAX_INLINE_SIZE) {
return staticLocation;
}
=======================================
---
/trunk/user/src/com/google/gwt/resources/rebind/context/StaticResourceContext.java
Fri Jul 30 13:05:05 2010
+++
/trunk/user/src/com/google/gwt/resources/rebind/context/StaticResourceContext.java
Fri Jul 30 15:19:42 2010
@@ -40,7 +40,7 @@
}
public String deploy(String suggestedFileName, String mimeType, byte[]
data,
- boolean forceExternal) throws UnableToCompleteException {
+ boolean xhrCompatible) throws UnableToCompleteException {
TreeLogger logger = getLogger();
GeneratorContext context = getGeneratorContext();
PropertyOracle propertyOracle = context.getPropertyOracle();
=======================================
--- /trunk/user/src/com/google/gwt/resources/rg/DataResourceGenerator.java
Fri Jul 30 13:05:05 2010
+++ /trunk/user/src/com/google/gwt/resources/rg/DataResourceGenerator.java
Fri Jul 30 15:19:42 2010
@@ -18,9 +18,7 @@
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.typeinfo.JMethod;
-import com.google.gwt.resources.client.DataResource.MimeType;
import com.google.gwt.resources.client.DataResource;
-import com.google.gwt.resources.client.DataResource.DoNotEmbed;
import com.google.gwt.resources.ext.AbstractResourceGenerator;
import com.google.gwt.resources.ext.ResourceContext;
import com.google.gwt.resources.ext.ResourceGeneratorUtil;
@@ -45,19 +43,9 @@
null);
throw new UnableToCompleteException();
}
-
- // Determine if a MIME Type has been specified
- MimeType mimeTypeAnnotation = method.getAnnotation(MimeType.class);
- String mimeType = mimeTypeAnnotation != null
- ? mimeTypeAnnotation.value() : null;
-
- // Determine if resource should not be embedded
- DoNotEmbed doNotEmbed = method.getAnnotation(DoNotEmbed.class);
- boolean forceExternal = (doNotEmbed != null);
URL resource = resources[0];
- String outputUrlExpression = context.deploy(
- resource, mimeType, forceExternal);
+ String outputUrlExpression = context.deploy(resource, false);
SourceWriter sw = new StringSourceWriter();
// Write the expression to create the subtype.
=======================================
--- /trunk/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java
Fri Jul 30 13:05:05 2010
+++ /trunk/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java
Fri Jul 30 15:19:42 2010
@@ -53,7 +53,6 @@
* Represents a file that contains multiple image regions.
*/
static class BundledImage extends DisplayedImage {
- private static final String MIME_TYPE_IMAGE_PNG = "image/png";
private final ImageBundleBuilder builder;
private boolean dirty = false;
private Map<LocalizedImage, ImageRect> images;
@@ -109,7 +108,6 @@
return images.get(localizedByImageResource.get(image));
}
- @Override
public void render(TreeLogger logger, ResourceContext context,
ClientBundleFields fields, RepeatStyle repeatStyle)
throws UnableToCompleteException {
@@ -137,9 +135,8 @@
logger.log(TreeLogger.ERROR, "Unknown RepeatStyle " +
repeatStyle);
throw new UnableToCompleteException();
}
- URL normalContents = renderToTempPngFile(logger, builder,
arranger);
- normalContentsUrlExpression = context.deploy(
- normalContents, MIME_TYPE_IMAGE_PNG, false);
+ URL normalContents = renderToTempFile(logger, builder, arranger);
+ normalContentsUrlExpression = context.deploy(normalContents,
false);
if (!rtlImages.isEmpty()) {
for (LocalizedImage rtlImage : rtlImages) {
@@ -149,11 +146,10 @@
tx.setTransform(-1, 0, 0, 1, imageRect.getWidth(), 0);
imageRect.setTransform(tx);
}
- URL rtlContents = renderToTempPngFile(logger, builder,
+ URL rtlContents = renderToTempFile(logger, builder,
new ImageBundleBuilder.IdentityArranger());
assert rtlContents != null;
- rtlContentsUrlExpression = context.deploy(
- rtlContents, MIME_TYPE_IMAGE_PNG, false);
+ rtlContentsUrlExpression = context.deploy(rtlContents, false);
}
dirty = false;
@@ -297,19 +293,17 @@
this.rect = rect;
}
- @Override
public ImageRect getImageRect(ImageResourceDeclaration image) {
return this.image.equals(image) ? rect : null;
}
- @Override
public void render(TreeLogger logger, ResourceContext context,
ClientBundleFields fields, RepeatStyle repeatStyle)
throws UnableToCompleteException {
JClassType stringType =
context.getGeneratorContext().getTypeOracle().findType(
String.class.getCanonicalName());
- String contentsExpression = context.deploy(localized.getUrl(), null,
false);
+ String contentsExpression = context.deploy(localized.getUrl(),
false);
normalContentsFieldName = fields.define(stringType, "externalImage",
contentsExpression, true, true);
@@ -327,7 +321,6 @@
}
}
- @Override
public void setRtlImage(LocalizedImage localized) {
if (this.localized.equals(localized)) {
isRtl = true;
@@ -432,7 +425,7 @@
/**
* Re-encode an image as a PNG to strip random header data.
*/
- private static URL renderToTempPngFile(TreeLogger logger,
+ private static URL renderToTempFile(TreeLogger logger,
ImageBundleBuilder builder, Arranger arranger)
throws UnableToCompleteException {
try {
=======================================
--- /trunk/user/test/com/google/gwt/resources/ResourcesSuite.java Fri Jul
30 13:05:05 2010
+++ /trunk/user/test/com/google/gwt/resources/ResourcesSuite.java Fri Jul
30 15:19:42 2010
@@ -20,8 +20,6 @@
import com.google.gwt.resources.client.ImageResourceNoInliningTest;
import com.google.gwt.resources.client.ImageResourceTest;
import com.google.gwt.resources.client.NestedBundleTest;
-import com.google.gwt.resources.client.DataResourceDoNotEmbedTest;
-import com.google.gwt.resources.client.DataResourceMimeTypeTest;
import com.google.gwt.resources.client.TextResourceTest;
import com.google.gwt.resources.css.CssExternalTest;
import com.google.gwt.resources.css.CssNodeClonerTest;
@@ -51,9 +49,7 @@
suite.addTestSuite(ImageResourceTest.class);
suite.addTestSuite(ImageResourceNoInliningTest.class);
suite.addTestSuite(NestedBundleTest.class);
- suite.addTestSuite(DataResourceDoNotEmbedTest.class);
suite.addTestSuite(ResourceGeneratorUtilTest.class);
- suite.addTestSuite(DataResourceMimeTypeTest.class);
suite.addTestSuite(TextResourceTest.class);
suite.addTestSuite(UnknownAtRuleTest.class);
return suite;
=======================================
--- /trunk/user/test/com/google/gwt/resources/rg/CssTestCase.java Fri Jul
30 13:05:05 2010
+++ /trunk/user/test/com/google/gwt/resources/rg/CssTestCase.java Fri Jul
30 15:19:42 2010
@@ -39,7 +39,7 @@
*/
public class CssTestCase extends TestCase {
/*
- * NB: This class is in the resources.rg package so that it can access
+ * NB: This class is in the resources.rg package so that it can acess
* package-protected methods in CssResourceGenerator.
*/
@@ -79,20 +79,14 @@
*/
private static class FakeContext implements ResourceContext {
public String deploy(String suggestedFileName, String mimeType,
- byte[] data, boolean forceExternal) throws
UnableToCompleteException {
+ byte[] data, boolean xhrCompatible) throws
UnableToCompleteException {
return null;
}
- @Deprecated
- public String deploy(URL resource, boolean forceExternal)
+ public String deploy(URL resource, boolean xhrCompatible)
throws UnableToCompleteException {
return null;
}
-
- public String deploy(URL resource, String mimeType, boolean
forceExternal)
- throws UnableToCompleteException {
- return null;
- }
public <T> T getCachedData(String key, Class<T> clazz) {
return null;
@@ -176,10 +170,10 @@
+ "/";
URL testUrl = getClass().getClassLoader().getResource(
packagePath + testName + "_test.css");
- assertNotNull("Could not find testUrl", testUrl);
+ assertNotNull("Cauld not find testUrl", testUrl);
URL expectedUrl = getClass().getClassLoader().getResource(
packagePath + testName + "_expected.css");
- assertNotNull("Could not find testUrl", expectedUrl);
+ assertNotNull("Cauld not find testUrl", expectedUrl);
test(logger, testUrl, expectedUrl, visitors);
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors