Examples of BrowserInfo


Examples of com.google.jstestdriver.BrowserInfo

      SlaveBrowser slaveBrowser =
          capturedBrowsers.getBrowser(response.getBrowser().getId().toString());
    if (slaveBrowser != null) {
      response.setBrowser(slaveBrowser.getBrowserInfo());
    } else {
      BrowserInfo nullBrowserInfo = new BrowserInfo();
      nullBrowserInfo.setId(response.getBrowser().getId());
      nullBrowserInfo.setName("unknown browser");
      nullBrowserInfo.setVersion("unknown version");
      nullBrowserInfo.setOs("unknown os");
      response.setBrowser(nullBrowserInfo);
    }
    return new StreamMessage(cmdResponse.isLast(), response);
  }
View Full Code Here

Examples of com.google.jstestdriver.BrowserInfo

        RunnerType.CLIENT, FileUploader.CHUNK_SIZE);
  }

  public SlaveBrowser captureBrowser(String rawId, String name, String version, String os,
      Long browserTimeout, String mode, RunnerType type, Integer uploadSize) {
    BrowserInfo browserInfo = new BrowserInfo();

    final Long id = parseBrowserId(rawId);
    browserInfo.setId(id);
    browserInfo.setName(name);
    browserInfo.setVersion(version);
    browserInfo.setOs(os);
    browserInfo.setUploadSize(uploadSize != null ? uploadSize : FileUploader.CHUNK_SIZE);
    // TODO(corysmith):move all browser timeout configuration to the proper place.
    // TODO(corysmith):figure out where that is.
    long computedBrowserTimeout = computeTimeout(browserTimeout);
    SlaveBrowser slave =
        new SlaveBrowser(time, id.toString(), browserInfo, computedBrowserTimeout, prefix, mode,
View Full Code Here

Examples of com.google.jstestdriver.BrowserInfo

    writer.write("<p><strong>Captured Browsers: (");
    writer.write(String.valueOf(capturedBrowsers.getSlaveBrowsers().size()));
    writer.write(")</strong></p>");
    for (SlaveBrowser browser : capturedBrowsers.getSlaveBrowsers()) {
      writer.write("<div>");
      BrowserInfo info = browser.getBrowserInfo();
      writer.write("Id: " + info.getId() + "<br/>");
      writer.write("Name: " + info.getName() + "<br/>");
      writer.write("Version: " + info.getVersion() + "<br/>");
      writer.write("Operating System: " + info.getOs() + "<br/>");
      writer.write(browser.inUse() ? "In use.<br/>" : "Not in use.<br/>");
      writer.write(String.format("RunnerType %s <br/>", browser.getRunnerType()));
      if (browser.getCommandRunning() != null) {
        writer.write("Currently running " + browser.getCommandRunning() + "<br/>");
      } else {
View Full Code Here

Examples of com.vaadin.client.BrowserInfo

     * string. See #8004.
     *
     * @return cleaned html string
     */
    public String getSanitizedValue() {
        BrowserInfo browser = BrowserInfo.get();
        String result = getValue();
        if (browser.isFirefox()) {
            if ("<br>".equals(result)) {
                result = "";
            }
        } else if (browser.isWebkit()) {
            if ("<br>".equals(result) || "<div><br></div>".equals(result)) {
                result = "";
            }
        } else if (browser.isIE()) {
            if ("<P>&nbsp;</P>".equals(result)) {
                result = "";
            }
        } else if (browser.isOpera()) {
            if ("<br>".equals(result) || "<p><br></p>".equals(result)) {
                result = "";
            }
        }
        return result;
View Full Code Here

Examples of com.vaadin.client.BrowserInfo

            });
        }
    }

    protected boolean browserSupportsMaxLengthAttribute() {
        BrowserInfo info = BrowserInfo.get();
        if (info.isFirefox() && info.isBrowserVersionNewerOrEqual(4, 0)) {
            return true;
        }
        if (info.isSafari() && info.isBrowserVersionNewerOrEqual(5, 0)) {
            return true;
        }
        if (info.isIE() && info.isBrowserVersionNewerOrEqual(10, 0)) {
            return true;
        }
        if (info.isAndroid() && info.isBrowserVersionNewerOrEqual(2, 3)) {
            return true;
        }
        return false;
    }
View Full Code Here

Examples of com.vaadin.client.BrowserInfo

     * shim iframes if they are not needed.
     *
     * @return true if a shim iframe should be added, false otherwise
     */
    protected boolean needsShimElement() {
        BrowserInfo info = BrowserInfo.get();
        return info.isIE() && info.isBrowserVersionNewerOrEqual(8, 0);
    }
View Full Code Here

Examples of com.vaadin.client.BrowserInfo

    public void center() {
        super.center();

        // Some devices can be zoomed in, we should center to the visual
        // viewport for those devices
        BrowserInfo b = BrowserInfo.get();
        if (b.isAndroid() || b.isIOS()) {
            int left = (getVisualViewportWidth() - getOffsetWidth()) >> 1;
            int top = (getVisualViewportHeight() - getOffsetHeight()) >> 1;
            setPopupPosition(Math.max(Window.getScrollLeft() + left, 0),
                    Math.max(Window.getScrollTop() + top, 0));
        }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.BrowserInfo

            super.addAndRemoveRows(partialRowAdditions);
        }
    }

    private boolean browserSupportsAnimation() {
        BrowserInfo bi = BrowserInfo.get();
        return !(bi.isIE6() || bi.isIE7() || bi.isSafari4());
    }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.BrowserInfo

        RootPanel root = RootPanel.get(rootPanelId);
        root.add(this);
        root.removeStyleName("v-app-loading");

        BrowserInfo browser = BrowserInfo.get();

        // set focus to iview element by default to listen possible keyboard
        // shortcuts
        if (browser.isOpera() || browser.isSafari()
                && browser.getWebkitVersion() < 526) {
            // old webkits don't support focusing div elements
            Element fElem = DOM.createInputCheck();
            DOM.setStyleAttribute(fElem, "margin", "0");
            DOM.setStyleAttribute(fElem, "padding", "0");
            DOM.setStyleAttribute(fElem, "border", "0");
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.BrowserInfo

     *
     * @param html
     * @return cleaned html string
     */
    private String sanitizeRichTextAreaValue(String html) {
        BrowserInfo browser = BrowserInfo.get();
        String result = html;
        if (browser.isFirefox()) {
            if ("<br>".equals(html)) {
                result = "";
            }
        } else if (browser.isWebkit()) {
            if ("<div><br></div>".equals(html)) {
                result = "";
            }
        } else if (browser.isIE()) {
            if ("<P>&nbsp;</P>".equals(html)) {
                result = "";
            }
        } else if (browser.isOpera()) {
            if ("<br>".equals(html) || "<p><br></p>".equals(html)) {
                result = "";
            }
        }
        return result;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.