summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-11-26 13:13:55 +0000
committerArtur Signell <artur.signell@itmill.com>2009-11-26 13:13:55 +0000
commit19cf454499dc6a80c5aa26ad8be8c642de74636b (patch)
tree4ddb8090aabc149f6fdcc728aeaeae72966b8f26 /tests
parent459cd623c8fe7c7e5b95a8ddbd0fe7ea1f2afbf6 (diff)
downloadvaadin-framework-19cf454499dc6a80c5aa26ad8be8c642de74636b.tar.gz
vaadin-framework-19cf454499dc6a80c5aa26ad8be8c642de74636b.zip
Simple mime type test
svn changeset:10075/svn branch:6.2
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/vaadin/tests/server/TestMimeTypes.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/server/TestMimeTypes.java b/tests/src/com/vaadin/tests/server/TestMimeTypes.java
new file mode 100644
index 0000000000..4475d0cdcf
--- /dev/null
+++ b/tests/src/com/vaadin/tests/server/TestMimeTypes.java
@@ -0,0 +1,26 @@
+package com.vaadin.tests.server;
+
+import junit.framework.TestCase;
+
+import com.vaadin.Application;
+import com.vaadin.terminal.ClassResource;
+import com.vaadin.ui.Embedded;
+
+public class TestMimeTypes extends TestCase {
+
+ public void testEmbeddedPDF() {
+ Application app = new Application() {
+
+ @Override
+ public void init() {
+ // TODO Auto-generated method stub
+
+ }
+ };
+ Embedded e = new Embedded("A pdf", new ClassResource("file.pddf", app));
+ assertEquals("Invalid mimetype", "application/octet-stream", e
+ .getMimeType());
+ e = new Embedded("A pdf", new ClassResource("file.pdf", app));
+ assertEquals("Invalid mimetype", "application/pdf", e.getMimeType());
+ }
+}