diff --git a/testing/web-platform/tests/css/css-backgrounds/inheritance.sub.html b/testing/web-platform/tests/css/css-backgrounds/inheritance.sub.html index efd6615f4c8dd..ee029f24f41a9 100644 --- a/testing/web-platform/tests/css/css-backgrounds/inheritance.sub.html +++ b/testing/web-platform/tests/css/css-backgrounds/inheritance.sub.html @@ -66,6 +66,38 @@ " > < +link +rel += +" +help +" +href += +" +https +: +/ +/ +drafts +. +csswg +. +org +/ +css +- +backgrounds +- +4 +/ +# +property +- +index +" +> +< meta name = @@ -534,6 +566,42 @@ ' background - +position +- +x +' +' +0 +% +' +' +10px +' +) +; +assert_not_inherited +( +' +background +- +position +- +y +' +' +0 +% +' +' +20px +' +) +; +assert_not_inherited +( +' +background +- repeat ' ' diff --git a/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-computed.html b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-computed.html new file mode 100644 index 0000000000000..a02d75411e254 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-computed.html @@ -0,0 +1,501 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +CSS +Backgrounds +and +Borders +Module +Level +4 +: +getComputedValue +( +) +. +backgroundPositionX +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +drafts +. +csswg +. +org +/ +css +- +backgrounds +- +4 +/ +# +propdef +- +background +- +position +- +x +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +css +/ +support +/ +computed +- +testcommon +. +js +" +> +< +/ +script +> +< +style +> +# +target +{ +font +- +size +: +40px +; +} +< +/ +style +> +< +/ +head +> +< +body +> +< +div +id += +" +target +" +> +< +/ +div +> +< +script +> +test_computed_value +( +" +background +- +position +- +x +" +" +center +" +" +50 +% +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +left +" +" +0 +% +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +right +" +" +100 +% +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +x +- +start +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +x +- +end +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +- +20 +% +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +10px +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +0 +. +5em +" +" +20px +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +calc +( +10px +- +0 +. +5em +) +" +" +- +10px +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +left +- +20 +% +" +" +- +20 +% +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +right +10px +" +" +calc +( +100 +% ++ +10px +) +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +- +20 +% +10px +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +center +left +right +" +" +50 +% +0 +% +100px +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +0 +. +5em +x +- +start +x +- +end +" +" +20px +x +- +start +x +- +end +" +) +; +test_computed_value +( +" +background +- +position +- +x +" +" +calc +( +10px +- +0 +. +5em +) +left +- +20 +% +right +10px +" +" +- +10px +- +20 +% +calc +( +100 +% ++ +10px +) +" +) +; +< +/ +script +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-invalid.html b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-invalid.html new file mode 100644 index 0000000000000..2beb105a4c633 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-invalid.html @@ -0,0 +1,346 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +CSS +Backgrounds +and +Borders +Module +Level +4 +: +parsing +background +- +position +- +x +with +invalid +values +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +drafts +. +csswg +. +org +/ +css +- +backgrounds +- +4 +/ +# +propdef +- +background +- +position +- +x +" +> +< +meta +name += +" +assert +" +content += +" +background +- +position +- +x +supports +only +the +grammar +' +[ +center +| +[ +left +| +right +| +x +- +start +| +x +- +end +] +? +< +length +- +percentage +> +? +] +# +' +. +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +css +/ +support +/ +parsing +- +testcommon +. +js +" +> +< +/ +script +> +< +/ +head +> +< +body +> +< +script +> +test_invalid_value +( +" +background +- +position +- +x +" +" +top +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +bottom +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +y +- +start +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +y +- +end +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +center +10px +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +20 +% +left +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +right +left +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +x +- +start +center +" +) +; +test_invalid_value +( +" +background +- +position +- +x +" +" +left +center +right +" +) +; +< +/ +script +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-valid.html b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-valid.html new file mode 100644 index 0000000000000..910a88a0cce99 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-x-valid.html @@ -0,0 +1,462 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +CSS +Backgrounds +and +Borders +Module +Level +4 +: +parsing +background +- +position +- +x +with +valid +values +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +drafts +. +csswg +. +org +/ +css +- +backgrounds +- +4 +/ +# +propdef +- +background +- +position +- +x +" +> +< +meta +name += +" +assert +" +content += +" +background +- +position +- +x +supports +the +full +grammar +' +[ +center +| +[ +left +| +right +| +x +- +start +| +x +- +end +] +? +< +length +- +percentage +> +? +] +# +' +. +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +css +/ +support +/ +parsing +- +testcommon +. +js +" +> +< +/ +script +> +< +/ +head +> +< +body +> +< +script +> +test_valid_value +( +" +background +- +position +- +x +" +" +center +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +left +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +right +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +x +- +start +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +x +- +end +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +- +20 +% +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +10px +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +0 +. +5em +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +calc +( +10px +- +0 +. +5em +) +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +left +- +20 +% +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +right +10px +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +- +20 +% +10px +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +center +left +right +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +0 +. +5em +x +- +start +x +- +end +" +) +; +test_valid_value +( +" +background +- +position +- +x +" +" +calc +( +10px +- +0 +. +5em +) +left +- +20 +% +right +10px +" +) +; +< +/ +script +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-computed.html b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-computed.html new file mode 100644 index 0000000000000..f07f141b7eef5 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-computed.html @@ -0,0 +1,501 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +CSS +Backgrounds +and +Borders +Module +Level +4 +: +getComputedValue +( +) +. +backgroundPositionY +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +drafts +. +csswg +. +org +/ +css +- +backgrounds +- +4 +/ +# +propdef +- +background +- +position +- +y +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +css +/ +support +/ +computed +- +testcommon +. +js +" +> +< +/ +script +> +< +style +> +# +target +{ +font +- +size +: +40px +; +} +< +/ +style +> +< +/ +head +> +< +body +> +< +div +id += +" +target +" +> +< +/ +div +> +< +script +> +test_computed_value +( +" +background +- +position +- +y +" +" +center +" +" +50 +% +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +top +" +" +0 +% +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +bottom +" +" +100 +% +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +y +- +start +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +y +- +end +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +- +20 +% +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +10px +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +0 +. +5em +" +" +20px +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +calc +( +10px +- +0 +. +5em +) +" +" +- +10px +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +top +- +20 +% +" +" +- +20 +% +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +bottom +10px +" +" +calc +( +100 +% ++ +10px +) +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +- +20 +% +10px +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +center +top +bottom +" +" +50 +% +0 +% +100px +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +0 +. +5em +y +- +start +y +- +end +" +" +20px +y +- +start +y +- +end +" +) +; +test_computed_value +( +" +background +- +position +- +y +" +" +calc +( +10px +- +0 +. +5em +) +top +- +20 +% +bottom +10px +" +" +- +10px +- +20 +% +calc +( +100 +% ++ +10px +) +" +) +; +< +/ +script +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-invalid.html b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-invalid.html new file mode 100644 index 0000000000000..59c1120e64be8 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-invalid.html @@ -0,0 +1,346 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +CSS +Backgrounds +and +Borders +Module +Level +4 +: +parsing +background +- +position +- +y +with +invalid +values +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +drafts +. +csswg +. +org +/ +css +- +backgrounds +- +4 +/ +# +propdef +- +background +- +position +- +y +" +> +< +meta +name += +" +assert +" +content += +" +background +- +position +- +y +supports +only +the +grammar +' +[ +center +| +[ +top +| +bottom +| +y +- +start +| +y +- +end +] +? +< +length +- +percentage +> +? +] +# +' +. +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +css +/ +support +/ +parsing +- +testcommon +. +js +" +> +< +/ +script +> +< +/ +head +> +< +body +> +< +script +> +test_invalid_value +( +" +background +- +position +- +y +" +" +left +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +right +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +x +- +start +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +x +- +end +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +center +10px +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +20 +% +top +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +bottom +top +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +y +- +start +center +" +) +; +test_invalid_value +( +" +background +- +position +- +y +" +" +top +center +bottom +" +) +; +< +/ +script +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-valid.html b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-valid.html new file mode 100644 index 0000000000000..86f7a28b554a1 --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-y-valid.html @@ -0,0 +1,462 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +CSS +Backgrounds +and +Borders +Module +Level +4 +: +parsing +background +- +position +- +y +with +valid +values +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +drafts +. +csswg +. +org +/ +css +- +backgrounds +- +4 +/ +# +propdef +- +background +- +position +- +y +" +> +< +meta +name += +" +assert +" +content += +" +background +- +position +- +y +supports +the +full +grammar +' +[ +center +| +[ +top +| +bottom +| +y +- +start +| +y +- +end +] +? +< +length +- +percentage +> +? +] +# +' +. +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +css +/ +support +/ +parsing +- +testcommon +. +js +" +> +< +/ +script +> +< +/ +head +> +< +body +> +< +script +> +test_valid_value +( +" +background +- +position +- +y +" +" +center +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +top +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +bottom +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +y +- +start +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +y +- +end +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +- +20 +% +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +10px +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +0 +. +5em +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +calc +( +10px +- +0 +. +5em +) +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +top +- +20 +% +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +bottom +10px +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +- +20 +% +10px +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +center +top +bottom +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +0 +. +5em +y +- +start +y +- +end +" +) +; +test_valid_value +( +" +background +- +position +- +y +" +" +calc +( +10px +- +0 +. +5em +) +top +- +20 +% +bottom +10px +" +) +; +< +/ +script +> +< +/ +body +> +< +/ +html +>