mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Update web-platform-tests to revision c2e5b9fbaa17424f05ca2bb04609790a3b61d5c2
This commit is contained in:
parent
db7bb2a510
commit
f2c1b70e4a
138 changed files with 2799 additions and 851 deletions
|
@ -5,11 +5,8 @@
|
|||
opener.pages.push(2);
|
||||
onload = function() {
|
||||
setTimeout(function() {
|
||||
document.write("<!doctype html>3<script>opener.pages.push(3); if(!opener.started) {opener.started = true; history.go(-1);} opener.start_test_wait();<\/script>");
|
||||
document.write("<!doctype html>3<script>opener.pages.push(3); if(!opener.started) {opener.started = true; history.go(-1);}<\/script>");
|
||||
document.close();
|
||||
if (opener.started) {
|
||||
opener.start_test_wait();
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -11,12 +11,11 @@
|
|||
function() {
|
||||
check_result = t.step_func(
|
||||
function() {
|
||||
if (pages.length < 4) {
|
||||
if (pages.length < 3) {
|
||||
setTimeout(check_result, 500);
|
||||
return
|
||||
}
|
||||
//The pass condition here is based on the idea that the spec is wrong and browsers are right
|
||||
assert_array_equals(pages, [2, 3, 2, 3], "Pages opened during history navigation");
|
||||
assert_array_equals(pages, [2, 3, 1], "Pages opened during history navigation");
|
||||
t.done();
|
||||
}
|
||||
)
|
||||
|
|
|
@ -3,11 +3,16 @@
|
|||
<script>
|
||||
function f() {
|
||||
opener.postMessage("original", "*");
|
||||
if (opener.data.length >= 2) {
|
||||
// If we proceed here, then our document.write will be racing with the
|
||||
// setTimeout in our opener. Just stop.
|
||||
return;
|
||||
}
|
||||
setTimeout(function () {
|
||||
document.open();
|
||||
document.write("<!doctype html>2<script>opener.postMessage('written', '*');<\/script>");
|
||||
document.close();
|
||||
}), 100;
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = f
|
||||
|
|
|
@ -11,11 +11,11 @@ var data = [];
|
|||
|
||||
window.onmessage = t.step_func(function(e) {
|
||||
data.push(e.data);
|
||||
if (data.length < 3) {
|
||||
if (data.length == 2) {
|
||||
win.location.reload();
|
||||
} else {
|
||||
} else if (data.length >= 3) {
|
||||
setTimeout(t.step_func(function() {
|
||||
assert_array_equals(data, ["original", "written", "written"]);
|
||||
assert_array_equals(data, ["original", "written", "original"]);
|
||||
t.done();
|
||||
}), 500);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue