summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-cssomview.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-cssomview.html')
-rw-r--r--testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-cssomview.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-cssomview.html b/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-cssomview.html
new file mode 100644
index 0000000000..c47c7cdd5d
--- /dev/null
+++ b/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-cssomview.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+fieldset {
+ height: 200px;
+ overflow: scroll;
+ padding: 0;
+}
+
+.content {
+ height: 400px;
+}
+</style>
+
+<fieldset>
+ <legend>Legend</legend>
+ <div class="content"></div>
+</fieldset>
+
+<script>
+test(() => {
+ const fieldset = document.querySelector('fieldset');
+ assert_equals(getComputedStyle(fieldset)['overflow-x'], 'scroll');
+ assert_equals(getComputedStyle(fieldset)['overflow-y'], 'scroll');
+ assert_equals(fieldset.scrollHeight, 400);
+ fieldset.scrollTop = 500;
+ assert_greater_than_equal(fieldset.scrollTop, 200);
+}, 'Test cssom-view API for FIELDSET');
+</script>