Bug 1483550 [wpt PR 12501] - HTML: default style for fieldset, a=testonly
authorSimon Pieters <zcorpan@gmail.com>
Wed, 22 Aug 2018 13:24:43 +0000
changeset 831116 11f4f450395b03a8ee5c270a90bd79ec5c9ed52c
parent 831115 5e2681b808ee86302b9b09287e00d7586fd7b62b
child 831117 3fde62d7eadf79faf634f1a16703a41052d8c25c
push id118868
push userbmo:zjz@zjz.name
push dateFri, 24 Aug 2018 07:04:39 +0000
reviewerstestonly
bugs1483550, 12501
milestone63.0a1
Bug 1483550 [wpt PR 12501] - HTML: default style for fieldset, a=testonly Automatic update from web-platform-testsHTML: default style for fieldset See https://github.com/whatwg/html/issues/3921. -- wpt-commits: b6a5c0ba587b58a11c63dc5595318f3a7ec59082 wpt-pr: 12501
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -355908,16 +355908,22 @@
     ]
    ],
    "html/rendering/non-replaced-elements/tables/table-vspace-hspace.html": [
     [
      "/html/rendering/non-replaced-elements/tables/table-vspace-hspace.html",
      {}
     ]
    ],
+   "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html": [
+    [
+     "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html",
+     {}
+    ]
+   ],
    "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
     [
      "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html",
      {}
     ]
    ],
    "html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html": [
     [
@@ -596807,16 +596813,20 @@
   "html/rendering/non-replaced-elements/tables/table-width-s.html": [
    "5b987e791931373fd8f8c4d418ea7242ef05d799",
    "reftest"
   ],
   "html/rendering/non-replaced-elements/tables/table-width.html": [
    "59c5ca70d41cc969aed7ac6a531c1ca9a5f82f0f",
    "reftest"
   ],
+  "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html": [
+   "f07c84f406cefc7054e8a13c2796d3d82673bdf7",
+   "testharness"
+  ],
   "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
    "4e9539179739a3690aab276f2ba98c25bd4dfe9b",
    "testharness"
   ],
   "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative-ref.html": [
    "fd6c11a00566759fbf1e749d49ad396cf1a7ee08",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<title>fieldset default style</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<style>
+#ref {
+  display: block;
+  margin-left: 2px;
+  margin-right: 2px;
+  /* TODO replace above declarations with these when they are widely supported.
+  margin-inline-start: 2px;
+  margin-inline-end: 2px;
+  */
+  border: groove 2px ThreeDFace;
+  padding: 0.35em 0.75em 0.625em 0.75em;
+  /* TODO replace above declarations with these when they are widely supported.
+  padding-block-start: 0.35em;
+  padding-inline-end: 0.75em;
+  padding-block-end: 0.625em;
+  padding-inline-start: 0.75em;
+  */
+  min-width: min-content;
+  /* TODO change the above to min-inline-size when it's widely supported. */
+}
+</style>
+<fieldset id=test></fieldset>
+<div id=ref></div>
+<script>
+  const testElm = document.querySelector('#test');
+  const refElm = document.querySelector('#ref');
+  const props = ['display',
+                 'margin-top',
+                 'margin-right',
+                 'margin-bottom',
+                 'margin-left',
+                 'border-top-style',
+                 'border-right-style',
+                 'border-bottom-style',
+                 'border-left-style',
+                 'border-top-width',
+                 'border-right-width',
+                 'border-bottom-width',
+                 'border-left-width',
+                 'border-top-color',
+                 'border-right-color',
+                 'border-bottom-color',
+                 'border-left-color',
+                 'padding-top',
+                 'padding-right',
+                 'padding-bottom',
+                 'padding-left',
+                 'min-width',
+                 ];
+  const testStyle = getComputedStyle(testElm);
+  const refStyle = getComputedStyle(refElm);
+  props.forEach(prop => {
+    test(() => {
+      assert_equals(testStyle[prop], refStyle[prop]);
+    }, `${prop}`);
+  });
+</script>