diff --git a/user/src/com/google/gwt/uibinder/rebind/BundleWriter.java b/user/src/com/google/gwt/uibinder/rebind/BundleWriter.java
index 80aff7f..4ba4f5d 100644
--- a/user/src/com/google/gwt/uibinder/rebind/BundleWriter.java
+++ b/user/src/com/google/gwt/uibinder/rebind/BundleWriter.java
@@ -19,11 +19,13 @@
 import com.google.gwt.core.ext.typeinfo.JClassType;
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.DataResource;
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.resources.client.ImageResource.ImageOptions;
 import com.google.gwt.resources.client.ImageResource.RepeatStyle;
 import com.google.gwt.uibinder.rebind.model.ImplicitClientBundle;
 import com.google.gwt.uibinder.rebind.model.ImplicitCssResource;
+import com.google.gwt.uibinder.rebind.model.ImplicitDataResource;
 import com.google.gwt.uibinder.rebind.model.ImplicitImageResource;
 
 /**
@@ -37,6 +39,7 @@
   private final TypeOracle oracle;
 
   private final JClassType clientBundleType;
+  private final JClassType dataResourceType;
   private final JClassType imageOptionType;
   private final JClassType imageResourceType;
   private final JClassType repeatStyleType;
@@ -51,6 +54,7 @@
     this.oracle = oracle;
 
     clientBundleType = oracle.findType(ClientBundle.class.getName());
+    dataResourceType = oracle.findType(DataResource.class.getCanonicalName());
     imageOptionType = oracle.findType(ImageOptions.class.getCanonicalName());
     imageResourceType = oracle.findType(ImageResource.class.getCanonicalName());
     repeatStyleType = oracle.findType(RepeatStyle.class.getCanonicalName());
@@ -76,6 +80,7 @@
     writer.write("import %s;", imageResourceType.getQualifiedSourceName());
     writer.write("import %s;", imageOptionType.getQualifiedSourceName());
     writer.write("import %s;", clientBundleType.getQualifiedSourceName());
+    writer.write("import %s;", dataResourceType.getQualifiedSourceName());
     writer.newline();
 
     // Open interface
@@ -89,8 +94,14 @@
       writer.write("%s %s();", css.getClassName(), css.getName());
       writer.newline();
     }
+    
+    // Write data methods
+    for (ImplicitDataResource data : bundleClass.getDataMethods()) {
+      writer.write("@Source(\"%s\")", data.getSource());
+      writer.write("%s %s();", dataResourceType.getName(), data.getName());
+      writer.newline();
+    }
 
-    writer.newline();
     writeImageMethods();
 
     // Close interface.
diff --git a/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java b/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
index c5aa2a7..0c2e7bd 100644
--- a/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
+++ b/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
@@ -20,11 +20,13 @@
 import com.google.gwt.core.ext.typeinfo.JMethod;
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.resources.client.DataResource;
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.resources.client.ImageResource.RepeatStyle;
 import com.google.gwt.uibinder.rebind.messages.MessagesWriter;
 import com.google.gwt.uibinder.rebind.model.ImplicitClientBundle;
 import com.google.gwt.uibinder.rebind.model.ImplicitCssResource;
+import com.google.gwt.uibinder.rebind.model.ImplicitDataResource;
 import com.google.gwt.uibinder.rebind.model.ImplicitImageResource;
 import com.google.gwt.uibinder.rebind.model.OwnerField;
 
@@ -50,6 +52,7 @@
   private final ImplicitClientBundle bundleClass;
   private final JClassType cssResourceType;
   private final JClassType imageResourceType;
+  private final JClassType dataResourceType;
 
   public UiBinderParser(UiBinderWriter writer, MessagesWriter messagesWriter,
       FieldManager fieldManager, TypeOracle oracle,
@@ -61,6 +64,37 @@
     this.bundleClass = bundleClass;
     this.cssResourceType = oracle.findType(CssResource.class.getCanonicalName());
     this.imageResourceType = oracle.findType(ImageResource.class.getCanonicalName());
+    this.dataResourceType = oracle.findType(DataResource.class.getCanonicalName());
+  }
+
+  private enum Resource {
+    data {
+      void create(UiBinderParser parser, XMLElement elem)
+      throws UnableToCompleteException {
+        parser.createData(elem);
+      }
+    },
+    image {
+      void create(UiBinderParser parser, XMLElement elem)
+          throws UnableToCompleteException {
+        parser.createImage(elem);
+      }
+    },
+    style {
+      void create(UiBinderParser parser, XMLElement elem)
+          throws UnableToCompleteException {
+        parser.createStyle(elem);
+      }
+    },
+    with {
+      void create(UiBinderParser parser, XMLElement elem)
+          throws UnableToCompleteException {
+        parser.createResource(elem);
+      }
+    };
+
+    abstract void create(UiBinderParser parser, XMLElement elem)
+        throws UnableToCompleteException;
   }
 
   /**
@@ -70,9 +104,7 @@
   public String parse(XMLElement elem) throws UnableToCompleteException {
     // TODO(rjrjr) Clearly need to break these find* methods out into their own
     // parsers, an so need a registration scheme for uibinder-specific parsers
-    findStyles(elem);
     findResources(elem);
-    findImages(elem);
     messagesWriter.findMessagesConfig(elem);
     XMLElement uiRoot = elem.consumeSingleChildElement();
     return writer.parseElementToField(uiRoot);
@@ -111,14 +143,26 @@
   }
 
   /**
+   * Interprets <ui:data> elements
+   */
+  private void createData(XMLElement elem) throws UnableToCompleteException {
+    String name = elem.consumeRequiredAttribute(FIELD_ATTRIBUTE);
+    String source = elem.consumeRequiredAttribute(SOURCE_ATTRIBUTE);
+    ImplicitDataResource dataMethod = bundleClass.createDataResource(name,
+        source);
+    FieldWriter field = fieldManager.registerField(dataResourceType,
+        dataMethod.getName());
+    field.setInitializer(String.format("%s.%s()", bundleClass.getFieldName(),
+        dataMethod.getName()));
+  }
+
+  /**
    * Interprets <ui:image> elements
    */
   private void createImage(XMLElement elem) throws UnableToCompleteException {
     String name = elem.consumeRequiredAttribute(FIELD_ATTRIBUTE);
-    String source = elem.consumeAttribute(SOURCE_ATTRIBUTE, null); // @source is
-                                                                   // optional
-                                                                   // on
-                                                                   // ImageResource
+    // @source is optional on ImageResource
+    String source = elem.consumeAttribute(SOURCE_ATTRIBUTE, null);
 
     Boolean flipRtl = null;
     if (elem.hasAttribute(FLIP_RTL_ATTRIBUTE)) {
@@ -209,50 +253,24 @@
         cssMethod.getName()));
   }
 
-  private void findImages(XMLElement binderElement)
-      throws UnableToCompleteException {
-    binderElement.consumeChildElements(new XMLElement.Interpreter<Boolean>() {
-      public Boolean interpretElement(XMLElement elem)
-          throws UnableToCompleteException {
-        if (!(writer.isBinderElement(elem) && "image".equals(elem.getLocalName()))) {
-          return false; // Not of interest, do not consume
-        }
-
-        createImage(elem);
-
-        return true; // Yum
-      }
-    });
-  }
-
   private void findResources(XMLElement binderElement)
       throws UnableToCompleteException {
     binderElement.consumeChildElements(new XMLElement.Interpreter<Boolean>() {
       public Boolean interpretElement(XMLElement elem)
           throws UnableToCompleteException {
-        if (!(writer.isBinderElement(elem) && "with".equals(elem.getLocalName()))) {
-          return false; // Not of interest, do not consume
+
+        if (writer.isBinderElement(elem)) {
+          try {
+            Resource.valueOf(elem.getLocalName()).create(UiBinderParser.this,
+                elem);
+          } catch (IllegalArgumentException e) {
+            writer.die(
+                "%s has unknown tag %s, or is not appropriate as a top level element",
+                elem, elem.getLocalName());
+          }
+          return true;
         }
-
-        createResource(elem);
-
-        return true; // Yum
-      }
-    });
-  }
-
-  private void findStyles(XMLElement binderElement)
-      throws UnableToCompleteException {
-    binderElement.consumeChildElements(new XMLElement.Interpreter<Boolean>() {
-      public Boolean interpretElement(XMLElement elem)
-          throws UnableToCompleteException {
-        if (!(writer.isBinderElement(elem) && "style".equals(elem.getLocalName()))) {
-          return false; // Not of interest, do not consume
-        }
-
-        createStyle(elem);
-
-        return true; // consume
+        return false; // leave it be
       }
     });
   }
diff --git a/user/src/com/google/gwt/uibinder/rebind/model/ImplicitClientBundle.java b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitClientBundle.java
index 7727606..6ec02e0 100644
--- a/user/src/com/google/gwt/uibinder/rebind/model/ImplicitClientBundle.java
+++ b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitClientBundle.java
@@ -20,16 +20,17 @@
 import com.google.gwt.uibinder.rebind.MortalLogger;
 
 import java.util.Collections;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.Set;
 
 /**
  * Models the ClientBundle to be generated from a ui.xml.
  */
 public class ImplicitClientBundle {
-
-  private final Set<ImplicitCssResource> cssMethods = new HashSet<ImplicitCssResource>();
-  private final Set<ImplicitImageResource> imageMethods = new HashSet<ImplicitImageResource>();
+  // LinkedHashSets for consistent order across recompiles
+  private final LinkedHashSet<ImplicitCssResource> cssMethods = new LinkedHashSet<ImplicitCssResource>();
+  private final LinkedHashSet<ImplicitImageResource> imageMethods = new LinkedHashSet<ImplicitImageResource>();
+  private final LinkedHashSet<ImplicitDataResource> dataMethods = new LinkedHashSet<ImplicitDataResource>();
   private final String packageName;
   private final String className;
   private final String fieldName;
@@ -54,7 +55,7 @@
   /**
    * Called to declare a new CssResource accessor on this bundle.
    * 
-   * @param name the method name
+   * @param name the method name and the ui:field name
    * @param source path to the .css file resource
    * @param extendedInterface the public interface implemented by this
    *          CssResource, or null
@@ -70,10 +71,24 @@
   }
 
   /**
+   * Called to declare a new DataResource accessor on this bundle. All params
+   * must be non-null
+   * 
+   * @param name the method name and the ui:field name
+   * @param source path to the resource
+   * @return
+   */
+  public ImplicitDataResource createDataResource(String name, String source) {
+    ImplicitDataResource data = new ImplicitDataResource(name, source);
+    dataMethods.add(data);
+    return data;
+  }
+
+  /**
    * Called to declare a new ImageResource accessor on this bundle.
    * 
-   * @param name the method name
-   * @param source path the image resource, or null if none was specified
+   * @param name the method name and the ui:field name
+   * @param source path to the image resource, or null if none was specified
    * @param flipRtl value for the flipRtl ImageOption, or null if none was
    *          specified
    * @param repeatStyle value of the RepeatStyle ImageOption, or null if none
@@ -82,7 +97,8 @@
    */
   public ImplicitImageResource createImageResource(String name, String source,
       Boolean flipRtl, RepeatStyle repeatStyle) {
-    ImplicitImageResource image = new ImplicitImageResource(name, source, flipRtl, repeatStyle);
+    ImplicitImageResource image = new ImplicitImageResource(name, source,
+        flipRtl, repeatStyle);
     imageMethods.add(image);
     return image;
   }
@@ -95,6 +111,10 @@
     return Collections.unmodifiableSet(cssMethods);
   }
 
+  public Set<ImplicitDataResource> getDataMethods() {
+    return Collections.unmodifiableSet(dataMethods);
+  }
+
   public String getFieldName() {
     return fieldName;
   }
diff --git a/user/src/com/google/gwt/uibinder/rebind/model/ImplicitCssResource.java b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitCssResource.java
index 522e044..b0c6b30 100644
--- a/user/src/com/google/gwt/uibinder/rebind/model/ImplicitCssResource.java
+++ b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitCssResource.java
@@ -44,7 +44,7 @@
   private final MortalLogger logger;
   private File generatedFile;
 
-  public ImplicitCssResource(String packageName, String className, String name,
+  ImplicitCssResource(String packageName, String className, String name,
       String source, JClassType extendedInterface, String body,
       MortalLogger logger) {
     this.packageName = packageName;
diff --git a/user/src/com/google/gwt/uibinder/rebind/model/ImplicitDataResource.java b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitDataResource.java
new file mode 100644
index 0000000..428ea8d
--- /dev/null
+++ b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitDataResource.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2009 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.model;
+
+/**
+ * Models a method returning a DataResource on a generated ClientBundle.
+ */
+public class ImplicitDataResource {
+  private final String name;
+  private final String source;
+
+  ImplicitDataResource(String name, String source) {
+    this.name = name;
+    this.source = source;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public String getSource() {
+    return source;
+  }
+}
diff --git a/user/src/com/google/gwt/uibinder/rebind/model/ImplicitImageResource.java b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitImageResource.java
index 4ae80d9..066609b 100644
--- a/user/src/com/google/gwt/uibinder/rebind/model/ImplicitImageResource.java
+++ b/user/src/com/google/gwt/uibinder/rebind/model/ImplicitImageResource.java
@@ -26,7 +26,7 @@
   private final Boolean flipRtl;
   private final RepeatStyle repeatStyle;
 
-  public ImplicitImageResource(
+  ImplicitImageResource(
       String name, String source, Boolean flipRtl, RepeatStyle repeatStyle) {
     this.name = name;
     this.source = source;
diff --git a/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.java b/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.java
index ebe0b27..4126a0e 100644
--- a/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.java
+++ b/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.java
@@ -25,6 +25,7 @@
 import com.google.gwt.dom.client.StyleInjector;
 import com.google.gwt.dom.client.TableElement;
 import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.resources.client.DataResource;
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.resources.client.CssResource.Shared;
 import com.google.gwt.uibinder.client.UiBinder;
@@ -119,6 +120,7 @@
   @UiField ImageResource prettyTilingImage;
   @UiField Image babyWidget;
   @UiField ParagraphElement simpleSpriteParagraph;
+  @UiField DataResource heartCursorResource;
 
   public WidgetBasedUi() {
     this.bundledLabel = new Label();
diff --git a/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.ui.xml b/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.ui.xml
index 2a12e97..f13963f 100644
--- a/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.ui.xml
+++ b/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.ui.xml
@@ -96,6 +96,14 @@
   }
 </ui:style>
 
+<ui:style field='cursorifficStyle'>
+  @url cursor heartCursorResource;
+  .cursor {
+    cursor:cursor,pointer;
+  }
+</ui:style>
+<ui:data field='heartCursorResource' src='heart.cur'/>
+
 <ui:style field='mySpritelyStyle'>
   @sprite .simpleSprite { 
     gwt-image: "prettyImage"; 
@@ -174,14 +182,18 @@
       </p>
 
       <p>I bet you like babies in your Image widgets.</p>
+      <div class='{cursorifficStyle.cursor}'>
       <gwt:Image ui:field='babyWidget' resource='{prettyImage}'/>
+      </div>
 
       <p ui:field='simpleSpriteParagraph' 
-          class='{mySpritelyStyle.simpleSprite} {mySpritelyStyle.garish}' >
+          class='{mySpritelyStyle.simpleSprite} {mySpritelyStyle.garish}
+            {cursorifficStyle.cursor}' >
         And sprites too
       </p>
 
-      <p class='{mySpritelyStyle.tilingSprite} {mySpritelyStyle.garish}'>
+      <p class='{mySpritelyStyle.tilingSprite} {mySpritelyStyle.garish}
+          {cursorifficStyle.cursor}'>
         Well how do you like  <br/>
         tiled sprited images...of babies!! <br/>
         Well of course you do. Who wouldn't? 
@@ -442,10 +454,12 @@
     <b>HTML:</b>
     <pre style="border: 1px dashed #666; padding: 5px 0;">
   &lt;div id="gwt-debug-joe" 
-      class="gwt-Label newStyle anotherStyle gwt-Label-dependentStyle gwt-Label-anotherDependentStyle"&gt;
+      class="gwt-Label newStyle anotherStyle gwt-Label-dependentStyle 
+        gwt-Label-anotherDependentStyle"&gt;
     A label with a debug id
   &lt;/div&gt;
-  &lt;button id="gwt-debug-myButton" class="gwt-Button buttonStyle" tabindex="0" type="button"&gt;Go&lt;/button&gt;</pre>
+  &lt;button id="gwt-debug-myButton" class="gwt-Button buttonStyle" tabindex="0" 
+    type="button"&gt;Go&lt;/button&gt;</pre>
 
     <gwt:FlowPanel>
       <gwt:Label ui:field="lblDebugId" debugId="joe" addStyleNames="newStyle, anotherStyle" addStyleDependentNames="dependentStyle, anotherDependentStyle">
diff --git a/user/src/com/google/gwt/uibinder/sample/client/heart.cur b/user/src/com/google/gwt/uibinder/sample/client/heart.cur
new file mode 100644
index 0000000..05ecd3e
--- /dev/null
+++ b/user/src/com/google/gwt/uibinder/sample/client/heart.cur
Binary files differ
diff --git a/user/test/com/google/gwt/uibinder/sample/client/UiBinderTest.java b/user/test/com/google/gwt/uibinder/sample/client/UiBinderTest.java
index 960cc9b..0d2749f 100644
--- a/user/test/com/google/gwt/uibinder/sample/client/UiBinderTest.java
+++ b/user/test/com/google/gwt/uibinder/sample/client/UiBinderTest.java
@@ -1,12 +1,12 @@
 /*
  * Copyright 2009 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
@@ -82,12 +82,10 @@
 
   public void testBundle() {
     assertEquals(getCenter(), widgetUi.bundledLabel.getParent());
-    assertEquals(new FakeBundle().helloText(),
-        widgetUi.bundledLabel.getText());
+    assertEquals(new FakeBundle().helloText(), widgetUi.bundledLabel.getText());
     WidgetBasedUiExternalResources resources = GWT.create(WidgetBasedUiExternalResources.class);
     assertEquals("bundledLabel should have styleName",
-        resources.style().prettyText(),
-        widgetUi.bundledLabel.getStyleName());
+        resources.style().prettyText(), widgetUi.bundledLabel.getStyleName());
 
     Element pretty = DOM.getElementById("prettyPara");
     assertEquals(resources.style().prettyText(), pretty.getClassName());
@@ -120,8 +118,7 @@
 
   public void testComputedStyleInAPlaceholder() {
     WidgetBasedUiExternalResources resources = GWT.create(WidgetBasedUiExternalResources.class);
-    assertEquals(resources.style().tmText(),
-        widgetUi.tmElement.getClassName());
+    assertEquals(resources.style().tmText(), widgetUi.tmElement.getClassName());
   }
 
   public void testDomAccessAndComputedAttributeOnPlaceholderedElement() {
@@ -149,8 +146,7 @@
   }
 
   public void testDomAttributeMessageWithFunnyChars() {
-    ParagraphElement p =
-      widgetUi.funnyCharsMessageDomAttributeParagraph;
+    ParagraphElement p = widgetUi.funnyCharsMessageDomAttributeParagraph;
     String t = p.getAttribute("title");
     assertEquals("funny characters \" ' ' & < > > { }", t);
   }
@@ -164,8 +160,7 @@
   public void testDomTextMessageWithFunnyChars() {
     String t = widgetUi.funnyCharsMessageParagraph.getInnerText();
     assertEquals("They might show up in body text that has been marked for "
-        + "translation: funny characters \" \" ' ' & < > > { }",
-        t);
+        + "translation: funny characters \" \" ' ' & < > > { }", t);
   }
 
   public void testProtectedDomTextMessageWithFunnyChars() {
@@ -230,11 +225,9 @@
   }
 
   public void testNestedBundle() {
-    DomBasedUi.Resources resources =
-      GWT.create(DomBasedUi.Resources.class);
-    assertEquals(resources.style().bodyColor()
-        + " " + resources.style().bodyFont() ,
-        domUi.root.getClassName());
+    DomBasedUi.Resources resources = GWT.create(DomBasedUi.Resources.class);
+    assertEquals(resources.style().bodyColor() + " "
+        + resources.style().bodyFont(), domUi.root.getClassName());
   }
 
   interface Bundle extends ClientBundle {
@@ -269,7 +262,8 @@
 
   public void testPrivateStyleFromExternalCss() {
     ParagraphElement p = widgetUi.privateStyleParagraph;
-    assertTrue("Some kind of class should be set", p.getClassName().length() > 0);
+    assertTrue("Some kind of class should be set",
+        p.getClassName().length() > 0);
   }
 
   public void testPrivateStylesFromInlineCss() {
@@ -319,8 +313,8 @@
     // Assumes setPopupText() is overloaded such that there is a static
     // setPopupText(Foo, String) method.
     ClickyLink clicky = widgetUi.customLinkWidget;
-    assertEquals("overloaded setter should have been called",
-                 "That tickles!", clicky.getPopupText());
+    assertEquals("overloaded setter should have been called", "That tickles!",
+        clicky.getPopupText());
   }
 
   public void testStringAttributeWithFormatChars() {
@@ -346,17 +340,27 @@
     String t = clicky.getPopupText();
     assertEquals("funny characters \" ' ' & < > > { }", t);
   }
-  
+
   public void testImageResourceInImageWidget() {
-    assertEquals(widgetUi.prettyImage.getWidth(), widgetUi.babyWidget.getOffsetWidth());
-    assertEquals(widgetUi.prettyImage.getHeight(), widgetUi.babyWidget.getOffsetHeight());
-    assertEquals(widgetUi.prettyImage.getTop(), widgetUi.babyWidget.getOriginTop());
-    assertEquals(widgetUi.prettyImage.getLeft(), widgetUi.babyWidget.getOriginLeft());
+    assertEquals(widgetUi.prettyImage.getWidth(),
+        widgetUi.babyWidget.getOffsetWidth());
+    assertEquals(widgetUi.prettyImage.getHeight(),
+        widgetUi.babyWidget.getOffsetHeight());
+    assertEquals(widgetUi.prettyImage.getTop(),
+        widgetUi.babyWidget.getOriginTop());
+    assertEquals(widgetUi.prettyImage.getLeft(),
+        widgetUi.babyWidget.getOriginLeft());
+  }
+
+  public void testDataResource() {
+    assertNotNull(widgetUi.heartCursorResource.getUrl());
   }
 
   public void testSpritedElement() {
-    assertEquals(widgetUi.prettyImage.getWidth(), widgetUi.simpleSpriteParagraph.getOffsetWidth());
-    assertEquals(widgetUi.prettyImage.getHeight(), widgetUi.simpleSpriteParagraph.getOffsetHeight());
+    assertEquals(widgetUi.prettyImage.getWidth(),
+        widgetUi.simpleSpriteParagraph.getOffsetWidth());
+    assertEquals(widgetUi.prettyImage.getHeight(),
+        widgetUi.simpleSpriteParagraph.getOffsetHeight());
   }
 
   public void suppressForIEfail_testBizarrelyElementedWidgets() {
