Update web-platform-tests to revision ddfc95cf0493ae147a4f6a4d7be8eff1a0c23098

This commit is contained in:
Anthony Ramine 2018-01-18 10:15:04 +01:00
parent 1f6a864ab5
commit 7e6290451f
832 changed files with 16026 additions and 2649 deletions

View file

@ -6,25 +6,21 @@
<pre id="step_log"></pre>
<iframe id="test"></iframe>
<script>
var t = async_test(undefined, {timeout:10000});
var f = document.getElementById("test");
var l = document.getElementById("step_log");
var navigated = false;
log = function(t) {l.textContent += ("\n" + t)}
var steps = [
function() {f.src = "browsing_context_name-1.html"},
function() {
navigated = true;
assert_equals(f.contentWindow.name, "test", "Initial load");
setTimeout(next, 0);
},
function() {f.src = "browsing_context_name-3.html"},
function() {
var navigated = true;
assert_equals(f.contentWindow.name, "test3", "Initial load");
assert_equals(f.contentWindow.name, "test3", "After navigation 1");
setTimeout(next, 0);
},
function() {f.src = f.src.replace("http://", "http://www.").replace("browsing_context_name-3", "browsing_context_name-2");},
@ -33,10 +29,10 @@ var steps = [
},
function() {history.go(-2); setTimeout(next, 500)},
function() {
assert_equals(f.contentWindow.name, "test3", "After navigation");
assert_equals(f.contentWindow.name, "test3", "After navigation 2");
t.done();
}
].map(function(x) {return t.step_func(function() {log("Step " + step); x()})});
].map(function(x) {return t.step_func(function() {log("Step " + step + " " + f.contentWindow.location); x()})});
var step = 0;
next = t.step_func(function() {steps[step++]()});

View file

@ -9,31 +9,28 @@
var t = async_test(undefined, {timeout:10000});
var f = document.getElementById("test");
var l = document.getElementById("step_log");
var navigated = false;
log = function(t) {l.textContent += ("\n" + t)}
var steps = [
function() {f.src = "browsing_context_name-1.html"},
function() {
navigated = true;
assert_equals(f.contentWindow.name, "test", "Initial load");
setTimeout(next, 0);
},
function() {f.src = "browsing_context_name-3.html"},
function() {
var navigated = true;
assert_equals(f.contentWindow.name, "test3", "Initial load");
assert_equals(f.contentWindow.name, "test3", "After navigation 1");
setTimeout(next, 0);
},
function() {f.src = f.src.replace("http://", "http://www.").replace("browsing_context_name-1", "browsing_context_name-2");},
function() {f.src = f.src.replace("http://www.", "http://").replace("browsing_context_name-2", "browsing_context_name-4");},
function() {
assert_equals(f.contentWindow.name, "test3", "After navigation");
assert_equals(f.contentWindow.name, "test3", "After navigation 2");
history.go(-3); setTimeout(next, 500)
},
function() {
assert_equals(f.contentWindow.name, "test3", "After navigation");
assert_equals(f.contentWindow.name, "test3", "After navigation 3");
t.done();
}
].map(function(x) {return t.step_func(function() {log("Step " + step + " " + f.contentWindow.location); x()})});