8318113: CSS.BackgroundImage doesn't implement equals
Reviewed-by: aivanov, tr, prr
This commit is contained in:
parent
28d3762bd3
commit
12723688ca
@ -2965,6 +2965,17 @@ public class CSS implements Serializable {
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(svalue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object val) {
|
||||
return val instanceof CSS.BackgroundImage img
|
||||
&& Objects.equals(svalue, img.svalue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ import javax.swing.text.html.StyleSheet;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 7083187
|
||||
* @bug 7083187 8318113
|
||||
* @summary Verifies if CSS.CSSValue attribute is same
|
||||
* @run main CSSAttributeEqualityBug
|
||||
*/
|
||||
@ -72,6 +72,9 @@ public class CSSAttributeEqualityBug {
|
||||
"background-position: 1em 2em",
|
||||
|
||||
"border-width: medium",
|
||||
|
||||
"background-image: none",
|
||||
"background-image: url(image.png)",
|
||||
};
|
||||
|
||||
/**
|
||||
@ -86,6 +89,8 @@ public class CSSAttributeEqualityBug {
|
||||
{"margin-top: 42px", "margin-top: 22px"},
|
||||
{"margin-top: 42px", "margin-top: 42pt"},
|
||||
{"margin-top: 100%", "margin-top: 50%"},
|
||||
|
||||
{"background-image: none", "background-image: url(image.png)"},
|
||||
};
|
||||
|
||||
private static final String[][] EQUALS_WITH_SPACE = {
|
||||
|
Loading…
Reference in New Issue
Block a user