Update web-platform-tests to revision bda2059150dca8ab47f088b4cc619fcdc1f262fa

This commit is contained in:
Ms2ger 2016-05-30 09:58:25 +02:00
parent 3535f3f6c2
commit 7c4281f3da
182 changed files with 7692 additions and 1042 deletions

View file

@ -1,7 +1,7 @@
<!doctype html>
<script>
onload = function() {
parent.postMessage("003-1", "*");
setTimeout(function() {location = location.replace("http://", "http://www.").replace("004-1.html", "004-2.html");}, 100);
parent.postMessage("004-1", "*");
setTimeout(function() {location = location.href.replace("http://", "http://www.").replace("004-1.html", "004-2.html");}, 100);
}
</script>

View file

@ -3,7 +3,7 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe name="test"></iframe>
<iframe id="test" name="test"></iframe>
<a target="test" onclick="document.getElementById('test').contentWindow.location='click.html'" href="href.html">Test</a>
<script>
var t = async_test();

View file

@ -4,6 +4,10 @@
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe id="test" name="test"></iframe>
<!-- XXX: What is this test trying to do? It's navigating the subframe, but
doing a write() to _this_ document, and the "javascript:" in there is
completely a red herring: it's a label, not a protocol. There is no
javascript url involved here, unlike what the title claims! -->
<a target="test" onclick="javascript:(function() {var x = new XMLHttpRequest(); x.open('GET', 'blank.html?pipe=trickle(d2)', false); x.send(); document.write('write<script>parent.postMessage(&quot;write&quot;, &quot;*&quot;)</script>'); return '<script>parent.postMessage(&quot;click&quot;, &quot;*&quot;)</script>'})()" href="href.html">Test</a>
<script>
var t = async_test(undefined, {timeout:4000});

View file

@ -13,8 +13,8 @@ t.step(function() {
events.push('after script');
});
onload = t.step_func(function() {
//assuming the order is sync
assert_array_equals(events, ['javascript', 'after script']);
// javascript: executions are async.
assert_array_equals(events, ['after script', 'javascript']);
t.done();
});
</script>

View file

@ -14,8 +14,8 @@ t.step(function() {
events.push('after script');
});
onload = t.step_func(function() {
//assuming the order is sync
assert_array_equals(events, ['javascript', 'after script']);
// javascript: executions are async.
assert_array_equals(events, ['after script', 'submit']);
t.done();
});
</script>

View file

@ -13,8 +13,8 @@ t.step(function() {
events.push('after script');
});
onload = t.step_func(function() {
//assuming the order is sync
assert_array_equals(events, ['click', 'href', 'after script']);
// javascript: executions are async.
assert_array_equals(events, ['click', 'after script', 'href']);
t.done();
});
</script>

View file

@ -0,0 +1,32 @@
<!doctype html>
<meta charset=utf-8>
<title>Test that javascript: evaluation only performs a navigation to the
result when the result is a string value.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<iframe src="javascript:'1'"></iframe>
<iframe src="javascript:1"></iframe>
<iframe src="javascript:({ toString: function() { return '1'; } })"></iframe>
<iframe src="javascript:undefined"></iframe>
<iframe src="javascript:null"></iframe>
<iframe src="javascript:true"></iframe>
<iframe src="javascript:new String('1')"></iframe>
<script>
var t = async_test();
onload = t.step_func_done(function() {
assert_equals(frames[0].document.documentElement.textContent,
"1", "string return should cause navigation");
assert_equals(frames[1].document.documentElement.textContent,
"", "number return should not cause navigation");
assert_equals(frames[2].document.documentElement.textContent,
"", "object return should not cause navigation");
assert_equals(frames[3].document.documentElement.textContent,
"", "undefined return should not cause navigation");
assert_equals(frames[4].document.documentElement.textContent,
"", "null return should not cause navigation");
assert_equals(frames[5].document.documentElement.textContent,
"", "null return should not cause navigation");
assert_equals(frames[6].document.documentElement.textContent,
"", "String object return should not cause navigation");
});
</script>