From c8f35e5aef1619512aee438c155b417fa7bb48ba Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 10 Aug 2012 14:09:57 +0000 Subject: Disabled shim iframe for all but IE8+ (#9284, #6219) The shim iframe causes crashes in IE6 and does not really help in Opera/Safari/Firefox. svn changeset:24146/svn branch:6.8 --- .../tests/components/embedded/EmbeddedApplet.html | 36 +++++++++++++++++++ .../tests/components/embedded/EmbeddedApplet.java | 42 ++++++++++++++++++++++ .../tests/components/embedded/TestApplet.java | 11 ++++++ 3 files changed, 89 insertions(+) create mode 100644 tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.html create mode 100644 tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java create mode 100644 tests/testbench/com/vaadin/tests/components/embedded/TestApplet.java (limited to 'tests/testbench/com') diff --git a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.html b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.html new file mode 100644 index 0000000000..d8fb0593d1 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.html @@ -0,0 +1,36 @@ + + + + + + +EmbeddedClickListenerRelativeCoordinates + + + + + + + + + + + + + + + + + + + + + + + + + + +
EmbeddedClickListenerRelativeCoordinates
open/run/com.vaadin.tests.components.embedded.EmbeddedApplet?restartApplication
screenCapturewith-applet
clickvaadin=runcomvaadintestscomponentsembeddedEmbeddedApplet::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]
screenCapturewithout-applet
+ + diff --git a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java new file mode 100644 index 0000000000..7460e15af0 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java @@ -0,0 +1,42 @@ +package com.vaadin.tests.components.embedded; + +import com.vaadin.terminal.ExternalResource; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.Label; +import com.vaadin.ui.Window; + +public class EmbeddedApplet extends TestBase { + + @Override + protected String getDescription() { + return "The sub window should be shown on top of the embedded applet"; + } + + @Override + protected Integer getTicketNumber() { + return 8399; + } + + @Override + public void setup() { + final Embedded applet = new Embedded(); + applet.setType(Embedded.TYPE_BROWSER); + applet.setWidth("400px"); + applet.setHeight("300px"); + applet.setSource(new ExternalResource("/statictestfiles/applet.html")); + addComponent(applet); + + addComponent(new Button("Remove applet", new Button.ClickListener() { + public void buttonClick(ClickEvent event) { + removeComponent(applet); + } + })); + + Window window = new Window("Testwindow"); + window.addComponent(new Label("I am inside the window")); + applet.getWindow().addWindow(window); + } +} diff --git a/tests/testbench/com/vaadin/tests/components/embedded/TestApplet.java b/tests/testbench/com/vaadin/tests/components/embedded/TestApplet.java new file mode 100644 index 0000000000..3cf7cf888b --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/embedded/TestApplet.java @@ -0,0 +1,11 @@ +package com.vaadin.tests.components.embedded; + +import java.applet.Applet; +import java.awt.Graphics; + +public class TestApplet extends Applet { + @Override + public void paint(Graphics g) { + g.drawString("Hello, I am an applet! Look at me!", 10, 20); + } +} -- cgit v1.2.3