Update web-platform-tests to revision 3d117ae1266e6bd039a3a1ab92b27e82c3ccc92d

This commit is contained in:
WPT Sync Bot 2018-09-23 21:29:48 -04:00
parent 647796ede6
commit 20a08918d9
132 changed files with 3012 additions and 689 deletions

View file

@ -1,6 +1,8 @@
function assert_equal_to_array(table, expected, message) {
assert_equals(table.length, expected.length, `${message}: length`);
assert_throws(new RangeError(), () => table.get(-1), `${message}: table.get(-1)`);
// The argument check in get() happens before the range check, and negative numbers
// are illegal, hence will throw TypeError per spec.
assert_throws(new TypeError(), () => table.get(-1), `${message}: table.get(-1)`);
for (let i = 0; i < expected.length; ++i) {
assert_equals(table.get(i), expected[i], `${message}: table.get(${i} of ${expected.length})`);
}