Changeset 251634 in webkit


Ignore:
Timestamp:
Oct 26, 2019, 7:50:23 AM (6 years ago)
Author:
Simon Fraser
Message:

Update css/support directory in WPT
https://bugs.webkit.org/show_bug.cgi?id=203452

Reviewed by Antti Koivisto.

Various WPT are relying on new functionality in css/support (e.g. test_shorthand_value).
In addition, the behavior for testing computed style of properties which don't exist has changed,
causing changes in test output.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-animations/parsing/animation-computed-expected.txt:
  • web-platform-tests/css/css-animations/parsing/animation-shorthand-expected.txt:
  • web-platform-tests/css/css-animations/parsing/animation-timing-function-computed-expected.txt:
  • web-platform-tests/css/css-images/inheritance-expected.txt:
  • web-platform-tests/css/css-images/parsing/image-orientation-computed-expected.txt:
  • web-platform-tests/css/css-images/parsing/image-rendering-computed-expected.txt:
  • web-platform-tests/css/css-images/parsing/object-fit-computed-expected.txt:
  • web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt:
  • web-platform-tests/css/css-overflow/inheritance-expected.txt:
  • web-platform-tests/css/css-overflow/parsing/overflow-computed-expected.txt:
  • web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt:
  • web-platform-tests/css/css-shapes/parsing/shape-outside-computed-expected.txt:
  • web-platform-tests/css/css-text/inheritance-expected.txt:
  • web-platform-tests/css/css-transitions/parsing/transition-shorthand-expected.txt:
  • web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed-expected.txt:
  • web-platform-tests/css/css-values/clamp-length-computed-expected.txt:
  • web-platform-tests/css/css-values/minmax-length-computed-expected.txt:
  • web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt:
  • web-platform-tests/css/cssom-view/inheritance-expected.txt:
  • web-platform-tests/css/support/computed-testcommon.js:

(test_computed_value):

  • web-platform-tests/css/support/inheritance-testcommon.js:

(assert_initial):

  • web-platform-tests/css/support/parsing-testcommon.js:
  • web-platform-tests/css/support/w3c-import.log:
Location:
trunk/LayoutTests/imported/w3c
Files:
3 added
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r251630 r251634  
     12019-10-25  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Update css/support directory in WPT
     4        https://bugs.webkit.org/show_bug.cgi?id=203452
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Various WPT are relying on new functionality in css/support (e.g. test_shorthand_value).
     9        In addition, the behavior for testing computed style of properties which don't exist has changed,
     10        causing changes in test output.
     11
     12        * resources/import-expectations.json:
     13        * web-platform-tests/css/css-animations/parsing/animation-computed-expected.txt:
     14        * web-platform-tests/css/css-animations/parsing/animation-shorthand-expected.txt:
     15        * web-platform-tests/css/css-animations/parsing/animation-timing-function-computed-expected.txt:
     16        * web-platform-tests/css/css-images/inheritance-expected.txt:
     17        * web-platform-tests/css/css-images/parsing/image-orientation-computed-expected.txt:
     18        * web-platform-tests/css/css-images/parsing/image-rendering-computed-expected.txt:
     19        * web-platform-tests/css/css-images/parsing/object-fit-computed-expected.txt:
     20        * web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt:
     21        * web-platform-tests/css/css-overflow/inheritance-expected.txt:
     22        * web-platform-tests/css/css-overflow/parsing/overflow-computed-expected.txt:
     23        * web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt:
     24        * web-platform-tests/css/css-shapes/parsing/shape-outside-computed-expected.txt:
     25        * web-platform-tests/css/css-text/inheritance-expected.txt:
     26        * web-platform-tests/css/css-transitions/parsing/transition-shorthand-expected.txt:
     27        * web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed-expected.txt:
     28        * web-platform-tests/css/css-values/clamp-length-computed-expected.txt:
     29        * web-platform-tests/css/css-values/minmax-length-computed-expected.txt:
     30        * web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt:
     31        * web-platform-tests/css/cssom-view/inheritance-expected.txt:
     32        * web-platform-tests/css/support/computed-testcommon.js:
     33        (test_computed_value):
     34        * web-platform-tests/css/support/inheritance-testcommon.js:
     35        (assert_initial):
     36        * web-platform-tests/css/support/parsing-testcommon.js:
     37        * web-platform-tests/css/support/w3c-import.log:
     38
    1392019-10-26  Chris Lord  <clord@igalia.com>
    240
  • trunk/LayoutTests/imported/w3c/resources/import-expectations.json

    r251591 r251634  
    33    "css/css-values": "import",
    44    "css/geometry": "import",
     5    "css/support": "import",
    56    "custom-elements": "import",
    67    "shadow-dom": "import",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/parsing/animation-computed-expected.txt

    r251591 r251634  
    11
    2 PASS Property animation value '1s' computes to '1s ease 0s 1 normal none running none'
    3 PASS Property animation value 'cubic-bezier(0, -2, 1, 3)' computes to '0s cubic-bezier(0, -2, 1, 3) 0s 1 normal none running none'
    4 PASS Property animation value '1s -3s' computes to '1s ease -3s 1 normal none running none'
    5 PASS Property animation value '4' computes to '0s ease 0s 4 normal none running none'
    6 PASS Property animation value 'reverse' computes to '0s ease 0s 1 reverse none running none'
    7 PASS Property animation value 'both' computes to '0s ease 0s 1 normal both running none'
    8 PASS Property animation value 'paused' computes to '0s ease 0s 1 normal none paused none'
    9 PASS Property animation value 'none' computes to '0s ease 0s 1 normal none running none'
    10 PASS Property animation value 'anim' computes to '0s ease 0s 1 normal none running anim'
    11 PASS Property animation value 'anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)' computes to '1s cubic-bezier(0, -2, 1, 3) -3s 4 reverse both paused anim'
    12 PASS Property animation value 'anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)' computes to '0s ease 0s 1 reverse both paused anim, 1s cubic-bezier(0, -2, 1, 3) -3s 4 normal none running none'
     2FAIL Property animation value '1s' computes to '1s ease 0s 1 normal none running none' assert_equals: expected "1s ease 0s 1 normal none running none" but got ""
     3FAIL Property animation value 'cubic-bezier(0, -2, 1, 3)' computes to '0s cubic-bezier(0, -2, 1, 3) 0s 1 normal none running none' assert_equals: expected "0s cubic-bezier(0, -2, 1, 3) 0s 1 normal none running none" but got ""
     4FAIL Property animation value '1s -3s' computes to '1s ease -3s 1 normal none running none' assert_equals: expected "1s ease -3s 1 normal none running none" but got ""
     5FAIL Property animation value '4' computes to '0s ease 0s 4 normal none running none' assert_equals: expected "0s ease 0s 4 normal none running none" but got ""
     6FAIL Property animation value 'reverse' computes to '0s ease 0s 1 reverse none running none' assert_equals: expected "0s ease 0s 1 reverse none running none" but got ""
     7FAIL Property animation value 'both' computes to '0s ease 0s 1 normal both running none' assert_equals: expected "0s ease 0s 1 normal both running none" but got ""
     8FAIL Property animation value 'paused' computes to '0s ease 0s 1 normal none paused none' assert_equals: expected "0s ease 0s 1 normal none paused none" but got ""
     9FAIL Property animation value 'none' computes to '0s ease 0s 1 normal none running none' assert_equals: expected "0s ease 0s 1 normal none running none" but got ""
     10FAIL Property animation value 'anim' computes to '0s ease 0s 1 normal none running anim' assert_equals: expected "0s ease 0s 1 normal none running anim" but got ""
     11FAIL Property animation value 'anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)' computes to '1s cubic-bezier(0, -2, 1, 3) -3s 4 reverse both paused anim' assert_equals: expected "1s cubic-bezier(0, -2, 1, 3) -3s 4 reverse both paused anim" but got ""
     12FAIL Property animation value 'anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)' computes to '0s ease 0s 1 reverse both paused anim, 1s cubic-bezier(0, -2, 1, 3) -3s 4 normal none running none' assert_equals: expected "0s ease 0s 1 reverse both paused anim, 1s cubic-bezier(0, -2, 1, 3) -3s 4 normal none running none" but got ""
    1313
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/parsing/animation-shorthand-expected.txt

    r251591 r251634  
    1 CONSOLE MESSAGE: line 14: ReferenceError: Can't find variable: test_shorthand_value
    21
    3 FAIL CSS Animations: animation sets longhands ReferenceError: Can't find variable: test_shorthand_value
     2PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-delay
     3PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-direction
     4PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-duration
     5PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-fill-mode
     6PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-iteration-count
     7PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-name
     8PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-play-state
     9PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-timing-function
     10PASS e.style['animation'] = "anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)" should not set unrelated longhands
     11FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-delay assert_equals: animation-delay should be canonical expected "0s, -3s" but got "initial, -3s"
     12FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-direction assert_equals: animation-direction should be canonical expected "reverse, normal" but got "reverse, initial"
     13FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-duration assert_equals: animation-duration should be canonical expected "0s, 1s" but got "initial, 1s"
     14FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-fill-mode assert_equals: animation-fill-mode should be canonical expected "both, none" but got "both, initial"
     15FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-iteration-count assert_equals: animation-iteration-count should be canonical expected "1, 4" but got "initial, 4"
     16FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-name assert_equals: animation-name should be canonical expected "anim, none" but got "anim, initial"
     17FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-play-state assert_equals: animation-play-state should be canonical expected "paused, running" but got "paused, initial"
     18FAIL e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should set animation-timing-function assert_equals: animation-timing-function should be canonical expected "ease, cubic-bezier(0, -2, 1, 3)" but got "initial, cubic-bezier(0, -2, 1, 3)"
     19PASS e.style['animation'] = "anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)" should not set unrelated longhands
     20FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-delay assert_equals: animation-delay should be canonical expected "-3s, 0s" but got "-3s, initial"
     21FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-direction assert_equals: animation-direction should be canonical expected "normal, reverse" but got "initial, reverse"
     22FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-duration assert_equals: animation-duration should be canonical expected "1s, 0s" but got "1s, initial"
     23FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-fill-mode assert_equals: animation-fill-mode should be canonical expected "none, both" but got "initial, both"
     24FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-iteration-count assert_equals: animation-iteration-count should be canonical expected "4, 1" but got "4, initial"
     25FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-name assert_equals: animation-name should be canonical expected "none, anim" but got "initial, anim"
     26FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-play-state assert_equals: animation-play-state should be canonical expected "running, paused" but got "initial, paused"
     27FAIL e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should set animation-timing-function assert_equals: animation-timing-function should be canonical expected "cubic-bezier(0, -2, 1, 3), ease" but got "cubic-bezier(0, -2, 1, 3), initial"
     28PASS e.style['animation'] = "4 1s -3s cubic-bezier(0, -2, 1, 3), anim paused both reverse" should not set unrelated longhands
    429
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/parsing/animation-timing-function-computed-expected.txt

    r251591 r251634  
    1010PASS Property animation-timing-function value 'steps(4, start)' computes to 'steps(4, start)'
    1111FAIL Property animation-timing-function value 'steps(2, end)' computes to 'steps(2)' assert_equals: expected "steps(2)" but got "steps(2, end)"
    12 FAIL Property animation-timing-function value 'steps(2, jump-start)' computes to 'steps(2, jump-start)' assert_equals: expected "steps(2, jump-start)" but got "ease"
    13 FAIL Property animation-timing-function value 'steps(2, jump-end)' computes to 'steps(2)' assert_equals: expected "steps(2)" but got "ease"
    14 FAIL Property animation-timing-function value 'steps(2, jump-both)' computes to 'steps(2, jump-both)' assert_equals: expected "steps(2, jump-both)" but got "ease"
    15 FAIL Property animation-timing-function value 'steps(2, jump-none)' computes to 'steps(2, jump-none)' assert_equals: expected "steps(2, jump-none)" but got "ease"
     12FAIL Property animation-timing-function value 'steps(2, jump-start)' computes to 'steps(2, jump-start)' assert_true: 'steps(2, jump-start)' is a supported value for animation-timing-function. expected true got false
     13FAIL Property animation-timing-function value 'steps(2, jump-end)' computes to 'steps(2)' assert_true: 'steps(2, jump-end)' is a supported value for animation-timing-function. expected true got false
     14FAIL Property animation-timing-function value 'steps(2, jump-both)' computes to 'steps(2, jump-both)' assert_true: 'steps(2, jump-both)' is a supported value for animation-timing-function. expected true got false
     15FAIL Property animation-timing-function value 'steps(2, jump-none)' computes to 'steps(2, jump-none)' assert_true: 'steps(2, jump-none)' is a supported value for animation-timing-function. expected true got false
    1616PASS Property animation-timing-function value 'linear, ease, linear' computes to 'linear, ease, linear'
    1717
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-images/inheritance-expected.txt

    r250993 r251634  
    11
    2 PASS Property image-orientation has initial value 0deg
    3 PASS Property image-orientation inherits
     2FAIL Property image-orientation has initial value 0deg assert_true: image-orientation doesn't seem to be supported in the computed style expected true got false
     3FAIL Property image-orientation inherits assert_true: image-orientation doesn't seem to be supported in the computed style expected true got false
    44PASS Property image-rendering has initial value auto
    55PASS Property image-rendering inherits
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-images/parsing/image-orientation-computed-expected.txt

    r250993 r251634  
    11
    2 PASS Property image-orientation value 'from-image' computes to 'from-image'
    3 PASS Property image-orientation value 'none' computes to 'none'
     2FAIL Property image-orientation value 'from-image' computes to 'from-image' assert_true: image-orientation doesn't seem to be supported in the computed style expected true got false
     3FAIL Property image-orientation value 'none' computes to 'none' assert_true: image-orientation doesn't seem to be supported in the computed style expected true got false
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-images/parsing/image-rendering-computed-expected.txt

    r250993 r251634  
    11
    22PASS Property image-rendering value 'auto' computes to 'auto'
    3 FAIL Property image-rendering value 'smooth' computes to 'smooth' assert_equals: expected "smooth" but got "auto"
    4 FAIL Property image-rendering value 'high-quality' computes to 'high-quality' assert_equals: expected "high-quality" but got "auto"
     3FAIL Property image-rendering value 'smooth' computes to 'smooth' assert_true: 'smooth' is a supported value for image-rendering. expected true got false
     4FAIL Property image-rendering value 'high-quality' computes to 'high-quality' assert_true: 'high-quality' is a supported value for image-rendering. expected true got false
    55PASS Property image-rendering value 'crisp-edges' computes to 'crisp-edges'
    66PASS Property image-rendering value 'pixelated' computes to 'pixelated'
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-images/parsing/object-fit-computed-expected.txt

    r250993 r251634  
    22PASS Property object-fit value 'contain' computes to 'contain'
    33PASS Property object-fit value 'cover' computes to 'cover'
    4 FAIL Property object-fit value 'cover scale-down' computes to 'cover scale-down' assert_equals: expected "cover scale-down" but got "fill"
     4FAIL Property object-fit value 'cover scale-down' computes to 'cover scale-down' assert_true: 'cover scale-down' is a supported value for object-fit. expected true got false
    55PASS Property object-fit value 'fill' computes to 'fill'
    66PASS Property object-fit value 'none' computes to 'none'
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt

    r250653 r251634  
    11
    2 FAIL Property clip-path value 'circle(calc(10px + 0.5em) at -50% 50%)' computes to 'circle(30px at -50% 50%)' assert_equals: expected "circle(30px at -50% 50%)" but got "none"
    3 FAIL Property clip-path value 'circle(calc(10px - 0.5em) at 50% -50%)' computes to 'circle(0px at 50% -50%)' assert_equals: expected "circle(0px at 50% -50%)" but got "none"
    4 FAIL Property clip-path value 'ellipse(at 50% 50%)' computes to 'ellipse(at 50% 50%)' assert_equals: expected "ellipse(at 50% 50%)" but got "none"
    5 FAIL Property clip-path value 'ellipse(60% closest-side at 50% 50%)' computes to 'ellipse(60% closest-side at 50% 50%)' assert_equals: expected "ellipse(60% closest-side at 50% 50%)" but got "none"
     2FAIL Property clip-path value 'circle(calc(10px + 0.5em) at -50% 50%)' computes to 'circle(30px at -50% 50%)' assert_true: 'circle(calc(10px + 0.5em) at -50% 50%)' is a supported value for clip-path. expected true got false
     3FAIL Property clip-path value 'circle(calc(10px - 0.5em) at 50% -50%)' computes to 'circle(0px at 50% -50%)' assert_true: 'circle(calc(10px - 0.5em) at 50% -50%)' is a supported value for clip-path. expected true got false
     4FAIL Property clip-path value 'ellipse(at 50% 50%)' computes to 'ellipse(at 50% 50%)' assert_true: 'ellipse(at 50% 50%)' is a supported value for clip-path. expected true got false
     5FAIL Property clip-path value 'ellipse(60% closest-side at 50% 50%)' computes to 'ellipse(60% closest-side at 50% 50%)' assert_true: 'ellipse(60% closest-side at 50% 50%)' is a supported value for clip-path. expected true got false
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/inheritance-expected.txt

    r250783 r251634  
    11
    2 PASS Property block-ellipsis has initial value none
    3 PASS Property block-ellipsis inherits
    4 PASS Property continue has initial value auto
    5 PASS Property continue does not inherit
    6 PASS Property max-lines has initial value none
    7 PASS Property max-lines does not inherit
    8 PASS Property overflow-block has initial value visible
    9 PASS Property overflow-block does not inherit
    10 PASS Property overflow-inline has initial value visible
    11 PASS Property overflow-inline does not inherit
     2FAIL Property block-ellipsis has initial value none assert_true: block-ellipsis doesn't seem to be supported in the computed style expected true got false
     3FAIL Property block-ellipsis inherits assert_true: block-ellipsis doesn't seem to be supported in the computed style expected true got false
     4FAIL Property continue has initial value auto assert_true: continue doesn't seem to be supported in the computed style expected true got false
     5FAIL Property continue does not inherit assert_true: expected true got false
     6FAIL Property max-lines has initial value none assert_true: max-lines doesn't seem to be supported in the computed style expected true got false
     7FAIL Property max-lines does not inherit assert_true: expected true got false
     8FAIL Property overflow-block has initial value visible assert_true: overflow-block doesn't seem to be supported in the computed style expected true got false
     9FAIL Property overflow-block does not inherit assert_true: expected true got false
     10FAIL Property overflow-inline has initial value visible assert_true: overflow-inline doesn't seem to be supported in the computed style expected true got false
     11FAIL Property overflow-inline does not inherit assert_true: expected true got false
    1212PASS Property overflow-x has initial value visible
    1313PASS Property overflow-x does not inherit
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/overflow-computed-expected.txt

    r250849 r251634  
    22PASS Property overflow value 'visible' computes to 'visible'
    33PASS Property overflow value 'hidden' computes to 'hidden'
    4 FAIL Property overflow value 'clip' computes to 'clip' assert_equals: expected "clip" but got "visible"
     4FAIL Property overflow value 'clip' computes to 'clip' assert_true: 'clip' is a supported value for overflow. expected true got false
    55PASS Property overflow value 'scroll' computes to 'scroll'
    66PASS Property overflow value 'auto' computes to 'auto'
    77PASS Property overflow value 'auto auto' computes to 'auto'
    8 FAIL Property overflow value 'auto clip' computes to 'auto hidden' assert_equals: expected "auto hidden" but got "visible"
     8FAIL Property overflow value 'auto clip' computes to 'auto hidden' assert_true: 'auto clip' is a supported value for overflow. expected true got false
    99PASS Property overflow value 'auto visible' computes to 'auto'
    10 FAIL Property overflow value 'clip auto' computes to 'hidden auto' assert_equals: expected "hidden auto" but got "visible"
    11 FAIL Property overflow value 'clip clip' computes to 'clip' assert_equals: expected "clip" but got "visible"
    12 FAIL Property overflow value 'clip hidden' computes to 'hidden' assert_equals: expected "hidden" but got "visible"
    13 FAIL Property overflow value 'clip scroll' computes to 'hidden scroll' assert_equals: expected "hidden scroll" but got "visible"
    14 FAIL Property overflow value 'hidden clip' computes to 'hidden' assert_equals: expected "hidden" but got "visible"
     10FAIL Property overflow value 'clip auto' computes to 'hidden auto' assert_true: 'clip auto' is a supported value for overflow. expected true got false
     11FAIL Property overflow value 'clip clip' computes to 'clip' assert_true: 'clip clip' is a supported value for overflow. expected true got false
     12FAIL Property overflow value 'clip hidden' computes to 'hidden' assert_true: 'clip hidden' is a supported value for overflow. expected true got false
     13FAIL Property overflow value 'clip scroll' computes to 'hidden scroll' assert_true: 'clip scroll' is a supported value for overflow. expected true got false
     14FAIL Property overflow value 'hidden clip' computes to 'hidden' assert_true: 'hidden clip' is a supported value for overflow. expected true got false
    1515PASS Property overflow value 'hidden visible' computes to 'hidden auto'
    1616PASS Property overflow value 'scroll auto' computes to 'scroll auto'
    17 FAIL Property overflow value 'scroll clip' computes to 'scroll hidden' assert_equals: expected "scroll hidden" but got "visible"
     17FAIL Property overflow value 'scroll clip' computes to 'scroll hidden' assert_true: 'scroll clip' is a supported value for overflow. expected true got false
    1818PASS Property overflow value 'scroll visible' computes to 'scroll auto'
    1919PASS Property overflow value 'visible auto' computes to 'auto'
     
    2424PASS Property overflow-x value 'hidden' computes to 'hidden'
    2525PASS Property overflow-x value 'visible' computes to 'visible'
    26 FAIL Property overflow-y value 'clip' computes to 'clip' assert_equals: expected "clip" but got "visible"
     26FAIL Property overflow-y value 'clip' computes to 'clip' assert_true: 'clip' is a supported value for overflow-y. expected true got false
    2727PASS Property overflow-y value 'auto' computes to 'auto'
    2828PASS Property overflow-y value 'visible' computes to 'visible'
    29 PASS Property overflow-block value 'hidden' computes to 'hidden'
    30 PASS Property overflow-block value 'clip' computes to 'clip'
    31 PASS Property overflow-block value 'visible' computes to 'visible'
    32 PASS Property overflow-inline value 'scroll' computes to 'scroll'
    33 PASS Property overflow-inline value 'visible' computes to 'visible'
     29FAIL Property overflow-block value 'hidden' computes to 'hidden' assert_true: overflow-block doesn't seem to be supported in the computed style expected true got false
     30FAIL Property overflow-block value 'clip' computes to 'clip' assert_true: overflow-block doesn't seem to be supported in the computed style expected true got false
     31FAIL Property overflow-block value 'visible' computes to 'visible' assert_true: overflow-block doesn't seem to be supported in the computed style expected true got false
     32FAIL Property overflow-inline value 'scroll' computes to 'scroll' assert_true: overflow-inline doesn't seem to be supported in the computed style expected true got false
     33FAIL Property overflow-inline value 'visible' computes to 'visible' assert_true: overflow-inline doesn't seem to be supported in the computed style expected true got false
    3434
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt

    r238893 r251634  
    11
    2 PASS Property overscroll-behavior-x has initial value auto
    3 PASS Property overscroll-behavior-x does not inherit
    4 PASS Property overscroll-behavior-y has initial value auto
    5 PASS Property overscroll-behavior-y does not inherit
     2FAIL Property overscroll-behavior-x has initial value auto assert_true: overscroll-behavior-x doesn't seem to be supported in the computed style expected true got false
     3FAIL Property overscroll-behavior-x does not inherit assert_true: expected true got false
     4FAIL Property overscroll-behavior-y has initial value auto assert_true: overscroll-behavior-y doesn't seem to be supported in the computed style expected true got false
     5FAIL Property overscroll-behavior-y does not inherit assert_true: expected true got false
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/parsing/shape-outside-computed-expected.txt

    r250656 r251634  
    66PASS Property shape-outside value 'ellipse(calc(10px + 0.5em) calc(10px - 0.5em) at -50% 50%) padding-box' computes to 'ellipse(30px 0px at -50% 50%) padding-box'
    77PASS Property shape-outside value 'ellipse(calc(10px - 0.5em) calc(10px + 0.5em) at 50% -50%) border-box' computes to 'ellipse(0px 30px at 50% -50%) border-box'
    8 PASS Property polygon(evenodd, -10px, -20px, -30px, -40px, -50px, -60px) margin-box value 'undefined' computes to 'undefined'
    9 PASS Property polygon(10%, 20%, 30%, 40%, 50%, 60%) content-box value 'undefined' computes to 'undefined'
    10 PASS Property polygon(calc(10px - 0.5em), 20%, 30%, 40%, 50%, calc(10px - 0.5em)) value 'polygon(-10px, 20%, 30%, 40%, 50%, -10px)' computes to 'polygon(-10px, 20%, 30%, 40%, 50%, -10px)'
     8FAIL Property polygon(evenodd, -10px, -20px, -30px, -40px, -50px, -60px) margin-box value 'undefined' computes to 'undefined' assert_true: polygon(evenodd, -10px, -20px, -30px, -40px, -50px, -60px) margin-box doesn't seem to be supported in the computed style expected true got false
     9FAIL Property polygon(10%, 20%, 30%, 40%, 50%, 60%) content-box value 'undefined' computes to 'undefined' assert_true: polygon(10%, 20%, 30%, 40%, 50%, 60%) content-box doesn't seem to be supported in the computed style expected true got false
     10FAIL Property polygon(calc(10px - 0.5em), 20%, 30%, 40%, 50%, calc(10px - 0.5em)) value 'polygon(-10px, 20%, 30%, 40%, 50%, -10px)' computes to 'polygon(-10px, 20%, 30%, 40%, 50%, -10px)' assert_true: polygon(calc(10px - 0.5em), 20%, 30%, 40%, 50%, calc(10px - 0.5em)) doesn't seem to be supported in the computed style expected true got false
    1111
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/inheritance-expected.txt

    r246193 r251634  
    22PASS Property hanging-punctuation has initial value none
    33PASS Property hanging-punctuation inherits
    4 PASS Property hyphens has initial value manual
    5 PASS Property hyphens inherits
     4FAIL Property hyphens has initial value manual assert_true: hyphens doesn't seem to be supported in the computed style expected true got false
     5FAIL Property hyphens inherits assert_true: hyphens doesn't seem to be supported in the computed style expected true got false
    66PASS Property letter-spacing has initial value normal
    77PASS Property letter-spacing inherits
     
    1212PASS Property tab-size has initial value 8
    1313PASS Property tab-size inherits
    14 PASS Property text-align-all has initial value start
    15 PASS Property text-align-all inherits
    16 PASS Property text-align-last has initial value auto
    17 PASS Property text-align-last inherits
     14FAIL Property text-align-all has initial value start assert_true: text-align-all doesn't seem to be supported in the computed style expected true got false
     15FAIL Property text-align-all inherits assert_true: text-align-all doesn't seem to be supported in the computed style expected true got false
     16FAIL Property text-align-last has initial value auto assert_true: text-align-last doesn't seem to be supported in the computed style expected true got false
     17FAIL Property text-align-last inherits assert_true: text-align-last doesn't seem to be supported in the computed style expected true got false
    1818PASS Property text-indent has initial value 0px
    1919PASS Property text-indent inherits
    20 PASS Property text-justify has initial value auto
    21 PASS Property text-justify inherits
     20FAIL Property text-justify has initial value auto assert_true: text-justify doesn't seem to be supported in the computed style expected true got false
     21FAIL Property text-justify inherits assert_true: text-justify doesn't seem to be supported in the computed style expected true got false
    2222PASS Property text-transform has initial value none
    2323PASS Property text-transform inherits
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-shorthand-expected.txt

    r251591 r251634  
    1 CONSOLE MESSAGE: line 14: ReferenceError: Can't find variable: test_shorthand_value
    21
    3 FAIL CSS Transitions: transition sets longhands ReferenceError: Can't find variable: test_shorthand_value
     2PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-delay
     3PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-duration
     4PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-property
     5PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should set transition-timing-function
     6PASS e.style['transition'] = "1s -3s cubic-bezier(0, -2, 1, 3) top" should not set unrelated longhands
     7FAIL e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-delay assert_equals: transition-delay should be canonical expected "-3s, 0s" but got "-3s, initial"
     8FAIL e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-duration assert_equals: transition-duration should be canonical expected "1s, 0s" but got "1s, initial"
     9FAIL e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-property assert_equals: transition-property should be canonical expected "all, top" but got "initial, top"
     10FAIL e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should set transition-timing-function assert_equals: transition-timing-function should be canonical expected "ease, cubic-bezier(0, -2, 1, 3)" but got "initial, cubic-bezier(0, -2, 1, 3)"
     11PASS e.style['transition'] = "1s -3s, cubic-bezier(0, -2, 1, 3) top" should not set unrelated longhands
     12FAIL e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-delay assert_equals: transition-delay should be canonical expected "0s, -3s" but got "initial, -3s"
     13FAIL e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-duration assert_equals: transition-duration should be canonical expected "0s, 1s" but got "initial, 1s"
     14FAIL e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-property assert_equals: transition-property should be canonical expected "top, all" but got "top, initial"
     15FAIL e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should set transition-timing-function assert_equals: transition-timing-function should be canonical expected "cubic-bezier(0, -2, 1, 3), ease" but got "cubic-bezier(0, -2, 1, 3), initial"
     16PASS e.style['transition'] = "cubic-bezier(0, -2, 1, 3) top, 1s -3s" should not set unrelated longhands
    417
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed-expected.txt

    r251591 r251634  
    11
    22PASS Property transition-timing-function value 'linear' computes to 'linear'
    3 PASS Property transition-timing-function value '' computes to 'ease'
     3FAIL Property transition-timing-function value '' computes to 'ease' assert_true: '' is a supported value for transition-timing-function. expected true got false
    44PASS Property transition-timing-function value 'initial' computes to 'ease'
    55PASS Property transition-timing-function value 'ease' computes to 'ease'
     
    1515PASS Property transition-timing-function value 'steps(4, start)' computes to 'steps(4, start)'
    1616FAIL Property transition-timing-function value 'steps(2, end)' computes to 'steps(2)' assert_equals: expected "steps(2)" but got "steps(2, end)"
    17 FAIL Property transition-timing-function value 'steps(2, jump-start)' computes to 'steps(2, jump-start)' assert_equals: expected "steps(2, jump-start)" but got "ease"
    18 FAIL Property transition-timing-function value 'steps(2, jump-end)' computes to 'steps(2)' assert_equals: expected "steps(2)" but got "ease"
    19 FAIL Property transition-timing-function value 'steps(2, jump-both)' computes to 'steps(2, jump-both)' assert_equals: expected "steps(2, jump-both)" but got "ease"
    20 FAIL Property transition-timing-function value 'steps(2, jump-none)' computes to 'steps(2, jump-none)' assert_equals: expected "steps(2, jump-none)" but got "ease"
     17FAIL Property transition-timing-function value 'steps(2, jump-start)' computes to 'steps(2, jump-start)' assert_true: 'steps(2, jump-start)' is a supported value for transition-timing-function. expected true got false
     18FAIL Property transition-timing-function value 'steps(2, jump-end)' computes to 'steps(2)' assert_true: 'steps(2, jump-end)' is a supported value for transition-timing-function. expected true got false
     19FAIL Property transition-timing-function value 'steps(2, jump-both)' computes to 'steps(2, jump-both)' assert_true: 'steps(2, jump-both)' is a supported value for transition-timing-function. expected true got false
     20FAIL Property transition-timing-function value 'steps(2, jump-none)' computes to 'steps(2, jump-none)' assert_true: 'steps(2, jump-none)' is a supported value for transition-timing-function. expected true got false
    2121FAIL Property transition-timing-function value 'linear, ease, linear' computes to 'linear, ease, linear' assert_equals: expected "linear, ease, linear" but got "linear"
    2222
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/clamp-length-computed-expected.txt

    r251521 r251634  
    11
    2 FAIL Property letter-spacing value 'clamp(10px, 20px, 30px)' computes to '20px' assert_equals: expected "20px" but got "normal"
    3 FAIL Property letter-spacing value 'clamp(10px, 5px, 30px)' computes to '10px' assert_equals: expected "10px" but got "normal"
    4 FAIL Property letter-spacing value 'clamp(10px, 35px, 30px)' computes to '30px' assert_equals: expected "30px" but got "normal"
    5 FAIL Property letter-spacing value 'clamp(30px, 100px, 20px)' computes to '30px' assert_equals: expected "30px" but got "normal"
     2FAIL Property letter-spacing value 'clamp(10px, 20px, 30px)' computes to '20px' assert_true: 'clamp(10px, 20px, 30px)' is a supported value for letter-spacing. expected true got false
     3FAIL Property letter-spacing value 'clamp(10px, 5px, 30px)' computes to '10px' assert_true: 'clamp(10px, 5px, 30px)' is a supported value for letter-spacing. expected true got false
     4FAIL Property letter-spacing value 'clamp(10px, 35px, 30px)' computes to '30px' assert_true: 'clamp(10px, 35px, 30px)' is a supported value for letter-spacing. expected true got false
     5FAIL Property letter-spacing value 'clamp(30px, 100px, 20px)' computes to '30px' assert_true: 'clamp(30px, 100px, 20px)' is a supported value for letter-spacing. expected true got false
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt

    r251521 r251634  
    33PASS Property letter-spacing value 'min(1cm)' computes to '37.7952766418457px'
    44PASS Property letter-spacing value 'min(1mm)' computes to '3.7795276641845703px'
    5 PASS Property letter-spacing value 'min(1Q)' computes to 'normal'
     5FAIL Property letter-spacing value 'min(1Q)' computes to 'normal' assert_true: 'min(1Q)' is a supported value for letter-spacing. expected true got false
    66PASS Property letter-spacing value 'min(1in)' computes to '96px'
    77PASS Property letter-spacing value 'min(1pc)' computes to '16px'
     
    1818PASS Property letter-spacing value 'max(1cm)' computes to '37.7952766418457px'
    1919PASS Property letter-spacing value 'max(1mm)' computes to '3.7795276641845703px'
    20 PASS Property letter-spacing value 'max(1Q)' computes to 'normal'
     20FAIL Property letter-spacing value 'max(1Q)' computes to 'normal' assert_true: 'max(1Q)' is a supported value for letter-spacing. expected true got false
    2121PASS Property letter-spacing value 'max(1in)' computes to '96px'
    2222PASS Property letter-spacing value 'max(1pc)' computes to '16px'
     
    3333PASS Property letter-spacing value 'min(1cm, 2cm)' computes to '37.7952766418457px'
    3434PASS Property letter-spacing value 'min(1mm, 2mm)' computes to '3.7795276641845703px'
    35 PASS Property letter-spacing value 'min(1Q, 2Q)' computes to 'normal'
     35FAIL Property letter-spacing value 'min(1Q, 2Q)' computes to 'normal' assert_true: 'min(1Q, 2Q)' is a supported value for letter-spacing. expected true got false
    3636PASS Property letter-spacing value 'min(1in, 2in)' computes to '96px'
    3737PASS Property letter-spacing value 'min(1pc, 2pc)' computes to '16px'
     
    4848PASS Property letter-spacing value 'max(1cm, 2cm)' computes to '75.5905532836914px'
    4949PASS Property letter-spacing value 'max(1mm, 2mm)' computes to '7.559055328369141px'
    50 PASS Property letter-spacing value 'max(1Q, 2Q)' computes to 'normal'
     50FAIL Property letter-spacing value 'max(1Q, 2Q)' computes to 'normal' assert_true: 'max(1Q, 2Q)' is a supported value for letter-spacing. expected true got false
    5151PASS Property letter-spacing value 'max(1in, 2in)' computes to '192px'
    5252PASS Property letter-spacing value 'max(1pc, 2pc)' computes to '32px'
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt

    r251521 r251634  
    33PASS Property margin-left value 'min(1cm + 1%)' computes to '41.78125px'
    44PASS Property margin-left value 'min(1mm + 1%)' computes to '7.765625px'
    5 PASS Property margin-left value 'min(1Q + 1%)' computes to '0px'
     5FAIL Property margin-left value 'min(1Q + 1%)' computes to '0px' assert_true: 'min(1Q + 1%)' is a supported value for margin-left. expected true got false
    66PASS Property margin-left value 'min(1in + 1%)' computes to '100px'
    77PASS Property margin-left value 'min(1pc + 1%)' computes to '20px'
     
    1818PASS Property margin-left value 'max(1cm + 1%)' computes to '41.78125px'
    1919PASS Property margin-left value 'max(1mm + 1%)' computes to '7.765625px'
    20 PASS Property margin-left value 'max(1Q + 1%)' computes to '0px'
     20FAIL Property margin-left value 'max(1Q + 1%)' computes to '0px' assert_true: 'max(1Q + 1%)' is a supported value for margin-left. expected true got false
    2121PASS Property margin-left value 'max(1in + 1%)' computes to '100px'
    2222PASS Property margin-left value 'max(1pc + 1%)' computes to '20px'
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/inheritance-expected.txt

    r247193 r251634  
    11
    2 PASS Property scroll-behavior has initial value auto
    3 PASS Property scroll-behavior does not inherit
     2FAIL Property scroll-behavior has initial value auto assert_true: scroll-behavior doesn't seem to be supported in the computed style expected true got false
     3FAIL Property scroll-behavior does not inherit assert_true: expected true got false
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/support/computed-testcommon.js

    r238079 r251634  
    77 * @param {string} property  The name of the CSS property being tested.
    88 * @param {string} specified A specified value for the property.
    9  * @param {string} computed  The expected computed value. If omitted,
    10                              defaults to specified.
     9 * @param {string|array} computed  The expected computed value,
     10 *                                 or an array of permitted computed value.
     11 *                                 If omitted, defaults to specified.
    1112 */
    1213function test_computed_value(property, specified, computed) {
    1314  if (!computed)
    1415    computed = specified;
     16
     17  let computedDesc = "'" + computed + "'";
     18  if (Array.isArray(computed))
     19    computedDesc = '[' + computed.map(e => "'" + e + "'").join(' or ') + ']';
     20
    1521  test(() => {
    16     if (!getComputedStyle(target)[property])
    17       return;
     22    const target = document.getElementById('target');
     23    assert_true(property in getComputedStyle(target), property + " doesn't seem to be supported in the computed style");
     24    assert_true(CSS.supports(property, specified), "'" + specified + "' is a supported value for " + property + ".");
    1825    target.style[property] = '';
    1926    target.style[property] = specified;
    20     assert_equals(getComputedStyle(target)[property], computed);
    21   }, "Property " + property + " value '" + specified + "' computes to '" + computed + "'");
     27
     28    let readValue = getComputedStyle(target)[property];
     29    if (Array.isArray(computed)) {
     30      assert_in_array(readValue, computed);
     31    } else {
     32      assert_equals(readValue, computed);
     33    }
     34    if (readValue !== specified) {
     35      target.style[property] = '';
     36      target.style[property] = readValue;
     37      assert_equals(getComputedStyle(target)[property], readValue,
     38                    'computed value should round-trip');
     39    }
     40  }, "Property " + property + " value '" + specified + "' computes to " +
     41     computedDesc);
    2242}
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/support/inheritance-testcommon.js

    r238079 r251634  
    44
    55function assert_initial(property, initial) {
     6  let initialDesc = initial;
     7  if (Array.isArray(initial))
     8    initialDesc = '[' + initial.map(e => "'" + e + "'").join(' or ') + ']';
     9
    610  test(() => {
    711    const target = document.getElementById('target');
    8     if (!getComputedStyle(target)[property])
    9       return;
     12    assert_true(property in getComputedStyle(target), property + " doesn't seem to be supported in the computed style");
    1013    target.style[property] = 'initial';
    11     assert_equals(getComputedStyle(target)[property], initial);
     14    if (Array.isArray(initial)) {
     15      assert_in_array(getComputedStyle(target)[property], initial);
     16    } else {
     17      assert_equals(getComputedStyle(target)[property], initial);
     18    }
    1219    target.style[property] = '';
    13   }, 'Property ' + property + ' has initial value ' + initial);
     20  }, 'Property ' + property + ' has initial value ' + initialDesc);
    1421}
    1522
     
    1926 * The current document must have an element #target within element #container.
    2027 *
    21  * @param {string} property  The name of the CSS property being tested.
    22  * @param {string} initial   The computed value for 'initial'.
    23  * @param {string} other     An arbitrary value for the property that round
    24  *                           trips and is distinct from the initial value.
     28 * @param {string}        property  The name of the CSS property being tested.
     29 * @param {string|array}  initial   The computed value for 'initial' or a list
     30 *                                  of acceptable computed value serializations.
     31 * @param {string}        other     An arbitrary value for the property that
     32 *                                  round trips and is distinct from the initial
     33 *                                  value.
    2534 */
    2635function assert_inherited(property, initial, other) {
    27   assert_initial(property, initial);
     36  if (initial)
     37    assert_initial(property, initial);
    2838
    2939  test(() => {
    3040    const container = document.getElementById('container');
    3141    const target = document.getElementById('target');
    32     if (!getComputedStyle(target)[property])
    33       return;
     42    assert_true(property in getComputedStyle(target), property + " doesn't seem to be supported in the computed style");
    3443    container.style[property] = 'initial';
    3544    target.style[property] = 'unset';
     
    5564 * The current document must have an element #target within element #container.
    5665 *
    57  * @param {string} property  The name of the CSS property being tested.
    58  * @param {string} initial   The computed value for 'initial'.
    59  * @param {string} other     An arbitrary value for the property that round
    60  *                           trips and is distinct from the initial value.
     66 * @param {string}        property  The name of the CSS property being tested.
     67 * @param {string|array}  initial   The computed value for 'initial' or a list
     68 *                                  of acceptable computed value serializations.
     69 * @param {string}        other     An arbitrary value for the property that
     70 *                                  round trips and is distinct from the initial
     71 *                                  value.
    6172 */
    6273function assert_not_inherited(property, initial, other) {
     
    6677    const container = document.getElementById('container');
    6778    const target = document.getElementById('target');
    68     if (!getComputedStyle(target)[property])
    69       return;
     79    assert_true(property in getComputedStyle(target));
    7080    container.style[property] = 'initial';
    7181    target.style[property] = 'unset';
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/support/parsing-testcommon.js

    r238079 r251634  
    3737    }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
    3838}
     39
     40// serializedSelector can be the expected serialization of selector,
     41// or an array of permitted serializations,
     42// or omitted if value should serialize as selector.
     43function test_valid_selector(selector, serializedSelector) {
     44    if (arguments.length < 2)
     45        serializedSelector = selector;
     46
     47    const stringifiedSelector = JSON.stringify(selector);
     48
     49    test(function(){
     50        document.querySelector(selector);
     51        assert_true(true, stringifiedSelector + " should not throw in querySelector");
     52
     53        const style = document.createElement("style");
     54        document.head.append(style);
     55        const {sheet} = style;
     56        document.head.removeChild(style);
     57        const {cssRules} = sheet;
     58
     59        assert_equals(cssRules.length, 0, "Sheet should have no rule");
     60        sheet.insertRule(selector + "{}");
     61        assert_equals(cssRules.length, 1, "Sheet should have 1 rule");
     62
     63        const readSelector = cssRules[0].selectorText;
     64        if (Array.isArray(serializedSelector))
     65            assert_in_array(readSelector, serializedSelector, "serialization should be sound");
     66        else
     67            assert_equals(readSelector, serializedSelector, "serialization should be canonical");
     68
     69        sheet.deleteRule(0);
     70        assert_equals(cssRules.length, 0, "Sheet should have no rule");
     71        sheet.insertRule(readSelector + "{}");
     72        assert_equals(cssRules.length, 1, "Sheet should have 1 rule");
     73
     74        assert_equals(cssRules[0].selectorText, readSelector, "serialization should round-trip");
     75    }, stringifiedSelector + " should be a valid selector");
     76}
     77
     78function test_invalid_selector(selector) {
     79    const stringifiedSelector = JSON.stringify(selector);
     80
     81    test(function(){
     82        assert_throws(
     83          DOMException.SYNTAX_ERR,
     84          () => document.querySelector(selector),
     85          stringifiedSelector + " should throw in querySelector");
     86
     87        const style = document.createElement("style");
     88        document.head.append(style);
     89        const {sheet} = style;
     90        document.head.removeChild(style);
     91
     92        assert_throws(
     93          DOMException.SYNTAX_ERR,
     94          () => sheet.insertRule(selector + "{}"),
     95          stringifiedSelector + " should throw in insertRule");
     96    }, stringifiedSelector + " should be an invalid selector");
     97}
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/support/w3c-import.log

    r238079 r251634  
    3838/LayoutTests/imported/w3c/web-platform-tests/css/support/import-red.css
    3939/LayoutTests/imported/w3c/web-platform-tests/css/support/inheritance-testcommon.js
     40/LayoutTests/imported/w3c/web-platform-tests/css/support/interpolation-testcommon.js
    4041/LayoutTests/imported/w3c/web-platform-tests/css/support/parsing-testcommon.js
    4142/LayoutTests/imported/w3c/web-platform-tests/css/support/pattern-grg-rgr-grg.png
     
    4344/LayoutTests/imported/w3c/web-platform-tests/css/support/pattern-rgr-grg-rgr.png
    4445/LayoutTests/imported/w3c/web-platform-tests/css/support/pattern-tr.png
     46/LayoutTests/imported/w3c/web-platform-tests/css/support/red-rect.svg
    4547/LayoutTests/imported/w3c/web-platform-tests/css/support/red.ico
    4648/LayoutTests/imported/w3c/web-platform-tests/css/support/ruler-h-50%.png
     
    4850/LayoutTests/imported/w3c/web-platform-tests/css/support/ruler-v-100px.png
    4951/LayoutTests/imported/w3c/web-platform-tests/css/support/ruler-v-50px.png
     52/LayoutTests/imported/w3c/web-platform-tests/css/support/shorthand-testcommon.js
    5053/LayoutTests/imported/w3c/web-platform-tests/css/support/square-purple.png
    5154/LayoutTests/imported/w3c/web-platform-tests/css/support/square-teal.png
Note: See TracChangeset for help on using the changeset viewer.