Browse Source

added test case

svn changeset:5474/svn branch:trunk
tags/6.7.0.beta1
Matti Tahvonen 15 years ago
parent
commit
79a7c5989b

+ 25
- 0
WebContent/statictestfiles/ticket2095.html View File

@@ -0,0 +1,25 @@
<html>
<head>
<script type="text/javascript">

function openPopup() {
// possible workaround if IEmbedded was not modified to add name
// window.name = "foo";
var popup = window.open('ticket2095_popup.html','mypopup');
popup._parentName = this.name;
}
</script>
</head>
<body>
<p>
This is file is part of test case for #2095. Embedded.TYPE_BROWSER like iframes
wants to have name, so popups opened by them may submit forms into them.

</p>


<a href="#" onclick="openPopup();">Open popup, will hit debuggger;</a>

</body>

</html>

+ 24
- 0
WebContent/statictestfiles/ticket2095_popup.html View File

@@ -0,0 +1,24 @@
<html>

<head>
<script type="text/javascript">

function setTarget() {
document.forms[0].target = _parentName;
}
</script>
</head>

<body onload="setTarget();">

<p>Popup
</p>

<form action="http://www.google.fi/search">
<input type="text" name="q" value="it mill toolkit" />
<input type="submit" value="Google!"/>
</form>

</body>

</html>

+ 28
- 0
src/com/itmill/toolkit/tests/tickets/Ticket2095.java View File

@@ -0,0 +1,28 @@
package com.itmill.toolkit.tests.tickets;
import com.itmill.toolkit.Application;
import com.itmill.toolkit.terminal.ExternalResource;
import com.itmill.toolkit.ui.Embedded;
import com.itmill.toolkit.ui.Window;
public class Ticket2095 extends Application {
public void init() {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// uncomment to workaround iorderedlayout bug in current trunk
// w.setLayout(new ExpandLayout());
w.getLayout().setSizeFull();
Embedded em = new Embedded();
em.setType(Embedded.TYPE_BROWSER);
em.setSource(new ExternalResource("/statictestfiles/ticket2095.html"));
em.setDebugId("MYIFRAME");
em.setSizeFull();
w.addComponent(em);
}
}

Loading…
Cancel
Save