mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
Tests/LibWeb: Print properties without indexes
The test CSSStyleDeclaration-has-indexed-property-getter is a frequent source of merge conflicts between PRs that are adding to or otherwise modifying the list of supported CSS properties. This is primarily because the test prints out a numeric index of each property along with the property. As far as I can tell the indexes are inconsequential for what the test is trying to verify. So lets modify the printout to only contain the properties without indexes.
This commit is contained in:
parent
3ba6d129df
commit
417f4edc46
Notes:
github-actions[bot]
2025-06-01 18:10:16 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 417f4edc46
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4954
Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 251 additions and 252 deletions
|
@ -2,22 +2,21 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const bodyStyleDeclaration = getComputedStyle(document.body);
|
||||
function printProperties(properties) {
|
||||
println(JSON.stringify(Object.values(properties), null, 4));
|
||||
}
|
||||
|
||||
const serializedBodyComputedStyle = JSON.stringify(bodyStyleDeclaration, null, 4);
|
||||
println("All properties associated with getComputedStyle(document.body):");
|
||||
println(serializedBodyComputedStyle);
|
||||
printProperties(getComputedStyle(document.body));
|
||||
|
||||
const serializedBodyElementStyle = JSON.stringify(document.body.style, null, 4);
|
||||
println("All properties associated with document.body.style by default:");
|
||||
println(serializedBodyElementStyle);
|
||||
printProperties(document.body.style);
|
||||
|
||||
document.body.style.display = "none";
|
||||
document.body.style.backgroundColor = "red";
|
||||
document.body.style.fontSize = "15px";
|
||||
|
||||
const serializedBodyElementStyleWithSetProperties = JSON.stringify(document.body.style, null, 4);
|
||||
println("All properties associated with document.body.style after setting some properties:");
|
||||
println(serializedBodyElementStyleWithSetProperties);
|
||||
printProperties(document.body.style);
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue