Package com.opera.core.systems.model

Examples of com.opera.core.systems.model.Canvas


  public Canvas canvas;

  @Test
  public void construction() {
    canvas = new Canvas();

    assertEquals(0, canvas.getX());
    assertEquals(0, canvas.getY());
    assertEquals(0, canvas.getWidth());
    assertEquals(0, canvas.getHeight());
View Full Code Here


    assertFalse(canvas.isViewPortRelative());
  }

  @Test
  public void constructionWithArguments() {
    canvas = new Canvas(1, 2, 3, 4);

    assertEquals(1, canvas.getX());
    assertEquals(2, canvas.getY());
    assertEquals(3, canvas.getWidth());
    assertEquals(4, canvas.getHeight());
View Full Code Here

    assertFalse(canvas.isViewPortRelative());
  }

  @Test
  public void settingViewPortRelative() {
    canvas = new Canvas();
    canvas.setViewPortRelative(true);
    assertTrue(canvas.isViewPortRelative());
  }
View Full Code Here

    assertTrue(canvas.isViewPortRelative());
  }

  @Test
  public void equalityNull() {
    canvas = new Canvas();
    assertFalse(canvas.equals(null));
  }
View Full Code Here

    assertFalse(canvas.equals(null));
  }

  @Test
  public void equalityOtherObject() {
    canvas = new Canvas();
    assertFalse(canvas.equals(""));
  }
View Full Code Here

    assertFalse(canvas.equals(""));
  }

  @Test
  public void equalityEmptyCanvas() {
    canvas = new Canvas();
    Canvas secondCanvas = new Canvas();
    assertEquals(canvas, secondCanvas);
  }
View Full Code Here

    assertEquals(canvas, secondCanvas);
  }

  @Test
  public void equalityDifferentCanvases() {
    canvas = new Canvas(1, 2, 3, 4);
    Canvas secondCanvas = new Canvas();
    assertNotSame(canvas, secondCanvas);
  }
View Full Code Here

    assertNotSame(canvas, secondCanvas);
  }

  @Test
  public void equalityDifferentCanvasesWithViewPortRelative() {
    canvas = new Canvas();
    canvas.setViewPortRelative(true);
    Canvas secondCanvas = new Canvas();
    assertNotSame(canvas, secondCanvas);
  }
View Full Code Here

    assertNotSame(canvas, secondCanvas);
  }

  @Test
  public void stringification() {
    canvas = new Canvas();
    assertNotNull(canvas.toString());
    assertThat(canvas.toString(), containsString("Canvas"));
    assertThat(canvas.toString(), containsString("x=0"));
    assertThat(canvas.toString(), containsString("y=0"));
    assertThat(canvas.toString(), containsString("width=0"));
View Full Code Here

   */
  public String saveScreenshot(String filename, long timeout, boolean includeImage,
                               List<String> hashes) {
    assertElementNotStale();

    Canvas canvas = buildCanvas();
    ScreenCaptureReply reply =
        exec.screenWatcher(canvas, timeout, includeImage, hashes);

    if (includeImage && reply.getPng() != null) {
      FileChannel stream;
View Full Code Here

TOP

Related Classes of com.opera.core.systems.model.Canvas

Copyright © 2018 www.massapicom. 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.