Commit bee896f7 authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@04c6f30bcca263bb2e86e94125f2aaa36e5b2e7b

Using wpt-import in Chromium 9d32f659.
With Chromium commits locally applied on WPT:
03ccd4e9 "html: Move autofocus tests to html/interaction/focus/the-autofocus-attribute/"
c19433ef "Reland "[ChromeDriver] Stop using --ignore-certificate-errors""
afc509ca "[WPT/common/security-features] Fix typo"
df884b61 "[WPT/referrer-policy] Add worker subresource tests"
86ea3d5b "Renaming fetch/metadata web platform tests"
9d32f659 "[Contacts] Update implementation to match spec changes."


Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

NOAUTOREVERT=true
TBR=foolip

No-Export: true
Change-Id: Ifa5b4bd0ee3f086710defbd174521fdf02831b29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1840671Reviewed-by: default avatarWPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#702850}
parent ad6820b3
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Masking Module Level 1: parsing mask with invalid values</title>
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask">
<meta name="assert" content="mask supports only the '<mask-layer>#' grammar.">
<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('mask', 'none linear-gradient(to 0% 0%, rgb(0, 0, 0), rgb(0, 0, 255))');
test_invalid_value('mask', 'none alpha luminance');
test_invalid_value('mask', 'linear-gradient(to 0% 0%, rgb(0, 0, 0), rgb(0, 0, 255)) url("https://example.com/")');
test_invalid_value('mask', '1px 2px 3px');
test_invalid_value('mask', '1px 2px 3px 4px');
test_invalid_value('mask', '1px 2px / contain / cover');
test_invalid_value('mask', 'repeat-y repeat-x');
test_invalid_value('mask', 'stroke-box no-clip view-box');
test_invalid_value('mask', 'border-box view-box padding-box');
test_invalid_value('mask', 'no-clip border-box content-box');
test_invalid_value('mask', 'content-box stroke-box no-clip');
test_invalid_value('mask', 'add intersect');
</script>
</body>
</html>
This is a testharness.js-based test.
PASS e.style['mask'] = "none" should set the property value
FAIL e.style['mask'] = "none alpha" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "linear-gradient(to left bottom, red, blue)" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "linear-gradient(to left bottom, red, blue) luminance" should set the property value assert_not_equals: property should be set got disallowed value ""
PASS e.style['mask'] = "url(\"https://web-platform.test/\")" should set the property value
FAIL e.style['mask'] = "url(\"https://web-platform.test/\") alpha" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "linear-gradient(to left bottom, red, blue) 1px 2px" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "url(\"https://web-platform.test/\") 1px 2px / contain" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "none repeat-y" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "none border-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "linear-gradient(to left bottom, red, blue) padding-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "none content-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "none margin-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "url(\"https://web-platform.test/\") fill-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "linear-gradient(to left bottom, red, blue) stroke-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "none view-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "none no-clip" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "url(\"https://web-platform.test/\") add" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "none subtract" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "url(\"https://web-platform.test/\") intersect" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "linear-gradient(to left bottom, red, blue) exclude" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "intersect no-clip space round 1px 2px / contain stroke-box linear-gradient(to left bottom, red, blue) luminance" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['mask'] = "intersect no-clip space round 1px 2px / contain view-box, stroke-box linear-gradient(to left bottom, red, blue) luminance" should set the property value assert_not_equals: property should be set got disallowed value ""
Harness: the test ran to completion.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Masking Module Level 1: parsing mask with valid values</title>
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask">
<meta name="assert" content="mask supports the full '<mask-layer>#' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
// <mask-layer> = <mask-reference> <masking-mode>? || <position> [ / <bg-size> ]? ||
// <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator>
// <mask-reference> <masking-mode>?
// <mask-reference> = none | <image> | <mask-source>
// <masking-mode> = alpha | luminance | auto
test_valid_value('mask', 'none');
test_valid_value('mask', 'none alpha');
test_valid_value('mask', 'linear-gradient(to left bottom, red, blue)');
test_valid_value('mask', 'linear-gradient(to left bottom, red, blue) luminance');
test_valid_value('mask', 'url("https://{{host}}/")');
test_valid_value('mask', 'url("https://{{host}}/") alpha');
// <position> [ / <bg-size> ]?
test_valid_value('mask', 'linear-gradient(to left bottom, red, blue) 1px 2px');
test_valid_value('mask', 'url("https://{{host}}/") 1px 2px / contain');
// <repeat-style> = repeat-x | repeat-y | [repeat | space | round | no-repeat]{1,2}
test_valid_value('mask', 'none repeat-y');
// <geometry-box> = <shape-box> | fill-box | stroke-box | view-box
// <shape-box> = <box> | margin-box
// <box> = border-box | padding-box | content-box
test_valid_value('mask', 'none border-box', 'none');
test_valid_value('mask', 'linear-gradient(to left bottom, red, blue) padding-box');
test_valid_value('mask', 'none content-box');
test_valid_value('mask', 'none margin-box');
test_valid_value('mask', 'url("https://{{host}}/") fill-box');
test_valid_value('mask', 'linear-gradient(to left bottom, red, blue) stroke-box');
test_valid_value('mask', 'none view-box');
// [ <geometry-box> | no-clip ]
test_valid_value('mask', 'none no-clip', 'none border-box no-clip');
// <compositing-operator> = add | subtract | intersect | exclude
test_valid_value('mask', 'url("https://{{host}}/") add', 'url("https://{{host}}/")');
test_valid_value('mask', 'none subtract');
test_valid_value('mask', 'url("https://{{host}}/") intersect');
test_valid_value('mask', 'linear-gradient(to left bottom, red, blue) exclude');
// <mask-layer> = <mask-reference> <masking-mode>? || <position> [ / <bg-size> ]? ||
// <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator>
test_valid_value('mask', 'intersect no-clip space round 1px 2px / contain stroke-box linear-gradient(to left bottom, red, blue) luminance', 'linear-gradient(to left bottom, red, blue) luminance 1px 2px / contain space round stroke-box no-clip intersect');
test_valid_value('mask', 'intersect no-clip space round 1px 2px / contain view-box, stroke-box linear-gradient(to left bottom, red, blue) luminance', 'none 1px 2px / contain space round view-box no-clip intersect, linear-gradient(to left bottom, red, blue) luminance stroke-box');
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment