WPT: Fix bogus use of assert_object_equals()
This test was converted from js-test.js to testharness.js in https://crrev.com/625734 and incorrectly used assert_object_equals. * assert_object_equals() will assert that enumerable properties are the same. Since `new Number(42)` doesn't have any own properties, nothing useful was actually being asserted! * assert_equals() is sufficient for an object identity test. * The original test used `new Number(42)` to mint an object that would serialize as something distinct. This isn't necessary with testharness.js assertions - using {} is good enough. assert_object_equals() has lots of non-intuitive behavior, see https://github.com/web-platform-tests/wpt/issues/2033 for more. Change-Id: I202f27c228c7ec65407d9eae724af21181e6e684 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2067565 Auto-Submit: Joshua Bell <jsbell@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Reviewed-by:Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#743523}
Showing
Please register or sign in to comment