From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../the-style-element/style_type_svg.svg | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 testing/web-platform/tests/html/semantics/document-metadata/the-style-element/style_type_svg.svg (limited to 'testing/web-platform/tests/html/semantics/document-metadata/the-style-element/style_type_svg.svg') diff --git a/testing/web-platform/tests/html/semantics/document-metadata/the-style-element/style_type_svg.svg b/testing/web-platform/tests/html/semantics/document-metadata/the-style-element/style_type_svg.svg new file mode 100644 index 0000000000..6b0d1e874e --- /dev/null +++ b/testing/web-platform/tests/html/semantics/document-metadata/the-style-element/style_type_svg.svg @@ -0,0 +1,75 @@ + + + <style> type="" edge cases + + + + + + + + + + + + + + + + + + + + + + + + + "use strict"; + + test(() => { + assertApplied("test1"); + }, "With no type attribute, the style should apply"); + + test(() => { + assertApplied("test2"); + }, "With an empty type attribute, the style should apply"); + + test(() => { + assertApplied("test3"); + }, "With a mixed-case type attribute, the style should apply"); + + test(() => { + assertNotApplied("test4"); + }, "With a whitespace-surrounded type attribute, the style should not apply"); + + test(() => { + assertNotApplied("test5"); + }, "With a charset parameter in the type attribute, the style should not apply"); + + function getColor(id) { + return window.getComputedStyle(document.getElementById(id)).color; + } + + function assertApplied(id) { + assert_equals(getColor(id), "rgb(0, 128, 0)"); + } + + function assertNotApplied(id) { + assert_not_equals(getColor(id), "rgb(0, 128, 0)"); + } + + + -- cgit v1.2.3