forked from mirrors/gecko-dev
Automatic update from web-platform-tests Rename WebIDL to webidl WebIDL is renamed to webidl at up stream. Do this also in chromium to unblock wpt-importer. Wpt-importer should be able to handle such cases in future. Bug: 1247327 Change-Id: Ib9c4ca3f4da55c6a25e56bc730a846b6fa95563b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3151416 Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Weizhong Xia <weizhong@google.com> Cr-Commit-Position: refs/heads/main@{#920025} -- wpt-commits: a370aad338d6ed743abb4d2c6ae84a7f1058558c wpt-pr: 30551
22 lines
726 B
JavaScript
22 lines
726 B
JavaScript
function assert_prop_desc_equals(object, property_key, expected) {
|
|
let actual = Object.getOwnPropertyDescriptor(object, property_key);
|
|
if (expected === undefined) {
|
|
assert_equals(
|
|
actual, undefined,
|
|
"(assert_prop_desc_equals: no property descriptor expected)");
|
|
return;
|
|
}
|
|
for (p in actual) {
|
|
assert_true(
|
|
expected.hasOwnProperty(p),
|
|
"(assert_prop_desc_equals: property '" + p + "' is not expected)");
|
|
assert_equals(
|
|
actual[p], expected[p],
|
|
"(assert_prop_desc_equals: property '" + p + "')");
|
|
}
|
|
for (p in expected) {
|
|
assert_true(
|
|
actual.hasOwnProperty(p),
|
|
"(assert_prop_desc_equals: expected property '" + p + "' missing)");
|
|
}
|
|
}
|