Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326

This commit is contained in:
Josh Matthews 2017-10-12 09:25:50 -04:00
parent 462c272380
commit 1f531f66ea
5377 changed files with 174916 additions and 84369 deletions

View file

@ -9,7 +9,6 @@
<div style="display:none">
<p name="a" id="p1"></p>
<a name="a" id="a1" href="#"></a>
<applet name="a" id="app1"></applet>
<area name="a" id="area1"></area>
<embed name="a" id="embed1"></embed>
<form name="a" id="form1"></form>
@ -33,10 +32,9 @@ test(function() {
}, "Check if the first nested browsing context is returned by window['c']");
test(function() {
assert_equals(window['a'].length, 5, "The length should be 5.");
assert_true(window['a'] instanceof HTMLCollection);
assert_array_equals(window['a'],
[ document.getElementById('app1'), document.getElementById('embed1'),
[ document.getElementById('embed1'),
document.getElementById('form1'), document.getElementById('img1'),
document.getElementById('obj1') ],
"The elements are not in tree order.");
@ -44,10 +42,10 @@ test(function() {
document.getElementById('form1').setAttribute("name", "");
document.getElementById('embed1').setAttribute("name", "");
assert_array_equals(window['a'],
[ document.getElementById('app1'), document.getElementById('img1'),
[ document.getElementById('img1'),
document.getElementById('obj1') ],
"Window['a'] should not contain the elements with empty name attribute.");
}, "Check if window['a'] contains all applet, embed, form, img, and object elements, and their order");
}, "Check if window['a'] contains all embed, form, img, and object elements, and their order");
var t = async_test("Check that window['fs'] does not return the frameset element with name='fs' (historical)");
function on_load () {

View file

@ -17,6 +17,12 @@ test(function() {
window[-1] = "foo";
assert_equals(window[-1], "foo");
});
test(() => {
const desc = Object.getOwnPropertyDescriptor(window, "0");
assert_true(desc.configurable);
assert_true(desc.enumerable);
assert_false(desc.writable);
}, "Ensure indexed properties have the correct configuration");
test(function() {
window[0] = "foo";
assert_throws(new TypeError(), () => Object.defineProperty(window, 0, { value: "bar" }))

View file

@ -60,7 +60,7 @@ var t = async_test("Dynamic name")
var t2 = async_test("Ghost name")
t.step(function() {
var iframe = document.getElementsByTagName("iframe")[0];
iframe.setAttribute("src", "data:text/html,<script>window.name='foo'<\/script>");
iframe.setAttribute("srcdoc", "<script>window.name='foo'<\/script>");
iframe.onload = function() {
t.step(function() {
assert_true("foo" in window, "foo not in window");