Merge branch 'master' into freetype2

This commit is contained in:
dan-robertson 2018-02-08 16:59:09 +00:00 committed by GitHub
commit 426bd83a0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
346 changed files with 15991 additions and 2648 deletions

View file

@ -600,6 +600,27 @@ fn test_textinput_set_selection_with_direction() {
assert!(textinput.selection_origin.is_some());
assert_eq!(textinput.selection_origin.unwrap().line, 0);
assert_eq!(textinput.selection_origin.unwrap().index, 6);
textinput = text_input(Lines::Multiple, "\n\n");
textinput.set_selection_range(0, 1, SelectionDirection::Forward);
assert_eq!(textinput.edit_point.line, 1);
assert_eq!(textinput.edit_point.index, 0);
assert_eq!(textinput.selection_direction, SelectionDirection::Forward);
assert!(textinput.selection_origin.is_some());
assert_eq!(textinput.selection_origin.unwrap().line, 0);
assert_eq!(textinput.selection_origin.unwrap().index, 0);
textinput = text_input(Lines::Multiple, "\n");
textinput.set_selection_range(0, 1, SelectionDirection::Forward);
assert_eq!(textinput.edit_point.line, 1);
assert_eq!(textinput.edit_point.index, 0);
assert_eq!(textinput.selection_direction, SelectionDirection::Forward);
assert!(textinput.selection_origin.is_some());
assert_eq!(textinput.selection_origin.unwrap().line, 0);
assert_eq!(textinput.selection_origin.unwrap().index, 0);
}
#[test]
@ -629,4 +650,11 @@ fn test_selection_bounds() {
assert_eq!(TextPoint { line: 0, index: 6 }, textinput.selection_end());
assert_eq!(3, textinput.selection_start_offset());
assert_eq!(6, textinput.selection_end_offset());
textinput = text_input(Lines::Multiple, "\n\n");
textinput.set_selection_range(0, 1, SelectionDirection::Forward);
assert_eq!(TextPoint { line: 0, index: 0 }, textinput.selection_origin_or_edit_point());
assert_eq!(TextPoint { line: 0, index: 0 }, textinput.selection_start());
assert_eq!(TextPoint { line: 1, index: 0 }, textinput.selection_end());
}

View file

@ -1,19 +1,20 @@
[createImageBitmap-drawImage.html]
type: testharness
expected: TIMEOUT
[createImageBitmap from a HTMLImageElement, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a HTMLCanvasElement, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageData, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a HTMLVideoElement, and drawImage on the created ImageBitmap]
expected: FAIL
@ -37,19 +38,19 @@
expected: FAIL
[createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageData with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageBitmap with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a Blob with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a bitmap HTMLImageElement, and drawImage on the created ImageBitmap]
expected: FAIL
@ -64,16 +65,16 @@
expected: FAIL
[createImageBitmap from a bitmap SVGImageElement, and drawImage on the created ImageBitmap]
expected: FAIL
expected: TIMEOUT
[createImageBitmap from a bitmap SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a vector SVGImageElement, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a vector SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an HTMLCanvasElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
@ -127,56 +128,56 @@
expected: FAIL
[createImageBitmap from a bitmap SVGImageElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a bitmap SVGImageElement scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a bitmap SVGImageElement resized, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a vector SVGImageElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a vector SVGImageElement scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a vector SVGImageElement resized, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageData scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageData scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageData resized, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageBitmap scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageBitmap scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from an ImageBitmap resized, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a Blob scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a Blob scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN
[createImageBitmap from a Blob resized, and drawImage on the created ImageBitmap]
expected: FAIL
expected: NOTRUN

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,3 @@
[box-shadow-syntax-001.xht]
type: reftest
expected: FAIL
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[transform-table-006.html]
type: reftest
expected: FAIL

View file

@ -0,0 +1,2 @@
[text-overflow-027.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[text-overflow-028.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[text-overflow-029.html]
expected: FAIL

View file

@ -12,3 +12,6 @@
[Values of CSSImportRule attributes]
expected: FAIL
[MediaList mediaText attribute should be updated]
expected: FAIL

View file

@ -0,0 +1,7 @@
[matches-nested.html]
[Test nested :matches() chooses highest specificity for class outside :matches().]
expected: FAIL
[Test nested :matches() specificity for class within arguments.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[matches-specificity.html]
[Test :matches() uses highest possible specificity]
expected: FAIL

View file

@ -0,0 +1,4 @@
[pseudo-class-defined.html]
[Untitled]
expected: FAIL

View file

@ -172,63 +172,3 @@
[XHTML img usemap="http://example.org/#garbage-before-hash-id"]
expected: FAIL
[HTML (quirks) IMG usemap="no-hash-name"]
expected: FAIL
[HTML (quirks) IMG usemap="no-hash-id"]
expected: FAIL
[HTML (quirks) IMG usemap="hash-last#"]
expected: FAIL
[HTML (quirks) IMG usemap=""]
expected: FAIL
[HTML (quirks) IMG usemap="#"]
expected: FAIL
[HTML (quirks) IMG usemap="#percent-escape-name-%41"]
expected: FAIL
[HTML (quirks) IMG usemap="#percent-escape-id-%41"]
expected: FAIL
[HTML (quirks) IMG usemap="#no-such-map"]
expected: FAIL
[HTML (quirks) IMG usemap="#different-CASE-name"]
expected: FAIL
[HTML (quirks) IMG usemap="#different-CASE-id"]
expected: FAIL
[XHTML img usemap="no-hash-name"]
expected: FAIL
[XHTML img usemap="no-hash-id"]
expected: FAIL
[XHTML img usemap="hash-last#"]
expected: FAIL
[XHTML img usemap=""]
expected: FAIL
[XHTML img usemap="#"]
expected: FAIL
[XHTML img usemap="#percent-escape-name-%41"]
expected: FAIL
[XHTML img usemap="#percent-escape-id-%41"]
expected: FAIL
[XHTML img usemap="#no-such-map"]
expected: FAIL
[XHTML img usemap="#different-CASE-name"]
expected: FAIL
[XHTML img usemap="#different-CASE-id"]
expected: FAIL

View file

@ -0,0 +1,4 @@
[setSelectionRange.html]
[setSelectionRange on line boundaries]
expected: FAIL

View file

@ -0,0 +1,7 @@
[muted-errors.sub.html]
[Errors for cross-origin script should be muted]
expected: FAIL
[Errors for cross-origin script should be muted even if the script is once loaded as same-origin]
expected: FAIL

View file

@ -0,0 +1,2 @@
[Create-blocked-port.htm]
expected: CRASH

View file

@ -1,5 +1,8 @@
[extended-payload-length.html]
type: testharness
[Application data is (0xFFFF + 1) byte which starts to use the 64 bit 'Extended payload length' field]
expected: TIMEOUT
[extended-payload-length.html?wss]
type: testharness

View file

@ -8,34 +8,29 @@
<body class="show_output">
<h1>2d.drawImage.zerocanvas</h1>
<p class="desc"></p>
<p class="desc">drawImage with zero-sized canvas as the source shoud throw exception</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
var t = async_test("drawImage with zero-sized canvas as the source shoud throw exception");
_addTest(function(canvas, ctx) {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
var canvas2 = document.createElement('canvas');
canvas2.width = 0;
canvas2.height = 10;
ctx.drawImage(canvas2, 0, 0);
canvas2.height = 50;
assert_throws("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
canvas2.width = 10;
canvas2.width = 50;
canvas2.height = 0;
ctx.drawImage(canvas2, 0, 0);
assert_throws("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
canvas2.width = 0;
canvas2.height = 0;
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
assert_throws("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
});

View file

@ -586,7 +586,7 @@ assertions:
text: "If the image argument is <...> an HTMLVideoElement object whose readyState attribute is either HAVE_NOTHING or HAVE_METADATA<^>, then the implementation *must* return without drawing anything."
- id: 2d.drawImage.zerocanvas
previously: [ 10, "dw and dh" ]
text: "If the image argument is an HTMLCanvasElement object with either a horizontal dimension or a vertical dimension equal to zero, then the implementation *must* return without drawing anything<^>."
text: "If the image argument is an HTMLCanvasElement or an OffscreenCanvas object with either a horizontal dimension or a vertical dimension equal to zero, then the implementation *must* throw an INVALID_STATE_ERR exception<^>."
- id: 2d.drawImage.zerosource
text: "If one of the sw or sh arguments is zero<^>, the implementation *must* return without drawing anything."
- id: 2d.drawImage.paint

View file

@ -9002,27 +9002,22 @@
expected: green
- name: 2d.drawImage.zerocanvas
desc: drawImage with zero-sized canvas as the source shoud throw exception
testing:
- 2d.drawImage.zerocanvas
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
var canvas2 = document.createElement('canvas');
canvas2.width = 0;
canvas2.height = 10;
ctx.drawImage(canvas2, 0, 0);
canvas2.height = 50;
@assert throws INVALID_STATE_ERR ctx.drawImage(canvas2, 0, 0);
canvas2.width = 10;
canvas2.width = 50;
canvas2.height = 0;
ctx.drawImage(canvas2, 0, 0);
@assert throws INVALID_STATE_ERR ctx.drawImage(canvas2, 0, 0);
canvas2.width = 0;
canvas2.height = 0;
ctx.drawImage(canvas2, 0, 0);
@assert pixel 50,25 ==~ 0,255,0,255;
expected: green
@assert throws INVALID_STATE_ERR ctx.drawImage(canvas2, 0, 0);
- name: 2d.drawImage.svg
desc: drawImage() of an SVG image

View file

@ -1,12 +1,12 @@
// To make sure that we take the snapshot at the right time, we do double
// requestAnimationFrame. In the second frame, we take a screenshot, that makes
// sure that we already have a full frame.
function importPaintWorkletAndTerminateTestAfterAsyncPaint(code) {
if (typeof CSS.paintWorklet == "undefined") {
function importWorkletAndTerminateTestAfterAsyncPaint(worklet, code) {
if (typeof worklet == "undefined") {
takeScreenshot();
} else {
var blob = new Blob([code], {type: 'text/javascript'});
CSS.paintWorklet.addModule(URL.createObjectURL(blob)).then(function() {
worklet.addModule(URL.createObjectURL(blob)).then(function() {
requestAnimationFrame(function() {
requestAnimationFrame(function() {
takeScreenshot();

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<title>-webkit-appearance support</title>
<!-- There is no spec for -webkit-appearance. It is supported in Opera, Safari,
Chrome, and Edge. Firefox has expressed intent to support it. -->
<link rel="help" href="https://github.com/whatwg/compat/issues/6">
<meta name="assert" content="This test checks for support of the -webkit-appearance CSS attribute." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="tester"></div>
<script>
const WEBKIT_APPEARANCE_VALUES = [
'none',
'checkbox',
'radio',
'push-button',
'square-button',
'button',
'button-bevel',
'inner-spin-button',
'listbox',
'listitem',
'media-enter-fullscreen-button',
'media-exit-fullscreen-button',
'media-mute-button',
'media-play-button',
'media-overlay-play-button',
'media-toggle-closed-captions-button',
'media-slider',
'media-sliderthumb',
'media-volume-slider-container',
'media-volume-slider',
'media-volume-sliderthumb',
'media-controls-background',
'media-controls-fullscreen-background',
'media-current-time-display',
'media-time-remaining-display',
'menulist',
'menulist-button',
'menulist-text',
'menulist-textfield',
'meter',
'progress-bar',
'progress-bar-value',
'slider-horizontal',
'slider-vertical',
'sliderthumb-horizontal',
'sliderthumb-vertical',
'caret',
'searchfield',
'searchfield-cancel-button',
'textfield',
'textarea',
];
for (const appearance_value of WEBKIT_APPEARANCE_VALUES) {
test(() => {
const div = document.getElementById('tester');
div.style = `-webkit-appearance: ${appearance_value}`;
assert_equals(getComputedStyle(div).webkitAppearance, appearance_value);
});
}
</script>

View file

@ -21,7 +21,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="background">
<div id="canvas-opaque" class="container"></div>
@ -49,7 +49,7 @@ registerPaint('nonOpaque', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -27,7 +27,7 @@ for (let i = 0; i < 3; i++) {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -21,7 +21,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="one"></div>
<div id="two"></div>
@ -38,7 +38,7 @@ registerPaint('ellipse', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -13,7 +13,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -28,7 +28,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -13,7 +13,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -28,7 +28,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -14,7 +14,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -30,7 +30,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -14,7 +14,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -29,7 +29,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -14,7 +14,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -29,7 +29,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -15,7 +15,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -34,7 +34,7 @@ registerPaint('geometry', class {
<script>
document.getElementById('canvas-geometry').style.borderWidth = '10px';
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -15,7 +15,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -34,7 +34,7 @@ registerPaint('geometry', class {
<script>
document.getElementById('canvas-geometry').style.borderImageOutset = '20px';
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -15,7 +15,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -34,7 +34,7 @@ registerPaint('geometry', class {
<script>
document.getElementById('canvas-geometry').style.borderImageOutset = '10px';
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -15,7 +15,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -35,7 +35,7 @@ registerPaint('geometry', class {
<script>
document.getElementById('canvas-geometry').style.borderWidth = '10px';
document.getElementById('canvas-geometry').style.borderImageOutset = '10px';
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -29,7 +29,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -13,7 +13,7 @@ html, body { margin: 0; padding: 0; }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<p>This test ensures that the PaintWorkletGlobalScope.devicePixelRatio returns
the correct value, which should be identical as window.devicePixelRatio. To
@ -33,7 +33,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -33,7 +33,7 @@ registerPaint('successIndicator', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -30,7 +30,7 @@ registerPaint('successIndicator', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -26,7 +26,7 @@ registerPaint('successIndicator', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -10,7 +10,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -24,7 +24,7 @@ registerPaint('green', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -21,7 +21,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="background">
@ -43,7 +43,7 @@ registerPaint('box', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -21,7 +21,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="background">
@ -43,7 +43,7 @@ registerPaint('box', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -19,7 +19,7 @@
#xor { background-image: paint(xor); }
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="source-over"></div>
<div id="source-in"></div>
@ -67,7 +67,7 @@ for (var i = 0; i < compositeOps.length; i++) {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -24,7 +24,7 @@
#filter-url { background-image: paint(filter-url); }
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="filter-none"></div>
<div id="filter-blur-10px"></div>
@ -100,7 +100,7 @@ for (var i = 0; i < filterOps.length; i++) {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -34,7 +34,7 @@ registerPaint('gradients', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -10,7 +10,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<div id="output"></div>
<script id="code" type="text/worklet">
@ -25,6 +25,6 @@
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</html>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -42,7 +42,7 @@ registerPaint('paths', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -10,7 +10,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -30,7 +30,7 @@ registerPaint('rects', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -33,7 +33,7 @@ registerPaint('shadows', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -9,7 +9,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="output"></div>
@ -32,7 +32,7 @@ registerPaint('transform', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -42,7 +42,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -42,7 +42,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -42,7 +42,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -43,7 +43,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -39,7 +39,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -38,7 +38,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -42,7 +42,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -42,7 +42,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -40,7 +40,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -40,7 +40,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -38,7 +38,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -42,7 +42,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -38,7 +38,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -40,7 +40,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -43,7 +43,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -42,7 +42,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -41,7 +41,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -13,7 +13,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<p>This test result should show a rect with black border, where the rect is
filled with green on the lower right corner. The registerPaint('failureIndicator')
@ -63,7 +63,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -41,7 +41,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -40,7 +40,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -43,7 +43,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -12,7 +12,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -41,7 +41,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -14,7 +14,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -56,7 +56,7 @@ registerPaint('geometry', class {
CSS.registerProperty({name: '--length', syntax: '<length>', initialValue: '0px'});
CSS.registerProperty({name: '--length-initial', syntax: '<length>', initialValue: '20px'});
CSS.registerProperty({name: '--number', syntax: '<number>', initialValue: '0'});
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -14,7 +14,7 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>
@ -56,7 +56,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -18,7 +18,7 @@ div::before {
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body style="font: 10px/1 Ahem;">
<div></div>
@ -57,7 +57,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -15,7 +15,7 @@ div::first-letter {
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<script src="/common/worklet-reftest.js"></script>
<body style="font: 10px/1 Ahem;">
<div>ppp</div>
@ -51,7 +51,7 @@ registerPaint('geometry', class {
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
</script>
</body>
</html>

View file

@ -9,7 +9,6 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<body>
<div id="output"></div>

View file

@ -9,7 +9,6 @@
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<body>
<div id="output"></div>

View file

@ -0,0 +1,82 @@
<!DOCTYPE html>
<title>CSS Test: Properties allowed on ::first-letter pseudo elements</title>
<link rel="author" title="Chris Nardi" href="mailto:cnardi@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-letter-styling">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#target::first-letter {}
#target { visibility: hidden; }
</style>
<div id="target">text</div>
<script>
'use strict';
var style;
const target = document.querySelector("#target");
var defaultComputedStyle = getComputedStyle(target);
test(function() {
var styleRule = document.styleSheets[0].cssRules[0];
assert_equals(styleRule.selectorText, '#target::first-letter', 'make sure we have the correct style rule');
style = styleRule.style;
}, 'pre test setup');
var validProperties = {
backgroundAttachment: 'fixed',
backgroundBlendMode: 'hue',
backgroundClip: 'padding-box',
backgroundColor: 'rgb(10, 20, 30)',
backgroundImage: 'linear-gradient(black, white)',
backgroundOrigin: 'border-box',
backgroundPosition: 'left 10px top 20px',
backgroundRepeat: 'no-repeat',
backgroundSize: '10px 20px',
border: '40px dotted rgb(10, 20, 30)',
borderImage: 'linear-gradient(black, white) 10% / 20 / 30px repeat',
borderRadius: '10px 20px',
boxShadow: 'rgb(10, 20, 30) 10px 20px 30px 40px inset',
color: 'rgba(10, 20, 30, 0.4)',
float: 'right',
font: 'italic small-caps 900 normal 10px / 20px sans-serif',
fontFeatureSettings: '"vert" 2',
fontSizeAdjust: '0.5',
fontKerning: 'none',
fontVariationSettings: '"XHGT" 0.7',
letterSpacing: '12px',
margin: '10px 20px 30px 40px',
padding: '10px 20px 30px 40px',
opacity: '0.5',
textDecoration: 'overline wavy rgb(10, 20, 30)',
textJustify: 'inter-word',
textShadow: 'rgb(10, 20, 30) 10px 20px 30px',
textTransform: 'capitalize',
textUnderlinePosition: 'under',
verticalAlign: '12%',
wordSpacing: '12px'
};
var invalidProperties = {
transition: 'transform 1s',
transform: 'rotate(45deg)',
wordBreak: 'break-all'
};
function testFirstLetterProperty(property, rule, expected, reason) {
test(function() {
style[property] = "";
style[property] = rule;
assert_equals(getComputedStyle(target, '::first-letter')[property], expected);
style[property] = "";
}, reason);
}
for (var property in validProperties) {
testFirstLetterProperty(property, validProperties[property], validProperties[property],
"Whitelisted property " + property + " should be applied to first-letter pseudo elements.");
}
for (var property in invalidProperties) {
testFirstLetterProperty(property, invalidProperties[property], defaultComputedStyle[property],
"Non-whitelisted property " + property + " should not be applied to first-letter pseudo elements.");
}
</script>

View file

@ -54,6 +54,9 @@ function assert_style_value_equals(a, b) {
assert_style_value_equals(a.ax, b.ax);
assert_style_value_equals(a.ay, b.ay);
break;
case 'CSSSkewX':
assert_style_value_equals(a.ax, b.ax);
break;
case 'CSSPerspective':
assert_style_value_equals(a.length, b.length);
break;

View file

@ -29,22 +29,22 @@ const gTestCases = [
{
value: 'var(--A, 1em)',
expectedResult: [
new CSSVariableReferenceValue('--A', new CSSUnparsedValue(' 1em')),
new CSSVariableReferenceValue('--A', new CSSUnparsedValue([' 1em'])),
]
},
{
value: 'var(--A, var(--B))',
expectedResult: [
new CSSVariableReferenceValue('--A', new CSSUnparsedValue(' ', new CSSVariableReferenceValue('--B'))),
new CSSVariableReferenceValue('--A', new CSSUnparsedValue([' ', new CSSVariableReferenceValue('--B')])),
]
},
{
value: 'calc(42px + var(--foo, 15em) + var(--bar, var(--far) + 15px))',
expectedResult: [
'calc(42px + ',
new CSSVariableReferenceValue('--foo', new CSSUnparsedValue(' 15em')),
new CSSVariableReferenceValue('--foo', new CSSUnparsedValue([' 15em'])),
' + ',
new CSSVariableReferenceValue('--bar', new CSSUnparsedValue(' ', new CSSVariableReferenceValue('--far'), ' + 15px')),
new CSSVariableReferenceValue('--bar', new CSSUnparsedValue([' ', new CSSVariableReferenceValue('--far'), ' + 15px'])),
')',
]
},
@ -52,11 +52,11 @@ const gTestCases = [
for (const {value, expectedResult} of gTestCases) {
test(t => {
assert_string_normalizes_to(t, 'color', value, new CSSUnparsedValue(...expectedResult));
assert_string_normalizes_to(t, 'color', value, new CSSUnparsedValue(expectedResult));
}, 'Normalizing "' + value + '" on a CSS property returns correct CSSUnparsedValue');
test(t => {
assert_string_normalizes_to(t, '--X', value, new CSSUnparsedValue(...expectedResult));
assert_string_normalizes_to(t, '--X', value, new CSSUnparsedValue(expectedResult));
}, 'Normalizing "' + value + '" on a custom property returns correct CSSUnparsedValue');
}

View file

@ -123,6 +123,11 @@ const gTestCases = [
expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
desc: 'skew() with only X'
},
{
cssText: 'skew(90deg, 0deg)',
expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
desc: 'skew() with X and Y which is 0 value'
},
{
cssText: 'skew(90deg, 45deg)',
expected: new CSSSkew(CSS.deg(90), CSS.deg(45)),
@ -130,7 +135,7 @@ const gTestCases = [
},
{
cssText: 'skewX(90deg)',
expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
expected: new CSSSkewX(CSS.deg(90)),
desc: 'skewX()'
},
{
@ -153,12 +158,13 @@ for (const {cssText, expected, desc} of gTestCases) {
test(t => {
test_transform_normalization(t,
'translate(1px) rotateX(90deg) perspective(1px) skew(90deg) scale3d(1, 2, 3)',
'translate(1px) rotateX(90deg) perspective(1px) skew(90deg) skewX(20deg) scale3d(1, 2, 3)',
new CSSTransformValue([
new CSSTranslate(CSS.px(1), CSS.px(0)),
new CSSRotate(CSS.number(1), CSS.number(0), CSS.number(0), CSS.deg(90)),
new CSSPerspective(CSS.px(1)),
new CSSSkew(CSS.deg(90), CSS.deg(0)),
new CSSSkewX(CSS.deg(20)),
new CSSScale(CSS.number(1), CSS.number(2), CSS.number(3)),
]));
}, 'Normalizing a <transform-list> returns a CSSTransformValue containing all the transforms');

View file

@ -49,6 +49,11 @@ const gTestCases = [
cssText: 'skew(90deg)',
desc: 'CSSSkew with Y which is 0 value'
},
{
value: new CSSSkewX(CSS.deg(90)),
cssText: 'skewX(90deg)',
desc: 'CSSSkewX'
},
{
value: new CSSPerspective(CSS.px(1)),
cssText: 'perspective(1px)',

View file

@ -11,25 +11,25 @@
'use strict';
test(() => {
assert_equals(new CSSUnparsedValue('lem', 'on', 'ade').toString(), 'lemonade');
assert_equals(new CSSUnparsedValue(['lem', 'on', 'ade']).toString(), 'lemonade');
}, 'CSSUnparsedValue containing strings serializes to its concatenated contents');
test(() => {
assert_equals(new CSSUnparsedValue(
assert_equals(new CSSUnparsedValue([
new CSSVariableReferenceValue('--A',
new CSSUnparsedValue(new CSSVariableReferenceValue('--B'))),
new CSSVariableReferenceValue('--C')).toString(),
new CSSUnparsedValue([new CSSVariableReferenceValue('--B')])),
new CSSVariableReferenceValue('--C')]).toString(),
'var(--A,var(--B))var(--C)');
}, 'CSSUnparsedValue containing variable references serializes its ' +
'concatenated contents');
test(() => {
assert_equals(new CSSUnparsedValue('foo', 'bar ',
assert_equals(new CSSUnparsedValue(['foo', 'bar ',
new CSSVariableReferenceValue('--A',
new CSSUnparsedValue('baz ',
new CSSVariableReferenceValue('--B'), 'lemon')),
new CSSUnparsedValue(['baz ',
new CSSVariableReferenceValue('--B'), 'lemon'])),
new CSSVariableReferenceValue('--C',
new CSSUnparsedValue('ade'))).toString(),
new CSSUnparsedValue(['ade']))]).toString(),
'foobar var(--A,baz var(--B)lemon)var(--C,ade)');
}, 'CSSUnparsedValue containing mix of strings and variable references ' +
'serializes to its concatenated contents');

View file

@ -0,0 +1,62 @@
<!doctype html>
<meta charset="utf-8">
<title>CSSSkewX tests</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssskewx">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/testhelper.js"></script>
<script>
'use strict';
const gInvalidTestCases = [
{ value: 'auto', desc: 'a keyword'},
{ value: 3.14, desc: 'a double'},
{ value: 0, desc: 'a unitless zero'},
{ value: '10deg', desc: 'a string angle'},
{ value: CSS.number(10), desc: 'a number CSSUnitValue'},
{ value: CSS.s(10), desc: 'a time dimension CSSUnitValue'},
{ value: new CSSMathSum(CSS.px(1)), desc: 'a CSSMathValue of length type' },
];
for (const {value, desc} of gInvalidTestCases) {
test(() => {
assert_throws(new TypeError(), () => new CSSSkewX(value));
}, 'Constructing a CSSSkewX with ' + desc + ' throws a TypeError');
}
for (const {value, desc} of gInvalidTestCases) {
test(() => {
let skewX = new CSSSkewX(CSS.deg(0));
assert_throws(new TypeError(), () => skewX.ax = value);
assert_style_value_equals(skewX.ax, CSS.deg(0));
}, 'Updating CSSSkewX.ax with ' + desc + ' throws a TypeError');
}
const gValidTestCases = [
{ value: CSS.deg(-3.14), desc: 'an angle CSSUnitValue' },
{ value: new CSSMathSum(CSS.deg(1)), desc: 'a CSSMathValue of angle type' },
];
for (const {value: ax, desc: axDesc} of gValidTestCases) {
test(() => {
const skewX = new CSSSkewX(ax);
assert_equals(skewX.ax, ax);
assert_true(skewX.is2D);
}, 'CSSSkewX can be constructed from ' + axDesc);
}
for (const {value, desc} of gValidTestCases) {
test(() => {
let skewX = new CSSSkewX(CSS.deg(0));
skewX.ax = value;
assert_style_value_equals(skewX.ax, value);
}, 'CSSSkew.ax can be updated to ' + desc);
}
test(() => {
let skewX = new CSSSkewX(CSS.deg(0));
skewX.is2D = false;
assert_true(skewX.is2D);
}, 'Modifying skewX.is2D is a no-op');
</script>

View file

@ -37,7 +37,7 @@ const gTestArguments = [
for (const {args, description} of gTestArguments) {
test(() => {
const result = new CSSUnparsedValue(...args);
const result = new CSSUnparsedValue(args);
assert_not_equals(result, null,
'A CSSUnparsedValue should be created');

View file

@ -22,7 +22,7 @@ test(() => {
test(() => {
const result = new CSSVariableReferenceValue('--foo',
new CSSUnparsedValue('lemon'));
new CSSUnparsedValue(['lemon']));
assert_not_equals(result, null,
'A CSSVariableReferenceValue should be created');
@ -30,7 +30,7 @@ test(() => {
'Variable member should be same as passed in the constructor');
assert_not_equals(result.fallback, null,
'Fallback member should not be null');
assert_style_value_equals(result.fallback, new CSSUnparsedValue('lemon'),
assert_style_value_equals(result.fallback, new CSSUnparsedValue(['lemon']),
'Fallback member should be as same as passed in the constructor');
}, 'CSSVariableReferenceValue can be constructed with fallback');

View file

@ -38,7 +38,7 @@ test(() => {
test(() => {
const result = styleMap.get('--foo');
assert_style_value_equals(result, new CSSUnparsedValue(' auto'));
assert_style_value_equals(result, new CSSUnparsedValue([' auto']));
}, 'Computed StylePropertyMap contains custom property declarations in style rules');
test(() => {
@ -48,7 +48,7 @@ test(() => {
test(() => {
const result = styleMap.get('--bar');
assert_style_value_equals(result, new CSSUnparsedValue(' 5'));
assert_style_value_equals(result, new CSSUnparsedValue([' 5']));
}, 'Computed StylePropertyMap contains custom property declarations in inline rules');
test(() => {

View file

@ -24,7 +24,7 @@ test(t => {
test(t => {
const styleMap = createComputedStyleMap(t, '--foo: auto; --bar: 10px');
assert_style_value_equals(styleMap.get('--foo'),
new CSSUnparsedValue(' auto'));
new CSSUnparsedValue([' auto']));
}, 'Getting a valid custom property from computed style returns the ' +
'correct entry');

View file

@ -31,7 +31,7 @@ test(t => {
test(t => {
const styleMap = createComputedStyleMap(t, '--foo: auto; --bar: 10px');
assert_style_value_array_equals(styleMap.getAll('--foo'), [new CSSUnparsedValue(' auto')]);
assert_style_value_array_equals(styleMap.getAll('--foo'), [new CSSUnparsedValue([' auto'])]);
}, 'Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry');
test(t => {

View file

@ -34,9 +34,9 @@ test(t => {
test(t => {
const styleMap = createComputedStyleMap(t, '--A: A; --C: C; color: red; --B: B;');
assert_style_value_equals(findInStyleMap(styleMap, '--A'), new CSSUnparsedValue(' A'));
assert_style_value_equals(findInStyleMap(styleMap, '--B'), new CSSUnparsedValue(' B'));
assert_style_value_equals(findInStyleMap(styleMap, '--C'), new CSSUnparsedValue(' C'));
assert_style_value_equals(findInStyleMap(styleMap, '--A'), new CSSUnparsedValue([' A']));
assert_style_value_equals(findInStyleMap(styleMap, '--B'), new CSSUnparsedValue([' B']));
assert_style_value_equals(findInStyleMap(styleMap, '--C'), new CSSUnparsedValue([' C']));
}, 'StylePropertyMap iterator returns custom properties with the correct CSSStyleValue');
</script>

View file

@ -45,7 +45,7 @@ test(() => {
}, 'Declared StylePropertyMap does not contain inline styles');
test(() => {
assert_style_value_equals(styleMap.get('--foo'), new CSSUnparsedValue(' auto'));
assert_style_value_equals(styleMap.get('--foo'), new CSSUnparsedValue([' auto']));
}, 'Declared StylePropertyMap contains custom property declarations');
test(() => {

View file

@ -29,7 +29,7 @@ test(t => {
test(t => {
const styleMap = createDeclaredStyleMap(t, '--foo: auto; --bar: 10px');
assert_style_value_equals(styleMap.get('--foo'),
new CSSUnparsedValue(' auto'));
new CSSUnparsedValue([' auto']));
}, 'Getting a valid custom property from CSS rule returns the ' +
'correct entry');

View file

@ -36,7 +36,7 @@ test(t => {
test(t => {
const styleMap = createDeclaredStyleMap(t, '--foo: auto; --bar: 10px');
assert_style_value_array_equals(styleMap.getAll('--foo'), [new CSSUnparsedValue(' auto')]);
assert_style_value_array_equals(styleMap.getAll('--foo'), [new CSSUnparsedValue([' auto'])]);
}, 'Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry');
test(t => {

View file

@ -42,9 +42,9 @@ test(t => {
assert_array_equals(keys, ['--A', '--B', '--C']);
assert_style_value_array_equals(values, [
new CSSUnparsedValue(' A'),
new CSSUnparsedValue(' B'),
new CSSUnparsedValue(' C'),
new CSSUnparsedValue([' A']),
new CSSUnparsedValue([' B']),
new CSSUnparsedValue([' C']),
])
}, 'StylePropertyMap iterator returns custom properties with the correct CSSStyleValue');

View file

@ -63,11 +63,11 @@ test(t => {
test(t => {
let styleMap = createDeclaredStyleMap(t, '');
styleMap.set('--foo', new CSSUnparsedValue('auto'));
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue('auto'));
styleMap.set('--foo', new CSSUnparsedValue(['auto']));
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue(['auto']));
styleMap.set('--foo', '20px');
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue('20px'));
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue(['20px']));
}, 'Setting a custom property with CSSStyleValue or String updates its value');
test(t => {

View file

@ -46,11 +46,11 @@ test(t => {
test(t => {
let styleMap = createDeclaredStyleMap(t, '');
styleMap.update('--foo', () => new CSSUnparsedValue('auto'));
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue('auto'));
styleMap.update('--foo', () => new CSSUnparsedValue(['auto']));
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue(['auto']));
styleMap.update('--foo', () => new CSSUnparsedValue('20px'));
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue('20px'));
styleMap.update('--foo', () => new CSSUnparsedValue(['20px']));
assert_style_value_array_equals(styleMap.get('--foo'), new CSSUnparsedValue(['20px']));
}, 'Updating a custom property with CSSStyleValue updates its value');
test(t => {

View file

@ -29,7 +29,7 @@ test(t => {
test(t => {
const styleMap = createInlineStyleMap(t, '--foo: auto; --bar: 10px');
assert_style_value_equals(styleMap.get('--foo'),
new CSSUnparsedValue(' auto'));
new CSSUnparsedValue([' auto']));
}, 'Getting a valid custom property from inline style returns the ' +
'correct entry');

View file

@ -36,7 +36,7 @@ test(t => {
test(t => {
const styleMap = createInlineStyleMap(t, '--foo: auto; --bar: 10px');
assert_style_value_array_equals(styleMap.getAll('--foo'), [new CSSUnparsedValue(' auto')]);
assert_style_value_array_equals(styleMap.getAll('--foo'), [new CSSUnparsedValue([' auto'])]);
}, 'Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry');
test(t => {

View file

@ -42,9 +42,9 @@ test(t => {
assert_array_equals(keys, ['--A', '--B', '--C']);
assert_style_value_array_equals(values, [
new CSSUnparsedValue(' A'),
new CSSUnparsedValue(' B'),
new CSSUnparsedValue(' C'),
new CSSUnparsedValue([' A']),
new CSSUnparsedValue([' B']),
new CSSUnparsedValue([' C']),
])
}, 'StylePropertyMap iterator returns custom properties with the correct CSSStyleValue');

Some files were not shown because too many files have changed in this diff Show more