Revision: 10121
Author:   jlaba...@google.com
Date:     Mon May  2 09:30:06 2011
Log: Fixing MediaTest#testAddSource to only compare the end of the src to the src that was set. Some browsers automatically prepend the host path to the src file name.

Review at http://gwt-code-reviews.appspot.com/1427811

http://code.google.com/p/google-web-toolkit/source/detail?r=10121

Modified:
 /trunk/user/test/com/google/gwt/media/client/MediaTest.java

=======================================
--- /trunk/user/test/com/google/gwt/media/client/MediaTest.java Mon May 2 06:45:06 2011 +++ /trunk/user/test/com/google/gwt/media/client/MediaTest.java Mon May 2 09:30:06 2011
@@ -97,15 +97,15 @@

     // Add some source elements.
     SourceElement source0 = media.addSource("file.ogg", "audio/ogg");
-    assertEquals("file.ogg", source0.getSrc());
+    assertTrue(source0.getSrc().endsWith("file.ogg"));
     assertEquals("audio/ogg", source0.getType());
     SourceElement source1 = media.addSource("file.ogv", "video/ogg");
-    assertEquals("file.ogv", source1.getSrc());
+    assertTrue(source1.getSrc().endsWith("file.ogv"));
     assertEquals("video/ogg", source1.getType());

     // Add a source without a type.
     SourceElement source2 = media.addSource("file.mp3");
-    assertEquals("file.mp3", source2.getSrc());
+    assertTrue(source2.getSrc().endsWith("file.mp3"));

     // Check that the sources are a children of the media.
     assertEquals(media.getElement(), source0.getParentElement());

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to