From 04c8a16b8402d2fd983141a42eda0a079daea7ed Mon Sep 17 00:00:00 2001 From: Di Zhang Date: Sun, 20 Nov 2022 16:05:30 +0000 Subject: [PATCH] Bug 1800151 [wpt PR 36917] - Restore 100,000 limit in HTMLOptionsCollection.length setter, a=testonly Automatic update from web-platform-tests Restore 100,000 limit in HTMLOptionsCollection.length setter Update the const kMaxListItems to be 100,000 in HTMLOptionsCollections to reflect updated spec. Also, this max should only be used when new length is greater than current length. [1] https://html.spec.whatwg.org/#dom-htmloptionscollection-length [2] https://github.com/whatwg/html/issues/8337 [3] https://github.com/whatwg/html/pull/8347 Change-Id: I7ff54e9cfdcb2eb014ad508485eda6908308314b Fixed: 1370370 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4015681 Reviewed-by: Mason Freed Commit-Queue: Di Zhang Cr-Commit-Position: refs/heads/main@{#1070388} -- wpt-commits: 893a5f3fa49a459b94526de606e89856dcbb5dae wpt-pr: 36917 --- .../tests/html/select/options-length-too-large.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testing/web-platform/tests/html/select/options-length-too-large.html b/testing/web-platform/tests/html/select/options-length-too-large.html index b47ccfccc90f2..7ce33ffad49b8 100644 --- a/testing/web-platform/tests/html/select/options-length-too-large.html +++ b/testing/web-platform/tests/html/select/options-length-too-large.html @@ -28,9 +28,14 @@ assert_equals(mySelect.options.length, 3, "Length of should remain unchanged"); + }); + test(function() { mySelect.options.length = 100000; - assert_equals(mySelect.options.length, 100000, "Length of should be 100,000"); }); test(function() {