Add make.text.any
This commit is contained in:
parent
6c009be41d
commit
e7773ee307
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue