mirror of
https://github.com/servo/servo.git
synced 2025-08-22 05:45:33 +01:00
Update web-platform-tests to revision 5e377e222095625488698633a435d6c19e4d611d
This commit is contained in:
parent
53d9ca1bcd
commit
53868fcf1b
18 changed files with 265 additions and 38 deletions
|
@ -42,13 +42,23 @@
|
|||
|
||||
window.onmessage = t.step_func(function(e)
|
||||
{
|
||||
// testharness.js uses postMessage so we must check what data we want to receive
|
||||
if (e.data.toString() === "#1" || e.data.toString() === "#2") {
|
||||
ActualResult.push(e.data, e.origin);
|
||||
if (ActualResult.length === ExpectedResult.length) {
|
||||
assert_array_equals(ActualResult, ExpectedResult, "ActualResult");
|
||||
t.done();
|
||||
}
|
||||
// Messages from TARGET1 and TARGET2 can come in any order
|
||||
// (since one of them is cross-origin and can run in parallel).
|
||||
// To make the tests immune to message reordering, always
|
||||
// put the response from TARGET1 at the start of the list.
|
||||
if (e.data.toString() === "#1")
|
||||
{
|
||||
ActualResult = [e.data, e.origin].concat(ActualResult);
|
||||
}
|
||||
else if (e.data.toString() === "#2")
|
||||
{
|
||||
ActualResult = ActualResult.concat([e.data, e.origin]);
|
||||
}
|
||||
|
||||
if (ActualResult.length >= ExpectedResult.length)
|
||||
{
|
||||
assert_array_equals(ActualResult, ExpectedResult, "ActualResult");
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -42,7 +42,18 @@
|
|||
|
||||
window.onmessage = t.step_func(function(e)
|
||||
{
|
||||
ActualResult.push(e.data, e.origin);
|
||||
// Messages from TARGET1 and TARGET2 can come in any order
|
||||
// (since one of them is cross-origin and can run in parallel).
|
||||
// To make the tests immune to message reordering, always
|
||||
// put the response from TARGET1 at the start of the list.
|
||||
if (e.data.toString() === "#1")
|
||||
{
|
||||
ActualResult = [e.data, e.origin].concat(ActualResult);
|
||||
}
|
||||
else if (e.data.toString() === "#2")
|
||||
{
|
||||
ActualResult = ActualResult.concat([e.data, e.origin]);
|
||||
}
|
||||
|
||||
if (ActualResult.length >= ExpectedResult.length)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue