You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asserts that actual is an object and not null and that all enumerable properties on actual are own properties on expected with the same values, recursing if the value is an object and not null.
As discussed in the linked PR, assert_object_equals is actually unnecessary for this test, where you're testing an identity equality. But… it still shouldn't fail! The same object on both sides should have the same enumerable properties. It's possible the problem is somewhere else in that test, though.
Looking at the source code, I think the problem is that it's comparing all enumerable properties (for (p in actual)) on one object against own properties on the other ( assert(expected.hasOwnProperty(p),). Enumerable properties include properties from prototype objects.
Activity
AmeliaBR commentedon Dec 18, 2019
For reference:
The API description for
assert_object_equals:And the source code:
https://github.com/web-platform-tests/wpt/blob/master/resources/testharness.js#L1143-L1177
As discussed in the linked PR,
assert_object_equalsis actually unnecessary for this test, where you're testing an identity equality. But… it still shouldn't fail! The same object on both sides should have the same enumerable properties. It's possible the problem is somewhere else in that test, though.AmeliaBR commentedon Dec 18, 2019
Looking at the source code, I think the problem is that it's comparing all enumerable properties (
for (p in actual)) on one object against own properties on the other (assert(expected.hasOwnProperty(p),). Enumerable properties include properties from prototype objects.inexorabletash commentedon Feb 21, 2020
This specific failure (imagebitmap-renderingcontext/context-preserves-canvas.html) was fixed, so closing. The others should be picked off per 2033
WPT: Fix incorrect use of assert_object_equals
WPT: Fix incorrect use of assert_object_equals
WPT: Fix incorrect use of assert_object_equals
WPT: Fix incorrect use of assert_object_equals
Bug 1617250 [wpt PR 21921] - WPT: Fix incorrect use of assert_object_…
Bug 1617250 [wpt PR 21921] - WPT: Fix incorrect use of assert_object_…
Bug 1617250 [wpt PR 21921] - WPT: Fix incorrect use of assert_object_…
Bug 1617250 [wpt PR 21921] - WPT: Fix incorrect use of assert_object_…