aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrlTest.java
blob: 0de5ae432e196a8d0370b9e195a3320bbc6d2b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.vaadin.tests.layouts;

import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import com.vaadin.tests.tb3.SingleBrowserTest;

public class CssLayoutAbsoluteUrlTest extends SingleBrowserTest {
    @Test
    public void testAboutBlankStyle() {
        openTestURL();

        WebElement myLabel = findElement(By.id("myLabel"));

        String backgroundImage = myLabel.getCssValue("background-image");

        // Not testing string equality since some browsers return the style with
        // quotes around the url argument and some without quotes.
        assertTrue(backgroundImage + " does not contain 'about:blank'",
                backgroundImage.contains("about:blank"));
    }
}