summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/permission-element/bounded-css-properties.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/html/semantics/permission-element/bounded-css-properties.html
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/semantics/permission-element/bounded-css-properties.html')
-rw-r--r--testing/web-platform/tests/html/semantics/permission-element/bounded-css-properties.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/permission-element/bounded-css-properties.html b/testing/web-platform/tests/html/semantics/permission-element/bounded-css-properties.html
new file mode 100644
index 0000000000..98c3d70e98
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/permission-element/bounded-css-properties.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<!--The permission element should have some limits for specific properties:
+ * font-weight is adjusted to be at least 200.
+ * font-style should only have "normal" or "italic" values.
+-->
+<style>
+ #id1 {
+ font-weight: 100;
+ font-style: oblique 30deg;
+ }
+ #id2 {
+ font-weight: 300;
+ font-style: italic;
+ }
+</style>
+
+
+<permission id="id1" type="geolocation">
+<permission id="id2" type="camera">
+
+<script>
+ test(function(){
+ var el_outside_bounds = document.getElementById("id1");
+ assert_equals(getComputedStyle(el_outside_bounds).fontWeight, "200", "font-weight");
+ assert_equals(getComputedStyle(el_outside_bounds).fontStyle, "normal", "font-style");
+ }, "Properties with out-of-bounds values should be corrected");
+
+ test(function(){
+ var el_inside_bounds = document.getElementById("id2");
+ assert_equals(getComputedStyle(el_inside_bounds).fontWeight, "300", "font-weight");
+ assert_equals(getComputedStyle(el_inside_bounds).fontStyle, "italic", "font-style");
+ }, "Properties with values in bounds should not be modified");
+</script>
+</body> \ No newline at end of file