]> source.dussan.org Git - vaadin-framework.git/commitdiff
Prevent margin collapse to make a hr visible in the test
authorLeif Åstrand <leif@vaadin.com>
Wed, 14 Mar 2012 12:26:31 +0000 (14:26 +0200)
committerLeif Åstrand <leif@vaadin.com>
Wed, 14 Mar 2012 12:26:31 +0000 (14:26 +0200)
tests/testbench/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java

index dd40726ec2caa8c43470bd128ecb1c68fa766e26..252e8ba82ccc0288e28167ebcfb9bf5ed02f12a4 100644 (file)
@@ -454,7 +454,10 @@ public class VerticalLayoutTests extends AbstractLayoutTests {
         final VerticalLayout vlo2 = getTestLaytout();
 
         vlo2.addComponent(c1);
-        vlo2.addComponent(new Label("<hr />", ContentMode.XHTML));
+        // Must add something around the hr to avoid the margins collapsing
+        vlo2.addComponent(new Label(
+                "<div style='height: 0.01px'></div><hr /><div style='height: 0.01px'></div>",
+                ContentMode.XHTML));
         vlo2.addComponent(c2);
         vlo2.setExpandRatio(c1, 0.5f);
         vlo2.setExpandRatio(c2, 0.5f);