Added explicit isNaN checks to the results of parseInt function
because JavaScript would always convert 0 to false.
Change-Id: Ic904c321c0195ce50d9a498005459425b0c30d4c
var min = parseInt(bp[1]);
var max = parseInt(bp[2]);
- if(min && max) {
+ if(!isNaN(min) && !isNaN(max)) {
if(min <= size && size <= max) {
ranges += " " + bp[1] + "-" + bp[2];
}
- } else if (min) {
+ } else if (!isNaN(min)) {
if(min <= size) {
ranges += " " + bp[1] + "-";
}
- } else if (max) {
+ } else if (!isNaN(max)) {
if (size <= max) {
ranges += " -" + bp[2];
}
assertEquals("-200px",
$(".v-csslayout-grid.first").getAttribute("width-range"));
+ moveSplitter(-100);
+ assertEquals("0-100px",
+ $(".v-csslayout-grid.second").getAttribute("width-range"));
}
private void moveSplitter(int xOffset) {