Tests: Fixed bug in displayed assertion
This `displayed` assertion had a bug that was causing it to not actually check anything (it was using obj.length instead of data_cl.length). This fixes that.
This commit is contained in:
parent
340290fa1d
commit
bb180145c6
|
@ -6,10 +6,15 @@ chai.use(function (_chai, utils) {
|
||||||
// NB(directxman12): PhantomJS 1.x doesn't implement Uint8ClampedArray, so work around that
|
// NB(directxman12): PhantomJS 1.x doesn't implement Uint8ClampedArray, so work around that
|
||||||
var data = new Uint8Array(data_cl);
|
var data = new Uint8Array(data_cl);
|
||||||
var same = true;
|
var same = true;
|
||||||
for (var i = 0; i < obj.length; i++) {
|
var len = data_cl.length;
|
||||||
if (data[i] != target_data[i]) {
|
if (len != target_data.length) {
|
||||||
same = false;
|
same = false;
|
||||||
break;
|
} else {
|
||||||
|
for (var i = 0; i < len; i++) {
|
||||||
|
if (data[i] != target_data[i]) {
|
||||||
|
same = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!same) {
|
if (!same) {
|
||||||
|
|
Loading…
Reference in New Issue