mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-13 10:27:05 +02:00
Previously, 0 was returned if `HTMLProgressElement.max` was set to a negative value. (cherry picked from commit 353e3e75dcff05f05a65cfc3c70d1cff8db5d50c)
28 lines
1.5 KiB
HTML
28 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const progressElement = document.createElement("progress");
|
|
println(`value attribute initial value: ${progressElement.value}`);
|
|
println(`max attribute initial value: ${progressElement.max}`);
|
|
progressElement.value = -1;
|
|
println(`value attribute after setting value attribute to -1: ${progressElement.value}`);
|
|
progressElement.max = -1;
|
|
println(`max attribute after setting max attribute to -1: ${progressElement.max}`);
|
|
progressElement.max = 0;
|
|
println(`max attribute after setting max attribute to 0: ${progressElement.max}`);
|
|
progressElement.value = 50;
|
|
println(`value attribute after setting value attribute to 50: ${progressElement.value}`);
|
|
progressElement.max = 100;
|
|
println(`value attribute after setting max attribute to 100: ${progressElement.value}`);
|
|
println(`max attribute after setting max attribute to 100: ${progressElement.max}`);
|
|
progressElement.value = 101;
|
|
println(`value attribute after setting max attribute to 101: ${progressElement.value}`);
|
|
progressElement.value = -1;
|
|
println(`value attribute after setting value attribute to -1: ${progressElement.value}`);
|
|
progressElement.max = 0;
|
|
println(`value attribute after setting max attribute to 0: ${progressElement.value}`);
|
|
println(`max attribute after setting max attribute to 0: ${progressElement.max}`);
|
|
});
|
|
</script>
|