Add make.text.any

This commit is contained in:
pyoor 2017-05-31 15:28:33 -04:00
parent 6c009be41d
commit e7773ee307

View file

@ -188,5 +188,17 @@ make.text = {
String.fromCharCode(make.text.layoutCharCodes),
String.fromCharCode(make.text.bidiCharCodes),
]);
},
any: function() {
// Generate a string compromised of random individual characters
// This might be too slow to used for all 'texts' uses
let s = "";
// TODO: Len calculation take from DOMFuzz - maybe we should revise this?
let len = random.number(1000) * random.number(10) + random.number(10)
for (let i=0; i<len; i++) {
let t = make.text.chars()
s += random.pick(t);
}
return s;
}
}