Skip to content

Commit

Permalink
Add follow up changes from Print Page Java PR (#9061)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
raju249 and diemol authored Jan 21, 2021
1 parent 4d0cc24 commit 5493d43
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 50 deletions.
17 changes: 0 additions & 17 deletions java/client/src/org/openqa/selenium/print/PageMargin.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,15 @@ public double getTop() {
return top;
}

public void setTop(double top) {
this.top = Require.positive("top", top);
}

public double getBottom() {
return bottom;
}

public void setBottom(double bottom) {
this.bottom = Require.positive("bottom", bottom);
}

public double getLeft() {
return left;
}

public void setLeft(double left) {
this.left = Require.positive("left", left);
}

public double getRight() {
return right;
}

public void setRight(double right) {
this.right = Require.positive("right", right);
}

}
8 changes: 0 additions & 8 deletions java/client/src/org/openqa/selenium/print/PageSize.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,4 @@ public double getHeight() {
public double getWidth() {
return width;
}

public void setHeight(double height) {
this.height = Require.positive("height", height);
}

public void setWidth(double width) {
this.width = Require.positive("width", width);
}
}
1 change: 0 additions & 1 deletion java/client/test/org/openqa/selenium/PrintPageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public void canPrintTwoPages() {
public void canPrintWithValidParams() {
PrintOptions printOptions = new PrintOptions();
PageSize pageSize = new PageSize();
pageSize.setWidth(30.0);

printOptions.setPageRanges("1-2");
printOptions.setOrientation(PrintOptions.Orientation.Landscape);
Expand Down
14 changes: 0 additions & 14 deletions java/client/test/org/openqa/selenium/print/PageMarginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,4 @@ public void setsDefaultMarginValues() {
assertThat(pageMargin.getLeft()).isEqualTo(LEFT);
assertThat(pageMargin.getRight()).isEqualTo(RIGHT);
}

@Test
public void setsVauesAsPassed() {
PageMargin pageMargin = new PageMargin();
pageMargin.setBottom(2.0);
pageMargin.setTop(3.0);
pageMargin.setLeft(1.0);
pageMargin.setRight(2.0);

assertThat(pageMargin.getTop()).isEqualTo(3.0);
assertThat(pageMargin.getBottom()).isEqualTo(2.0);
assertThat(pageMargin.getLeft()).isEqualTo(1.0);
assertThat(pageMargin.getRight()).isEqualTo(2.0);
}
}
10 changes: 0 additions & 10 deletions java/client/test/org/openqa/selenium/print/PageSizeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,4 @@ public void setsDefaultHeightWidth() {
assertThat(pageSize.getHeight()).isEqualTo(HEIGHT);
assertThat(pageSize.getWidth()).isEqualTo(WIDTH);
}

@Test
public void setsValuesAsPassed() {
PageSize pageSize = new PageSize();
pageSize.setHeight(11.0);
pageSize.setWidth(12.0);

assertThat(pageSize.getHeight()).isEqualTo(11.0);
assertThat(pageSize.getWidth()).isEqualTo(12.0);
}
}

0 comments on commit 5493d43

Please sign in to comment.