mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1121519, fix racy test, r=jgraham.
This commit is contained in:
parent
889a67cbfd
commit
a9f507428f
@ -13,14 +13,10 @@ postMessage(2);
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
var i = 0;
|
||||
var timeout = setTimeout(this.step_func(function(e) {
|
||||
assert_equals(i, 2);
|
||||
}), 500);
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
i++;
|
||||
assert_equals(e.data, i);
|
||||
if (i == 2) {
|
||||
clearTimeout(timeout);
|
||||
this.done();
|
||||
}
|
||||
});
|
||||
@ -28,4 +24,4 @@ async_test(function() {
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
//-->
|
||||
|
Loading…
Reference in New Issue
Block a user