aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components
diff options
context:
space:
mode:
authorFelype Santiago Ferreira <felype@vaadin.com>2013-10-18 10:44:35 +0300
committerVaadin Code Review <review@vaadin.com>2013-10-21 12:25:17 +0000
commitab5b20cf502f99944c82f619ffef387f0525e8ba (patch)
tree89f133da014af4098fbd9f6d88df30f0c936d37e /uitest/src/com/vaadin/tests/components
parent6f76840f6c9be57be0b23e22df2b968a1a876f67 (diff)
downloadvaadin-framework-ab5b20cf502f99944c82f619ffef387f0525e8ba.tar.gz
vaadin-framework-ab5b20cf502f99944c82f619ffef387f0525e8ba.zip
Ticket #12727 - Panels get unnecessary scroll bars in WebKit when content is 100% wide.
Change-Id: Ia34e7c3ce755556460d237fb3489501274ced39f
Diffstat (limited to 'uitest/src/com/vaadin/tests/components')
-rw-r--r--uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.html27
-rw-r--r--uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.java63
2 files changed, 90 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.html b/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.html
new file mode 100644
index 0000000000..ee33ee2bf0
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.html
@@ -0,0 +1,27 @@
+<?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.panel.WebkitScrollbarTest?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>panelShouldNotHaveScrollbars</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.java b/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.java
new file mode 100644
index 0000000000..8981f52f12
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/panel/WebkitScrollbarTest.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.tests.components.panel;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.ListSelect;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.VerticalLayout;
+
+@SuppressWarnings("serial")
+public class WebkitScrollbarTest extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ Panel panel = new Panel();
+
+ VerticalLayout content = new VerticalLayout();
+ panel.setContent(content);
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.setHeight(null);
+ gridLayout.setWidth(100, Unit.PERCENTAGE);
+ content.addComponent(gridLayout);
+
+ ListSelect listSelect = new ListSelect();
+
+ listSelect.setWidth(100, Unit.PERCENTAGE);
+ listSelect.setHeight(300, Unit.PIXELS);
+
+ gridLayout.addComponent(listSelect);
+
+ gridLayout.setMargin(true);
+
+ setContent(panel);
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "When opening the window, it should NOT contain a horizontal";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 12727;
+ }
+
+}