mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibWeb: Add HTMLPreElement width property
This commit is contained in:
committed by
Andrew Kaster
parent
2e8ff1855c
commit
089a98607c
Notes:
sideshowbarker
2024-07-16 22:22:13 +09:00
Author: https://github.com/bplaat Commit: https://github.com/SerenityOS/serenity/commit/089a98607c Pull-request: https://github.com/SerenityOS/serenity/pull/23261 Reviewed-by: https://github.com/ADKaster ✅
29
Tests/LibWeb/Text/input/HTML/pre-width.html
Normal file
29
Tests/LibWeb/Text/input/HTML/pre-width.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. Set the pre element width attributes
|
||||
testPart(() => {
|
||||
const pre = document.createElement('pre');
|
||||
pre.width = 20;
|
||||
return pre.width;
|
||||
});
|
||||
|
||||
// 2. Set the pre element width attributes with invalid data
|
||||
testPart(() => {
|
||||
const pre = document.createElement('pre');
|
||||
pre.width = 'dsafds';
|
||||
return pre.width;
|
||||
});
|
||||
|
||||
// 3. Get the pre element width attribute default value
|
||||
testPart(() => {
|
||||
const pre = document.createElement('pre');
|
||||
return pre.width;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user