From 12b6a8b42f3327e315e617e015304c4cc9dd4fa8 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 6 Nov 2013 17:17:42 +0200 Subject: [PATCH] Test for broken Webkit feature which causes extra scrollbars (#12736, #12727) This is the original cause for the Vaadin issues Live test at http://artur.virtuallypreinstalled.com/webkit-scrollbars.html Change-Id: Iaf9a46b635fabcb7cd795547c782c596aa57ce12 --- .../WebkitPositionAbsoluteScrollbars.html | 69 +++++++++++++++++++ .../WebkitPositionAbsoluteScrollbarsTest.java | 39 +++++++++++ 2 files changed, 108 insertions(+) create mode 100644 WebContent/statictestfiles/browserfeatures/WebkitPositionAbsoluteScrollbars.html create mode 100644 uitest/src/com/vaadin/tests/browserfeatures/WebkitPositionAbsoluteScrollbarsTest.java diff --git a/WebContent/statictestfiles/browserfeatures/WebkitPositionAbsoluteScrollbars.html b/WebContent/statictestfiles/browserfeatures/WebkitPositionAbsoluteScrollbars.html new file mode 100644 index 0000000000..7547816006 --- /dev/null +++ b/WebContent/statictestfiles/browserfeatures/WebkitPositionAbsoluteScrollbars.html @@ -0,0 +1,69 @@ + + + + + +
+ Starting point: No horizontal scrollbar
+ Expected: Get back to starting point after clicking through steps (do 1, do 2, cancel 1, cancel 2)
+ Actual: Scrollbars after doing the steps

+
+ + + + +
+
+
+
+
+
+
+
+ + + + + + diff --git a/uitest/src/com/vaadin/tests/browserfeatures/WebkitPositionAbsoluteScrollbarsTest.java b/uitest/src/com/vaadin/tests/browserfeatures/WebkitPositionAbsoluteScrollbarsTest.java new file mode 100644 index 0000000000..54fb7212ca --- /dev/null +++ b/uitest/src/com/vaadin/tests/browserfeatures/WebkitPositionAbsoluteScrollbarsTest.java @@ -0,0 +1,39 @@ +/* + * 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.browserfeatures; + +import org.junit.Test; +import org.openqa.selenium.By; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class WebkitPositionAbsoluteScrollbarsTest extends MultiBrowserTest { + + @Override + protected String getDeploymentPath() { + return "/statictestfiles/browserfeatures/WebkitPositionAbsoluteScrollbars.html"; + } + + @Test + public void testWebkitScrollbarProblem() throws Exception { + openTestURL(); + getDriver().findElement(By.id("step1")).click(); + getDriver().findElement(By.id("step2")).click(); + getDriver().findElement(By.id("step3")).click(); + getDriver().findElement(By.id("step4")).click(); + compareScreen("no-scrollbars"); + } +} -- 2.39.5