Skip to content

Commit

Permalink
Fixed a bug where if testharness.js sends a postMessage before either…
Browse files Browse the repository at this point in the history
… of the iframes reply, the test ends with a fail.
  • Loading branch information
aogilvie committed Jun 8, 2013
1 parent 1ae3061 commit 5a767ac
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions webmessaging/event.data.htm
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@

window.onmessage = t.step_func(function(e)
{
ActualResult.push(e.data, typeof(e.data));
if (e.data.toString() === "STRING") {
ActualResult.push(e.data, typeof(e.data));

if (ActualResult.length >= ExpectedResult.length)
{
assert_array_equals(ActualResult, ExpectedResult, "ActualResult");
t.done();
}
if (ActualResult.length >= ExpectedResult.length)
{
assert_array_equals(ActualResult, ExpectedResult, "ActualResult");
t.done();
}
}
});
</script>
</body>
Expand Down

0 comments on commit 5a767ac

Please sign in to comment.