summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-24 11:32:49 +0300
committerArtur Signell <artur@vaadin.com>2012-08-24 13:23:19 +0300
commit0b0ddb86876a965f68c6160fe7a499412b6c199d (patch)
tree636de4f5b01e38b4e7d460012438fe7a266e7596 /tests
parentff0761f787f94a157d12af2a37e10e808d43fc59 (diff)
downloadvaadin-framework-0b0ddb86876a965f68c6160fe7a499412b6c199d.tar.gz
vaadin-framework-0b0ddb86876a965f68c6160fe7a499412b6c199d.zip
Component.getRoot() -> Component.getUI() (#8908)
Diffstat (limited to 'tests')
-rw-r--r--tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java2
-rw-r--r--tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java2
-rw-r--r--tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/TouchScrollables.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java2
-rwxr-xr-xtests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest2.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest4.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest5.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest6.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest7.java2
-rw-r--r--tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java2
-rw-r--r--tests/testbench/com/vaadin/tests/serialization/SerializerTest.java4
-rw-r--r--tests/testbench/com/vaadin/tests/tickets/Ticket34.java2
24 files changed, 29 insertions, 29 deletions
diff --git a/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java b/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java
index 4e26ffaf45..5ea4bc52c4 100644
--- a/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java
+++ b/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java
@@ -36,7 +36,7 @@ public class TestStreamVariableMapping extends TestCase {
};
owner = new Upload() {
@Override
- public UI getRoot() {
+ public UI getUI() {
return uI;
}
};
diff --git a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
index dd1675c75d..3a251ecbb9 100644
--- a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
+++ b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
@@ -49,7 +49,7 @@ public class RemoveListenersOnDetach {
}
@Override
- public com.vaadin.ui.UI getRoot() {
+ public com.vaadin.ui.UI getUI() {
return uI;
};
diff --git a/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java b/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java
index 7a06dedd63..9fa716a23e 100644
--- a/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java
+++ b/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java
@@ -93,8 +93,8 @@ public class GAESyncTest extends Application.LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
- if (getRoot() == getMainWindow()) {
- getRoot().getPage().showNotification(
+ if (getUI() == getMainWindow()) {
+ getUI().getPage().showNotification(
new Notification("main"));
try {
Thread.sleep((5000));
diff --git a/tests/testbench/com/vaadin/tests/components/TouchScrollables.java b/tests/testbench/com/vaadin/tests/components/TouchScrollables.java
index 415f660c62..6c340804af 100644
--- a/tests/testbench/com/vaadin/tests/components/TouchScrollables.java
+++ b/tests/testbench/com/vaadin/tests/components/TouchScrollables.java
@@ -51,7 +51,7 @@ public class TouchScrollables extends TestBase {
TestUtils
.injectCSS(
- getLayout().getRoot(),
+ getLayout().getUI(),
"body * {-webkit-user-select: none;} .v-table-row-drag-middle .v-table-cell-content {"
+ " background-color: inherit ; border-bottom: 1px solid cyan;"
+ "}"
@@ -81,7 +81,7 @@ public class TouchScrollables extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- getLayout().getRoot().scrollIntoView(l);
+ getLayout().getUI().scrollIntoView(l);
}
});
cssLayout.addComponent(button);
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
index c0490c127d..393a8ceb6b 100644
--- a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
@@ -25,7 +25,7 @@ public class ComboBoxInPopup extends TestBase {
close.setClickShortcut(KeyCode.ESCAPE, null);
w.addComponent(close);
- getLayout().getRoot().addWindow(w);
+ getLayout().getUI().addWindow(w);
}
diff --git a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java
index 1bb3e7abe2..5091f3a929 100644
--- a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java
+++ b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java
@@ -38,6 +38,6 @@ public class EmbeddedApplet extends TestBase {
Window window = new Window("Testwindow");
window.addComponent(new Label("I am inside the window"));
- applet.getRoot().addWindow(window);
+ applet.getUI().addWindow(window);
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java
index c3854d2420..252229cbe3 100644
--- a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java
+++ b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java
@@ -35,7 +35,7 @@ public class EmbeddedPdf extends TestBase {
}
}));
- player.getRoot().addWindow(new Window("Testwindow"));
+ player.getUI().addWindow(new Window("Testwindow"));
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java b/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java
index db64df936f..b9076a152d 100755
--- a/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java
+++ b/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java
@@ -23,7 +23,7 @@ public class LoginFormRootInLoginHandler extends TestBase {
} else {
addComponent(new Label("UI.getCurrent() is null"));
}
- UI r2 = ((LoginForm) event.getSource()).getRoot();
+ UI r2 = ((LoginForm) event.getSource()).getUI();
if (r2 != null) {
addComponent(new Label("event.getSource().data: "
+ r2.getData()));
@@ -34,7 +34,7 @@ public class LoginFormRootInLoginHandler extends TestBase {
}
});
addComponent(lf);
- getLayout().getRoot().setData("This root");
+ getLayout().getUI().setData("This root");
}
@Override
diff --git a/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java b/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
index 46fd6ee852..08793e9a9c 100644
--- a/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
+++ b/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
@@ -117,7 +117,7 @@ public class OrderedLayoutCases extends AbstractTestRoot {
protected void setup(WrappedRequest request) {
TestUtils
.injectCSS(
- getRoot(),
+ getUI(),
".sampleChild, .theLayout {border: 1px solid black;}"
+ ".theLayout > div:first-child {background: aqua;}"
+ ".theLayout > div:first-child + div {background: yellow;}"
diff --git a/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
index 73d7a95e9f..6eaffa5cf3 100644
--- a/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
+++ b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
@@ -48,7 +48,7 @@ public class RichTextAreaWithKeyboardShortcuts extends TestBase {
@Override
protected void setup() {
- getLayout().getRoot().addActionHandler(actionHandler);
+ getLayout().getUI().addActionHandler(actionHandler);
getLayout().addComponent(createRichTextArea("InMainLayout"));
Panel panel = new Panel("RTA Panel");
@@ -61,7 +61,7 @@ public class RichTextAreaWithKeyboardShortcuts extends TestBase {
w.addComponent(createRichTextArea("InSubWindow"));
w.getContent().setSizeUndefined();
- getLayout().getRoot().addWindow(w);
+ getLayout().getUI().addWindow(w);
}
diff --git a/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java b/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java
index 136dcfe9a5..9a94a203f1 100644
--- a/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java
+++ b/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java
@@ -18,7 +18,7 @@ public class TableInTabsheet extends AbstractTestRoot {
@Override
protected void setup(WrappedRequest request) {
- getRoot().setCaption("test");
+ getUI().setCaption("test");
VerticalLayout vPrinc = new VerticalLayout();
vPrinc.setStyleName(Reindeer.LAYOUT_BLUE);
diff --git a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java
index a12a5a8836..b38dd36284 100644
--- a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java
+++ b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java
@@ -88,7 +88,7 @@ public class TextChangeEvents extends TestBase {
@Override
public void attach() {
super.attach();
- TestUtils.injectCSS(getRoot(), ".match { background:green ;} "
+ TestUtils.injectCSS(getUI(), ".match { background:green ;} "
+ ".nomatch {background:red;}");
}
diff --git a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
index 5b84ff20f2..5991ac6ff7 100644
--- a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
+++ b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
@@ -24,7 +24,7 @@ public class TextChangeListenerChangingNonTextProperties extends TestBase {
super.attach();
TestUtils
.injectCSS(
- getRoot(),
+ getUI(),
".red { background:red;} "
+ ".green { background:green;} .blue { background:blue;} .cyan { background:cyan;} .magenta { background:magenta;}");
}
diff --git a/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java b/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java
index fc8d7474af..1cdfdef0b5 100644
--- a/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java
+++ b/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java
@@ -29,7 +29,7 @@ public class ExtraWindowShown extends TestBase {
iconButton
.setIcon(new ThemeResource("../runo/icons/16/ok.png"));
w.addComponent(iconButton);
- event.getButton().getRoot().addWindow(w);
+ event.getButton().getUI().addWindow(w);
}
});
diff --git a/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java b/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
index e4a7e288ad..273d48514c 100644
--- a/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
+++ b/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
@@ -64,7 +64,7 @@ public class SubWindowFocusAndBlurListeners extends TestBase {
}
});
- UI main = getLayout().getRoot();
+ UI main = getLayout().getUI();
main.addWindow(window);
diff --git a/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java b/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java
index 0f0db3a028..5f55ad8cf3 100644
--- a/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java
+++ b/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java
@@ -28,7 +28,7 @@ public class WindowScrollingUp extends AbstractTestCase {
@Override
public void buttonClick(ClickEvent event) {
- up.getRoot().setScrollTop(0);
+ up.getUI().setScrollTop(0);
}
});
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest2.java b/tests/testbench/com/vaadin/tests/dd/DDTest2.java
index 99020d0b5b..4d649c6056 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest2.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest2.java
@@ -45,7 +45,7 @@ public class DDTest2 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
/* darn reindeer has no icons */
/* Make all trees (their nodes actually) draggable */
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest4.java b/tests/testbench/com/vaadin/tests/dd/DDTest4.java
index bb85dff0b6..044fe1f49a 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest4.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest4.java
@@ -28,7 +28,7 @@ public class DDTest4 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
TestUtils
.injectCSS(
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest5.java b/tests/testbench/com/vaadin/tests/dd/DDTest5.java
index cb99b17da4..43342fdc35 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest5.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest5.java
@@ -47,7 +47,7 @@ public class DDTest5 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
HorizontalSortableCssLayoutWithWrappers verticalSortableCssLayoutWithWrappers = new HorizontalSortableCssLayoutWithWrappers();
w.addWindow(verticalSortableCssLayoutWithWrappers);
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest6.java b/tests/testbench/com/vaadin/tests/dd/DDTest6.java
index c6ac0b1859..f1e31c1452 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest6.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest6.java
@@ -164,7 +164,7 @@ public class DDTest6 extends TestBase {
getLayout().addComponent(sp);
TestUtils
.injectCSS(
- getLayout().getRoot(),
+ getLayout().getUI(),
""
+ ".v-tree .v-icon {height:16px;} "
+ ".v-tree-node-caption-drag-top {/*border-top: none;*/} "
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest7.java b/tests/testbench/com/vaadin/tests/dd/DDTest7.java
index 2af93c6c72..1abf9e379c 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest7.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest7.java
@@ -29,7 +29,7 @@ public class DDTest7 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
TestUtils
.injectCSS(
diff --git a/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java b/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
index 25821cb92c..7877ca3fe3 100644
--- a/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
+++ b/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
@@ -73,7 +73,7 @@ public class ComplexGLColumnExpansionWithColSpan extends AbstractTestCase {
restart.addListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
- mainLayout.getRoot().getApplication().close();
+ mainLayout.getUI().getApplication().close();
}
});
diff --git a/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java b/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java
index a301ecf828..3e194010d1 100644
--- a/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java
+++ b/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java
@@ -98,12 +98,12 @@ public class SerializerTest extends AbstractTestRoot {
}, new HashMap<Connector, Boolean>() {
{
put(testExtension, true);
- put(getRoot(), false);
+ put(getUI(), false);
}
}, new HashMap<Integer, Connector>() {
{
put(5, testExtension);
- put(10, getRoot());
+ put(10, getUI());
}
}, new HashMap<SimpleTestBean, SimpleTestBean>() {
{
diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket34.java b/tests/testbench/com/vaadin/tests/tickets/Ticket34.java
index 15d55ba643..67db77a5af 100644
--- a/tests/testbench/com/vaadin/tests/tickets/Ticket34.java
+++ b/tests/testbench/com/vaadin/tests/tickets/Ticket34.java
@@ -95,7 +95,7 @@ public class Ticket34 extends Application.LegacyApplication {
public void buttonClick(ClickEvent event) {
String viewName = tf.getValue().toString();
// fragmentChangedListener will change the view if possible
- event.getButton().getRoot().getPage().setFragment(viewName);
+ event.getButton().getUI().getPage().setFragment(viewName);
}
});