Browse Source

Merged bugfixes and test updates from 6.5

svn changeset:17929/svn branch:6.6
tags/6.7.0.beta1
Artur Signell 13 years ago
parent
commit
66f7282862

+ 2
- 0
WebContent/VAADIN/themes/base/common/common.css View File

@@ -23,6 +23,8 @@ div.v-app-loading {
background-image: url(img/loading-indicator.gif);
background-repeat: no-repeat;
background-position: 50%;
width: 100%;
height: 100%;
}
.v-view {
height: 100%;

+ 4
- 2
WebContent/VAADIN/themes/base/styles.css View File

@@ -1,5 +1,5 @@
.v-theme-version:after {content:"6_5_2_dev-20110303";}
.v-theme-version-6_5_2_dev-20110303 {display: none;}
.v-theme-version:after {content:"6_5_4_dev-20110324";}
.v-theme-version-6_5_4_dev-20110324 {display: none;}
/* Automatically compiled css file from subdirectories. */

.v-absolutelayout-wrapper {
@@ -276,6 +276,8 @@ div.v-app-loading {
background-image: url(common/img/loading-indicator.gif);
background-repeat: no-repeat;
background-position: 50%;
width: 100%;
height: 100%;
}
.v-view {
height: 100%;

+ 4
- 2
WebContent/VAADIN/themes/liferay/styles.css View File

@@ -1,5 +1,5 @@
.v-theme-version:after {content:"6_5_2_dev-20110303";}
.v-theme-version-6_5_2_dev-20110303 {display: none;}
.v-theme-version:after {content:"6_5_4_dev-20110324";}
.v-theme-version-6_5_4_dev-20110324 {display: none;}
/* Automatically compiled css file from subdirectories. */

.v-absolutelayout-wrapper {
@@ -276,6 +276,8 @@ div.v-app-loading {
background-image: url(../base/common/img/loading-indicator.gif);
background-repeat: no-repeat;
background-position: 50%;
width: 100%;
height: 100%;
}
.v-view {
height: 100%;

+ 4
- 2
WebContent/VAADIN/themes/reindeer/styles.css View File

@@ -1,5 +1,5 @@
.v-theme-version:after {content:"6_5_2_dev-20110303";}
.v-theme-version-6_5_2_dev-20110303 {display: none;}
.v-theme-version:after {content:"6_5_4_dev-20110324";}
.v-theme-version-6_5_4_dev-20110324 {display: none;}
/* Automatically compiled css file from subdirectories. */

.v-absolutelayout-wrapper {
@@ -276,6 +276,8 @@ div.v-app-loading {
background-image: url(../base/common/img/loading-indicator.gif);
background-repeat: no-repeat;
background-position: 50%;
width: 100%;
height: 100%;
}
.v-view {
height: 100%;

+ 4
- 2
WebContent/VAADIN/themes/runo/styles.css View File

@@ -1,5 +1,5 @@
.v-theme-version:after {content:"6_5_2_dev-20110303";}
.v-theme-version-6_5_2_dev-20110303 {display: none;}
.v-theme-version:after {content:"6_5_4_dev-20110324";}
.v-theme-version-6_5_4_dev-20110324 {display: none;}
/* Automatically compiled css file from subdirectories. */

.v-absolutelayout-wrapper {
@@ -276,6 +276,8 @@ div.v-app-loading {
background-image: url(../base/common/img/loading-indicator.gif);
background-repeat: no-repeat;
background-position: 50%;
width: 100%;
height: 100%;
}
.v-view {
height: 100%;

+ 29
- 2
src/com/vaadin/terminal/gwt/client/ui/VTree.java View File

@@ -103,6 +103,15 @@ public class VTree extends SimpleFocusablePanel implements Paintable,

private boolean selectionHasChanged = false;

public VLazyExecutor iconLoaded = new VLazyExecutor(50,
new ScheduledCommand() {

public void execute() {
Util.notifyParentOfSizeChange(VTree.this, true);
}

});

public VTree() {
super();
setStyleName(CLASSNAME);
@@ -514,6 +523,11 @@ public class VTree extends SimpleFocusablePanel implements Paintable,

private boolean focused = false;

/**
* Track onload events as IE6 sends two
*/
private boolean onloadHandled = false;

public TreeNode() {
constructDom();
sinkEvents(Event.ONCLICK | Event.ONDBLCLICK | Event.MOUSEEVENTS
@@ -684,11 +698,23 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
@Override
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
final int type = DOM.eventGetType(event);
final Element target = DOM.eventGetTarget(event);

if (type == Event.ONLOAD && target == icon.getElement()) {
if (onloadHandled) {
return;
}
if (BrowserInfo.get().isIE6()) {
fixWidth();
}
iconLoaded.trigger();
onloadHandled = true;
}

if (disabled) {
return;
}
final int type = DOM.eventGetType(event);
final Element target = DOM.eventGetTarget(event);
final boolean inCaption = target == nodeCaptionSpan
|| (icon != null && target == icon.getElement());
if (inCaption
@@ -891,6 +917,7 @@ public class VTree extends SimpleFocusablePanel implements Paintable,

if (uidl.hasAttribute("icon")) {
if (icon == null) {
onloadHandled = false;
icon = new Icon(client);
DOM.insertBefore(DOM.getFirstChild(nodeCaptionDiv),
icon.getElement(), nodeCaptionSpan);

+ 9
- 2
src/com/vaadin/terminal/gwt/client/ui/VView.java View File

@@ -675,9 +675,16 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
DOM.setElementProperty(getElement(), "tabIndex", "1");

RootPanel root = RootPanel.get(rootPanelId);
root.add(this);

// Remove the v-app-loading or any splash screen added inside the div by
// the user
root.getElement().setInnerHTML("");
// For backwards compatibility with static index pages only.
// No longer added by AbstractApplicationServlet/Portlet
root.removeStyleName("v-app-loading");

root.add(this);

BrowserInfo browser = BrowserInfo.get();

// set focus to iview element by default to listen possible keyboard
@@ -708,7 +715,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
}

public void focus() {
getElement().focus();
getElement().focus();
}

}

+ 4
- 3
src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java View File

@@ -926,8 +926,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
String themeClass = "v-theme-"
+ themeName.replaceAll("[^a-zA-Z0-9]", "");

String classNames = "v-app v-app-loading " + themeClass + " "
+ appClass;
String classNames = "v-app " + themeClass + " " + appClass;

String style = getApplicationProperty(PORTLET_PARAMETER_STYLE);
String divStyle = "";
@@ -1225,7 +1224,9 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
RenderResponse response, final BufferedWriter writer, String id,
String classNames, String divStyle) throws IOException {
writer.write("<div id=\"" + id + "\" class=\"" + classNames + "\" "
+ divStyle + "></div>\n");
+ divStyle + ">");
writer.write("<div class=\"v-app-loading\"></div>");
writer.write("</div>\n");
writer.write("<noscript>" + getNoScriptMessage() + "</noscript>");
}


+ 4
- 2
src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java View File

@@ -1660,7 +1660,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
+ getDefaultTheme().replaceAll("[^a-zA-Z0-9]", "");
}

String classNames = "v-app v-app-loading " + themeClass + " "
String classNames = "v-app " + themeClass + " "
+ appClass;

String divStyle = null;
@@ -1744,7 +1744,9 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
String appId, String classNames, String divStyle, HttpServletRequest request)
throws IOException {
page.write("<div id=\"" + appId + "\" class=\"" + classNames + "\" "
+ (divStyle != null ? divStyle : "") + "></div>\n");
+ (divStyle != null ? divStyle : "") + ">");
page.write("<div class=\"v-app-loading\"></div>");
page.write("</div>\n");
page.write("<noscript>" + getNoScriptMessage() + "</noscript>");
}


+ 1
- 131
tests/src/com/vaadin/tests/components/table/Footer.html View File

@@ -21,11 +21,6 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]</td>
<td>926,229</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
@@ -46,21 +41,11 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
<td>Footer3</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
<td>11,8</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
@@ -71,11 +56,6 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
<td>6,8</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
@@ -101,21 +81,11 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[0]/domChild[1]</td>
<td>9,10</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mouseClick</td>
<td>//td[@id='gwt-uid-3']/span/div</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::Root/VContextMenu[0]#option1</td>
<td>0,9</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
@@ -126,21 +96,11 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[0]/domChild[1]</td>
<td>12,13</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VContextMenu[0]#option1</td>
<td>10,7</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
@@ -151,31 +111,16 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>-45,13</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>enterCharacter</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>fuu</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
@@ -186,31 +131,16 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>-61,2</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>enterCharacter</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>bar</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td>
@@ -221,31 +151,16 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>-21,9</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td></td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td>
@@ -256,91 +171,46 @@
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>-18,9</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>enterCharacter</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>Footer1</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>-56,-4</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>enterCharacter</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>Footer2</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>124,17</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>enterCharacter</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td>
<td>Footer3</td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>waitForVaadin</td>
<td></td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>

+ 62
- 0
tests/src/com/vaadin/tests/components/tree/TreeWithIcons.html View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/run/com.vaadin.tests.components.tree.TreeWithIcons?restartApplication</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td>large-icon</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentstreeTreeWithIcons::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTree[0]#n[0]/expand</td>
<td>9,6</td>
</tr>
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td>two-large-icons</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentstreeTreeWithIcons::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTree[0]#n[1]/expand</td>
<td>8,9</td>
</tr>
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td>huge-and-two-large-icons</td>
</tr>

</tbody></table>
</body>
</html>

+ 69
- 0
tests/src/com/vaadin/tests/components/tree/TreeWithIcons.java View File

@@ -0,0 +1,69 @@
package com.vaadin.tests.components.tree;

import java.util.Date;

import com.vaadin.terminal.Sizeable;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Tree;
import com.vaadin.ui.themes.Reindeer;

public class TreeWithIcons extends TestBase {

@Override
protected void setup() {
ThemeResource notCachedFolderIconHuge = new ThemeResource(
"../runo/icons/64/folder.png?" + new Date().getTime());
ThemeResource notCachedFolderIconLarge = new ThemeResource(
"../runo/icons/32/folder.png?" + new Date().getTime());
ThemeResource notCachedFolderIconLargeOther = new ThemeResource(
"../runo/icons/32/ok.png?" + new Date().getTime());
Tree t = new Tree();
t.setImmediate(true);

t.addItem("Root 1");
t.addItem("Root 11");
t.addItem("Root 111");
t.addItem("Root 1111");
t.addItem("Sub 1");
t.setItemIcon("Sub 1", notCachedFolderIconLargeOther);
t.setParent("Sub 1", "Root 1");
String longItemId = LoremIpsum.get(50);
t.addItem(longItemId);
t.setItemIcon(longItemId, notCachedFolderIconHuge);
t.setParent(longItemId, "Root 11");
t.addItem("abcdefghijklmn");

String first = "abcdefghijklmnop";
String second = "abcdefghijklmnopqrst";
t.addItem(first);
t.addItem(second);
t.setParent(second, first);
t.setItemIcon(first, notCachedFolderIconLarge);

HorizontalLayout hlay = new HorizontalLayout();
hlay.setStyleName(Reindeer.LAYOUT_BLUE);
hlay.addComponent(t);
hlay.setWidth(-1, Sizeable.UNITS_PIXELS);

Panel p = new Panel();
p.setSizeUndefined();
p.setContent(hlay);

addComponent(p);
}

@Override
protected String getDescription() {
return "A tree with icons should resize itself correctly so the nodes are not cut either horizontally or vertically.";
}

@Override
protected Integer getTicketNumber() {
return 3529;
}

}

+ 1
- 1
tests/test.xml View File

@@ -5,7 +5,7 @@
<!-- Configuration -->
<!-- ================================================================== -->
<!-- Browsers to use for testing -->
<property name="browsers-windows" value="winxp-ie6,winxp-ie7,winxp-ie8,winxp-firefox36,winxp-safari4,winxp-safari5,winxp-googlechrome-stable,winxp-opera1060,winxp-opera11" />
<property name="browsers-windows" value="winxp-ie6,winxp-ie7,winxp-ie8,win7-ie9,winxp-firefox36,winxp-firefox4,winxp-safari4,winxp-safari5,winxp-googlechrome-stable,winxp-opera1060,winxp-opera11" />
<property name="browsers-linux" value="linux-firefox3,linux-opera10,linux-googlechrome8" />
<property name="browsers-mac" value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" />


Loading…
Cancel
Save