GeezerVison is showing github.com — test: update WPT resources · nodejs/node@d86fcbf
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/LICENSE.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # The 3-Clause BSD License | 2 | 2 |
| 3 | | -Copyright 2019 web-platform-tests contributors | | 3 | +Copyright © web-platform-tests contributors | 4 | 4 |
| 5 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | 6 | 6 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/README.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -24,7 +24,7 @@ Last update: | 24 | 24 | - html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/5873f2d8f1/html/webappapis/timers | 25 | 25 | - interfaces: https://github.com/web-platform-tests/wpt/tree/fc086c82d5/interfaces | 26 | 26 | - performance-timeline: https://github.com/web-platform-tests/wpt/tree/17ebc3aea0/performance-timeline | 27 | | -- resources: https://github.com/web-platform-tests/wpt/tree/c5b428f15a/resources | | 27 | +- resources: https://github.com/web-platform-tests/wpt/tree/fbf1e7d247/resources | 28 | 28 | - streams: https://github.com/web-platform-tests/wpt/tree/9e5ef42bd3/streams | 29 | 29 | - url: https://github.com/web-platform-tests/wpt/tree/0e5b126cd0/url | 30 | 30 | - user-timing: https://github.com/web-platform-tests/wpt/tree/df24fb604e/user-timing | |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/resources/channel.sub.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 604 | 604 | * @returns {Promise} - Resolved once the channel is disconnected. | 605 | 605 | */ | 606 | 606 | disconnectReader() { | 607 | | - // This causes any readers to disconnect until they are explictly reconnected | | 607 | + // This causes any readers to disconnect until they are explicitly reconnected | 608 | 608 | return this.sendChannel.disconnectReader(); | 609 | 609 | } | 610 | 610 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/resources/idlharness-shadowrealm.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -36,7 +36,7 @@ function idl_test_shadowrealm(srcs, deps) { | 36 | 36 | isWindow: function() { return false; }, | 37 | 37 | isWorker: function() { return false; }, | 38 | 38 | isShadowRealm: function() { return true; }, | 39 | | - }; | | 39 | + }; undefined; | 40 | 40 | `); | 41 | 41 |
| 42 | 42 | const ss = await Promise.all(script_urls.map(url => fetch_text(url))); | |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/resources/idlharness.js +103-6Lines changed: 103 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1529,12 +1529,12 @@ IdlInterface.prototype.test_self = function() | 1529 | 1529 | // https://github.com/heycam/webidl/issues/698 | 1530 | 1530 | assert_true(isConstructor(this.get_interface_object()), "interface object must pass IsConstructor check"); | 1531 | 1531 |
| | 1532 | + var interface_object = this.get_interface_object(); | | 1533 | + assert_throws_js(globalOf(interface_object).TypeError, function() { | | 1534 | + interface_object(); | | 1535 | + }, "interface object didn't throw TypeError when called as a function"); | | 1536 | + | 1532 | 1537 | if (!this.constructors().length) { | 1533 | | - // "If I was not declared with a constructor operation, then throw a TypeError." | 1534 | | - var interface_object = this.get_interface_object(); | 1535 | | - assert_throws_js(globalOf(interface_object).TypeError, function() { | 1536 | | - interface_object(); | 1537 | | - }, "interface object didn't throw TypeError when called as a function"); | 1538 | 1538 | assert_throws_js(globalOf(interface_object).TypeError, function() { | 1539 | 1539 | new interface_object(); | 1540 | 1540 | }, "interface object didn't throw TypeError when called as a constructor"); | @@ -2458,7 +2458,7 @@ IdlInterface.prototype.test_member_iterable = function(member) | 2458 | 2458 | ].forEach(([property, length]) => { | 2459 | 2459 | var desc = Object.getOwnPropertyDescriptor(proto, property); | 2460 | 2460 | assert_equals(typeof desc.value, "function", property + " property should be a function"); | 2461 | | - assert_equals(desc.value.length, length, property + " function object length should be " + length); | | 2461 | + assert_equals(desc.value.length, length, property + " function object should have the right length"); | 2462 | 2462 | assert_equals(desc.value.name, property, property + " function object should have the right name"); | 2463 | 2463 | }); | 2464 | 2464 | } else { | @@ -2471,6 +2471,97 @@ IdlInterface.prototype.test_member_iterable = function(member) | 2471 | 2471 | }.bind(this), this.name + " interface: iterable<" + member.idlType.map(function(t) { return t.idlType; }).join(", ") + ">"); | 2472 | 2472 | }; | 2473 | 2473 |
| | 2474 | +IdlInterface.prototype.test_member_maplike = function(member) { | | 2475 | + subsetTestByKey(this.name, test, () => { | | 2476 | + const proto = this.get_interface_object().prototype; | | 2477 | + | | 2478 | + const methods = [ | | 2479 | + ["entries", 0], | | 2480 | + ["keys", 0], | | 2481 | + ["values", 0], | | 2482 | + ["forEach", 1], | | 2483 | + ["get", 1], | | 2484 | + ["has", 1] | | 2485 | + ]; | | 2486 | + if (!member.readonly) { | | 2487 | + methods.push( | | 2488 | + ["set", 2], | | 2489 | + ["delete", 1], | | 2490 | + ["clear", 1] | | 2491 | + ); | | 2492 | + } | | 2493 | + | | 2494 | + for (const [name, length] of methods) { | | 2495 | + const desc = Object.getOwnPropertyDescriptor(proto, name); | | 2496 | + assert_equals(typeof desc.value, "function", `${name} should be a function`); | | 2497 | + assert_equals(desc.enumerable, false, `${name} enumerable`); | | 2498 | + assert_equals(desc.configurable, true, `${name} configurable`); | | 2499 | + assert_equals(desc.writable, true, `${name} writable`); | | 2500 | + assert_equals(desc.value.length, length, `${name} function object length should be ${length}`); | | 2501 | + assert_equals(desc.value.name, name, `${name} function object should have the right name`); | | 2502 | + } | | 2503 | + | | 2504 | + const iteratorDesc = Object.getOwnPropertyDescriptor(proto, Symbol.iterator); | | 2505 | + assert_equals(iteratorDesc.value, proto.entries, `@@iterator should equal entries`); | | 2506 | + assert_equals(iteratorDesc.enumerable, false, `@@iterator enumerable`); | | 2507 | + assert_equals(iteratorDesc.configurable, true, `@@iterator configurable`); | | 2508 | + assert_equals(iteratorDesc.writable, true, `@@iterator writable`); | | 2509 | + | | 2510 | + const sizeDesc = Object.getOwnPropertyDescriptor(proto, "size"); | | 2511 | + assert_equals(typeof sizeDesc.get, "function", `size getter should be a function`); | | 2512 | + assert_equals(sizeDesc.set, undefined, `size should not have a setter`); | | 2513 | + assert_equals(sizeDesc.enumerable, false, `size enumerable`); | | 2514 | + assert_equals(sizeDesc.configurable, true, `size configurable`); | | 2515 | + assert_equals(sizeDesc.get.length, 0, `size getter length should have the right length`); | | 2516 | + assert_equals(sizeDesc.get.name, "get size", `size getter have the right name`); | | 2517 | + }, `${this.name} interface: maplike<${member.idlType.map(t => t.idlType).join(", ")}>`); | | 2518 | +}; | | 2519 | + | | 2520 | +IdlInterface.prototype.test_member_setlike = function(member) { | | 2521 | + subsetTestByKey(this.name, test, () => { | | 2522 | + const proto = this.get_interface_object().prototype; | | 2523 | + | | 2524 | + const methods = [ | | 2525 | + ["entries", 0], | | 2526 | + ["keys", 0], | | 2527 | + ["values", 0], | | 2528 | + ["forEach", 1], | | 2529 | + ["has", 1] | | 2530 | + ]; | | 2531 | + if (!member.readonly) { | | 2532 | + methods.push( | | 2533 | + ["add", 1], | | 2534 | + ["delete", 1], | | 2535 | + ["clear", 1] | | 2536 | + ); | | 2537 | + } | | 2538 | + | | 2539 | + for (const [name, length] of methods) { | | 2540 | + const desc = Object.getOwnPropertyDescriptor(proto, name); | | 2541 | + assert_equals(typeof desc.value, "function", `${name} should be a function`); | | 2542 | + assert_equals(desc.enumerable, false, `${name} enumerable`); | | 2543 | + assert_equals(desc.configurable, true, `${name} configurable`); | | 2544 | + assert_equals(desc.writable, true, `${name} writable`); | | 2545 | + assert_equals(desc.value.length, length, `${name} function object length should be ${length}`); | | 2546 | + assert_equals(desc.value.name, name, `${name} function object should have the right name`); | | 2547 | + } | | 2548 | + | | 2549 | + const iteratorDesc = Object.getOwnPropertyDescriptor(proto, Symbol.iterator); | | 2550 | + assert_equals(iteratorDesc.value, proto.values, `@@iterator should equal values`); | | 2551 | + assert_equals(iteratorDesc.enumerable, false, `@@iterator enumerable`); | | 2552 | + assert_equals(iteratorDesc.configurable, true, `@@iterator configurable`); | | 2553 | + assert_equals(iteratorDesc.writable, true, `@@iterator writable`); | | 2554 | + | | 2555 | + const sizeDesc = Object.getOwnPropertyDescriptor(proto, "size"); | | 2556 | + assert_equals(typeof sizeDesc.get, "function", `size getter should be a function`); | | 2557 | + assert_equals(sizeDesc.set, undefined, `size should not have a setter`); | | 2558 | + assert_equals(sizeDesc.enumerable, false, `size enumerable`); | | 2559 | + assert_equals(sizeDesc.configurable, true, `size configurable`); | | 2560 | + assert_equals(sizeDesc.get.length, 0, `size getter length should have the right length`); | | 2561 | + assert_equals(sizeDesc.get.name, "size", `size getter have the right name`); | | 2562 | + }, `${this.name} interface: setlike<${member.idlType.map(t => t.idlType).join(", ")}>`); | | 2563 | +}; | | 2564 | + | 2474 | 2565 | IdlInterface.prototype.test_member_async_iterable = function(member) | 2475 | 2566 | { | 2476 | 2567 | subsetTestByKey(this.name, test, function() | @@ -2624,6 +2715,12 @@ IdlInterface.prototype.test_members = function() | 2624 | 2715 | this.test_member_iterable(member); | 2625 | 2716 | } | 2626 | 2717 | break; | | 2718 | + case "maplike": | | 2719 | + this.test_member_maplike(member); | | 2720 | + break; | | 2721 | + case "setlike": | | 2722 | + this.test_member_setlike(member); | | 2723 | + break; | 2627 | 2724 | default: | 2628 | 2725 | // TODO: check more member types. | 2629 | 2726 | break; | |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/resources/testharness.js +15-15Lines changed: 15 additions & 15 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1127 | 1127 | * | 1128 | 1128 | * Typically this function is called implicitly on page load; it's | 1129 | 1129 | * only necessary for users to call this when either the | 1130 | | - * ``explict_done`` or ``single_page`` properties have been set | | 1130 | + * ``explicit_done`` or ``single_page`` properties have been set | 1131 | 1131 | * via the :js:func:`setup` function. | 1132 | 1132 | * | 1133 | 1133 | * For single page tests this marks the test as complete and sets its status. | | 2719 | 2719 | * to reduce intermittents without compromising test execution | 2720 | 2720 | * speed when the condition is quickly met. | 2721 | 2721 | * | 2722 | | - * @example | 2723 | | - * async_test(t => { | 2724 | | - * const popup = window.open("resources/coop-coep.py?coop=same-origin&coep=&navigate=about:blank"); | 2725 | | - * t.add_cleanup(() => popup.close()); | 2726 | | - * assert_equals(window, popup.opener); | 2727 | | - * | 2728 | | - * popup.onload = t.step_func(() => { | 2729 | | - * assert_true(popup.location.href.endsWith("&navigate=about:blank")); | 2730 | | - * // Use step_wait_func_done as about:blank cannot message back. | 2731 | | - * t.step_wait_func_done(() => popup.location.href === "about:blank"); | 2732 | | - * }); | 2733 | | - * }, "Navigating a popup to about:blank"); | 2734 | | - * | 2735 | 2722 | * @param {Function} cond A function taking no arguments and | 2736 | 2723 | * returning a boolean. The callback is called | 2737 | 2724 | * when this function returns true. | | 2774 | 2761 | * to reduce intermittents without compromising test execution speed | 2775 | 2762 | * when the condition is quickly met. | 2776 | 2763 | * | | 2764 | + * @example | | 2765 | + * async_test(t => { | | 2766 | + * const popup = window.open("resources/coop-coep.py?coop=same-origin&coep=&navigate=about:blank"); | | 2767 | + * t.add_cleanup(() => popup.close()); | | 2768 | + * assert_equals(window, popup.opener); | | 2769 | + * | | 2770 | + * popup.onload = t.step_func(() => { | | 2771 | + * assert_true(popup.location.href.endsWith("&navigate=about:blank")); | | 2772 | + * // Use step_wait_func_done as about:blank cannot message back. | | 2773 | + * t.step_wait_func_done(() => popup.location.href === "about:blank"); | | 2774 | + * }); | | 2775 | + * }, "Navigating a popup to about:blank"); | | 2776 | + * | 2777 | 2777 | * @param {Function} cond A function taking no arguments and | 2778 | 2778 | * returning a boolean. The callback is called | 2779 | 2779 | * when this function returns true. | | 3883 | 3883 | /** | 3884 | 3884 | * Timeout the tests. | 3885 | 3885 | * | 3886 | | - * This only has an effect when ``explict_timeout`` has been set | | 3886 | + * This only has an effect when ``explicit_timeout`` has been set | 3887 | 3887 | * in :js:func:`setup`. In other cases any call is a no-op. | 3888 | 3888 | * | 3889 | 3889 | */ | |
Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -Currently using webidl2.js@1fd6709ef9311f2ea0ed4ff0016ecf6f5d615104. | | 1 | +Currently using webidl2.js@6889aee6fc7d65915ab1267825248157dbc50486. |
|