summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/Text/input/css/legacy-color-value.html
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LibWeb/Text/input/css/legacy-color-value.html')
-rw-r--r--Tests/LibWeb/Text/input/css/legacy-color-value.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/Tests/LibWeb/Text/input/css/legacy-color-value.html b/Tests/LibWeb/Text/input/css/legacy-color-value.html
new file mode 100644
index 0000000000..9e14ff69ce
--- /dev/null
+++ b/Tests/LibWeb/Text/input/css/legacy-color-value.html
@@ -0,0 +1,24 @@
+<script src="../include.js"></script>
+<script>
+ test(() => {
+ function checkColor(color) {
+ document.body.bgColor = color;
+ const computedStyle = getComputedStyle(document.body);
+ const bgcolor = computedStyle.backgroundColor;
+ println(`'${color}' => ${bgcolor}`);
+ }
+
+ for (color of [
+ "red",
+ "#408080",
+ "transparent",
+ " GreeN ",
+ "cafe",
+ "",
+ "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", // longer than 128 chars of hex
+ "#emoji above U+FFFF 🙃",
+ ]) {
+ checkColor(color);
+ }
+ });
+</script>