Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255

This commit is contained in:
James Graham 2015-03-27 09:15:38 +00:00
parent b2a5225831
commit 1a81b18b9f
12321 changed files with 544385 additions and 6 deletions

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is same as an existing browsing context's name</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="existing.html" style="display:none"></iframe>
<iframe name="existWin" style="display:none"></iframe>
<script>
var t = async_test("The browsing context must be chosen if the given name is same as its name");
window.addEventListener("message", function (e) {
t.step(function() {
assert_equals(e.data.name, "existWin", "The browsing context name should be 'existWin'.");
});
t.done();
}, false);
frames[0].onload = t.step_func(function(e) {
frames[0].do_test();
});
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is '_parent'</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="parent1.html" name="parentWin" style="display:none"></iframe>
<script>
var t = async_test("The parent browsing context must be chosen if the given name is '_parent'");
window.addEventListener("message", function (e) {
t.step(function() {
assert_equals(e.data.name, "parentWin", "The browsing context name should be 'parentWin'.");
});
t.done();
}, false);
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is '_self'</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="self1.html" style="display:none"></iframe>
<script>
var t = async_test("The current browsing context must be chosen if the given name is '_self'");
window.addEventListener("message", function (e) {
t.step(function () {
assert_equals(e.data.name, "selfWin1", "The browsing context name should be 'selfWin1'.");
});
t.done();
}, false);
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is empty string</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="self2.html" style="display:none"></iframe>
<script>
var t = async_test("The current browsing context must be chosen if the given name is empty string");
window.addEventListener("message", function (e) {
t.step(function () {
assert_equals(e.data.name, "selfWin2", "The browsing context name should be 'selfWin2'.");
});
t.done();
}, false);
</script>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Browsing context - Default name</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="message.html" style="display:none"></iframe>
<script>
test(function () {
assert_equals(window.frames[0].name, "", "The browsing context should not have a default name.");
}, "A embedded browsing context has no default name");
test(function () {
var win = window.open("about:blank", "_blank");
assert_equals(win.name, "", "The browsing context should not have a name.");
win.close();
}, "A browsing context which is opened by window.open() method with '_blank' parameter has no default name");
//This test must be run when the current browsing context's name is not set
test(function () {
assert_equals(window.name, "", "The browsing context should not have a name.");
}, "A browsing context has no default name");
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>This is a test page</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
function do_test() {
window.open("message.html", "existWin");
}
</script>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: post window's name to top browsing context</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
top.postMessage({name: window.name}, "*");
</script>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - parent</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<iframe src="parent2.html"></iframe>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - parent</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
window.open("message.html", "_parent");
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - self</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
window.name = "selfWin1";
var win = window.open("message.html", "_self");
win.close();
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - self</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
window.name = "selfWin2";
var win = window.open("message.html", "");
win.close();
</script>