Skip to content

Commit

Permalink
Merge pull request #195 from aogilvie/submissions/aogilvie
Browse files Browse the repository at this point in the history
Fixed a bug where if testharness.js sends a postMessage before either of the iframes reply, the test ends with a fail.
  • Loading branch information
jgraham committed Jun 8, 2013
2 parents 3000064 + 5a767ac commit 96fd027
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 96fd027

Please sign in to comment.