mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005'
This commit is contained in:
parent
ace9b32b1c
commit
df68c4e5d1
15632 changed files with 514865 additions and 155000 deletions
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=UTF-8>
|
||||
<title>CSS Painting API Level 1: parsing paint() with valid values</title>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-paint-api/#paint-notation">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<body>
|
||||
|
||||
<!--
|
||||
|
||||
This test registers the paint function it uses. However, for access
|
||||
to specified and computed values, this doesn't appear to be required
|
||||
by the specification. However, it does appear to be required by the
|
||||
current implementation in Chromium. See https://crbug.com/1344490 .
|
||||
|
||||
-->
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
|
||||
registerPaint('mypaint', class {
|
||||
paint(ctx, size, properties, args) { }
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
setup({ explicit_done: true });
|
||||
|
||||
let worklet_code = document.getElementById('code').textContent;
|
||||
importWorklet(CSS.paintWorklet, worklet_code).then(() => {
|
||||
test_valid_value("background-image", "paint(mypaint)");
|
||||
test_valid_value("background-image", "paint( mypaint )", "paint(mypaint)");
|
||||
test_valid_value("background-image", "paint(mypaint ", "paint(mypaint)");
|
||||
test_valid_value("background-image", "paint( mypaint", "paint(mypaint)");
|
||||
test_valid_value("background-image", "paint(mypaint, blue)");
|
||||
test_valid_value("background-image", "paint(mypaint, {})");
|
||||
test_valid_value("background-image", "paint(mypaint, [])");
|
||||
test_valid_value("background-image", "paint(mypaint, ())");
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue