summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/VerifyBrowserVersion.java
blob: 8a07168ef703264b33b0bc2a03d9d7c1a2a36f75 (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
26
27
28
29
package com.vaadin.tests;

import com.vaadin.server.WebApplicationContext;
import com.vaadin.server.WebBrowser;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Label;

public class VerifyBrowserVersion extends TestBase {

    @Override
    protected void setup() {
        WebApplicationContext context = (WebApplicationContext) getContext();
        WebBrowser browser = context.getBrowser();
        addComponent(new Label(browser.getBrowserApplication()));
        addComponent(new Label("Touch device? "
                + (browser.isTouchDevice() ? "YES" : "No")));
    }

    @Override
    protected String getDescription() {
        return "Silly test just to get a screenshot of the browser's user agent string";
    }

    @Override
    protected Integer getTicketNumber() {
        return Integer.valueOf(7655);
    }

}