Skip to content

Commit

Permalink
Bug 1800151 [wpt PR 36917] - Restore 100,000 limit in HTMLOptionsColl…
Browse files Browse the repository at this point in the history
…ection.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] whatwg/html#8337
[3] whatwg/html#8347

Change-Id: I7ff54e9cfdcb2eb014ad508485eda6908308314b
Fixed: 1370370
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4015681
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Di Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1070388}

--

wpt-commits: 893a5f3fa49a459b94526de606e89856dcbb5dae
wpt-pr: 36917
  • Loading branch information
dizhang168 authored and moz-wptsync-bot committed Nov 21, 2022
1 parent c31ed54 commit d201aa9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@
assert_equals(mySelect.options.length, 3, "Length of <select> should remain unchanged");
});

test(function() {
mySelect.options.length = Number.MAX_SAFE_INTEGER;
assert_equals(mySelect.options.length, 3, "Length of <select> should remain unchanged");
});

test(function() {
mySelect.options.length = 100000;
assert_equals(mySelect.options.length, 100000, "Length of <select> should be 10,0000");
assert_equals(mySelect.options.length, 100000, "Length of <select> should be 100,000");
});

test(function() {
Expand Down

0 comments on commit d201aa9

Please sign in to comment.