Update web-platform-tests to revision 2d42384cf21efd71843295d319c1bab85b3acf4a

This commit is contained in:
WPT Sync Bot 2019-01-11 20:32:19 -05:00
parent f2b224d610
commit e851ef0cd2
1014 changed files with 5653 additions and 1590 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
[hittest-overlapping-margin.html]
[Flexboxes should perform hit testing in reverse paint order for overlapping elements: negative margin case (crbug.com/844505)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hittest-overlapping-relative.html]
[Flexboxes should perform hit testing in reverse paint order for overlapping elements: relative case (crbug.com/844505)]
expected: FAIL

View file

@ -332,3 +332,6 @@
[Matching font-style: 'oblique -21deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg']
expected: FAIL
[Matching font-weight: '430' should prefer '500' over '400 425']
expected: FAIL

View file

@ -0,0 +1,2 @@
[tab-size-spacing-001.html]
expected: FAIL

View file

@ -0,0 +1,19 @@
[cssom-pagerule.html]
[Set selectorText to named page after rule was removed]
expected: FAIL
[Sanity checks]
expected: FAIL
[Page selector is initially the empty string]
expected: FAIL
[Set selectorText to :left pseudo page]
expected: FAIL
[Set selectorText to named page]
expected: FAIL
[Set selectorText to named page with :first pseudo page]
expected: FAIL

View file

@ -0,0 +1,4 @@
[prefers-color-scheme.html]
[prefers-color-scheme]
expected: FAIL

View file

@ -0,0 +1,7 @@
[HTMLCollection-delete.html]
[Strict name]
expected: FAIL
[Strict id]
expected: FAIL

View file

@ -11,7 +11,7 @@
expected: FAIL
[pick the first with activation behavior <a href>]
expected: FAIL
expected: TIMEOUT
[event state during post-click handling]
expected: TIMEOUT

View file

@ -128,6 +128,99 @@
[encodeInto() with A and destination length 10, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 4, filler 128]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 4, filler 128]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 0, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 4, filler 0]
expected: FAIL
[encodeInto() and a detached output buffer]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 4, filler random]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 0, filler 128]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 0, filler 128]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 0, filler random]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 0, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 0, filler random]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 0, filler 0]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 4, filler 128]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 0, filler 0]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 4, filler 128]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 0, filler 128]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 0, filler random]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 4, filler 0]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 0, filler 128]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 0, filler 0]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 0, filler 0]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 4, filler random]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 0, filler 0]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 0, filler 128]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 4, filler 128]
expected: FAIL
[encodeInto.any.worker.html]
[encodeInto() with 𝌆A and destination length 3, offset 4, filler 128]
@ -259,3 +352,96 @@
[encodeInto() with A and destination length 10, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 4, filler 128]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 4, filler 128]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 0, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 4, filler 0]
expected: FAIL
[encodeInto() and a detached output buffer]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 4, filler random]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 0, filler 128]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 0, filler 128]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 0, filler random]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 0, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 0, filler random]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 0, filler 0]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 4, filler 128]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 0, filler 0]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 4, filler 128]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 0, filler 128]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 0, filler random]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 4, filler 0]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 0, filler 128]
expected: FAIL
[encodeInto() with A<> and destination length 4, offset 0, filler 0]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 0, filler 0]
expected: FAIL
[encodeInto() with <20>A<EFBFBD>A¥Hi and destination length 10, offset 4, filler random]
expected: FAIL
[encodeInto() with ¥¥ and destination length 4, offset 0, filler 0]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 0, filler 128]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() with 𝌆A and destination length 3, offset 4, filler random]
expected: FAIL
[encodeInto() with 𝌆 and destination length 4, offset 4, filler 128]
expected: FAIL

View file

@ -73,6 +73,15 @@
[TextDecoderStream interface: attribute writable]
expected: FAIL
[TextEncoder interface: calling encodeInto(USVString, Uint8Array) on new TextEncoder() with too few arguments must throw TypeError]
expected: FAIL
[TextEncoder interface: new TextEncoder() must inherit property "encodeInto(USVString, Uint8Array)" with the proper type]
expected: FAIL
[TextEncoder interface: operation encodeInto(USVString, Uint8Array)]
expected: FAIL
[idlharness.any.worker.html]
[Untitled]
@ -141,6 +150,15 @@
[TextDecoderStream interface: attribute writable]
expected: FAIL
[TextEncoder interface: calling encodeInto(USVString, Uint8Array) on new TextEncoder() with too few arguments must throw TypeError]
expected: FAIL
[TextEncoder interface: new TextEncoder() must inherit property "encodeInto(USVString, Uint8Array)" with the proper type]
expected: FAIL
[TextEncoder interface: operation encodeInto(USVString, Uint8Array)]
expected: FAIL
[idlharness.any.serviceworker.html]
[idlharness]

View file

@ -32,7 +32,7 @@
[single-byte-decoder.html?XMLHttpRequest]
expected: TIMEOUT
expected: CRASH
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
expected: FAIL

View file

@ -2,15 +2,59 @@
[decode-bad-chunks]
expected: FAIL
[chunk of type undefined should error the stream]
expected: FAIL
[chunk of type array should error the stream]
expected: FAIL
[chunk of type null should error the stream]
expected: FAIL
[chunk of type object, not BufferSource should error the stream]
expected: FAIL
[chunk of type numeric should error the stream]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream]
expected: FAIL
[chunk of type shared Uint8Array should error the stream]
expected: FAIL
[decode-bad-chunks.any.worker.html]
[decode-bad-chunks]
expected: FAIL
[chunk of type undefined should error the stream]
expected: FAIL
[chunk of type array should error the stream]
expected: FAIL
[chunk of type null should error the stream]
expected: FAIL
[chunk of type object, not BufferSource should error the stream]
expected: FAIL
[chunk of type numeric should error the stream]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream]
expected: FAIL
[chunk of type shared Uint8Array should error the stream]
expected: FAIL
[decode-bad-chunks.any.serviceworker.html]
[decode-bad-chunks]
expected: FAIL
[decode-bad-chunks.any.sharedworker.html]
[decode-bad-chunks]
expected: FAIL

View file

@ -2,6 +2,7 @@
[decode-utf8]
expected: FAIL
[decode-utf8.any.sharedworker.html]
[decode-utf8]
expected: FAIL
@ -20,6 +21,12 @@
[an initial empty chunk should be ignored]
expected: FAIL
[decoding a transferred Uint8Array chunk should give no output]
expected: FAIL
[decoding a transferred ArrayBuffer chunk should give no output]
expected: FAIL
[decode-utf8.any.worker.html]
[decoding one UTF-8 chunk should give one output string]
@ -34,3 +41,9 @@
[an initial empty chunk should be ignored]
expected: FAIL
[decoding a transferred Uint8Array chunk should give no output]
expected: FAIL
[decoding a transferred ArrayBuffer chunk should give no output]
expected: FAIL

View file

@ -1,4 +0,0 @@
[traverse_the_history_3.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,4 +1,4 @@
[traverse_the_history_2.html]
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -5,7 +5,7 @@
expected: TIMEOUT
[picture: source (max-width:500px) valid image, img valid image, resize to wide]
expected: TIMEOUT
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT
@ -13,3 +13,12 @@
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: FAIL
[picture: source (max-width:500px) broken image, img valid image, resize to narrow]
expected: FAIL
[img (srcset 1 cand) valid image, resize to narrow]
expected: FAIL
[picture: same URL in source (max-width:500px) and img, resize to narrow]
expected: FAIL

View file

@ -1,10 +0,0 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -0,0 +1,7 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -25,6 +25,12 @@
[PerformanceObserver interface: attribute supportedEntryTypes]
expected: FAIL
[PerformanceMark interface: attribute detail]
expected: FAIL
[PerformanceMark interface: mark must inherit property "detail" with the proper type]
expected: FAIL
[idlharness.any.html]
[Untitled]
@ -48,6 +54,12 @@
[PerformanceObserver interface: attribute supportedEntryTypes]
expected: FAIL
[PerformanceMark interface: attribute detail]
expected: FAIL
[PerformanceMark interface: mark must inherit property "detail" with the proper type]
expected: FAIL
[idlharness.https.any.serviceworker.html]
type: testharness

View file

@ -0,0 +1,4 @@
[resource_connection_reuse.https.html]
[There should be 2 PerformanceEntries]
expected: FAIL

View file

@ -1,4 +0,0 @@
[paint_timing.html]
[Performance entries observer]
expected: FAIL

View file

@ -0,0 +1,56 @@
<!DOCTYPE html>
<title>Test that AnimationWorklet inside frames with different origin causes new global scopes</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
<style>
.redbox {
width: 100px;
height: 100px;
background-color: #ff0000;
}
</style>
<div id="target" class="redbox"></div>
<script id="main_worklet" type="text/worklet">
registerAnimator("duplicate_animator", class {
animate(currentTime, effect) {
effect.localTime = 500;
}
});
</script>
<script>
async_test(t => {
// Wait for iframe to load and start its animations.
window.onmessage = function(msg) {
window.requestAnimationFrame( _ => {
run_test(msg.data);
});
};
// Create and load the iframe to avoid racy cases.
var iframe = document.createElement('iframe');
iframe.src = 'resources/animator-iframe.html';
document.body.appendChild(iframe);
function run_test(data) {
runInAnimationWorklet(
document.getElementById('main_worklet').textContent
).then(_ => {
// Create an animation for duplicate animator.
const target = document.getElementById('target');
const animation = new WorkletAnimation('duplicate_animator', new KeyframeEffect(target, [{ opacity: 0 }], { duration: 1000 }));
animation.play();
assert_equals(data, '0.4');
waitTwoAnimationFrames(t.step_func_done(() => {
assert_equals(getComputedStyle(target).opacity, '0.5');
}));
});
}
}, 'Both main frame and iframe should update the opacity of their target');
</script>

View file

@ -0,0 +1,33 @@
'use strict';
function registerPassthroughAnimator() {
return runInAnimationWorklet(`
registerAnimator('passthrough', class {
animate(currentTime, effect) { effect.localTime = currentTime; }
});
`);
}
function runInAnimationWorklet(code) {
return CSS.animationWorklet.addModule(
URL.createObjectURL(new Blob([code], {type: 'text/javascript'}))
);
}
function waitForAnimationFrames(count, callback) {
function rafCallback() {
if (count <= 0) {
callback();
} else {
count -= 1;
window.requestAnimationFrame(rafCallback);
}
}
rafCallback();
};
// Wait for two main thread frames to guarantee that compositor has produced
// at least one frame. Note that this is a Chrome-only concept.
function waitTwoAnimationFrames(callback) {
waitForAnimationFrames(2, callback);
};

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<style>
.greenbox {
width: 100px;
height: 100px;
background-color: #00ff00;
}
</style>
<script src="../common.js"></script>
<script id="iframe_worklet" type="text/worklet">
registerAnimator("iframe_animator", class {
animate(currentTime, effect) {
effect.localTime = 600;
}
});
registerAnimator("duplicate_animator", class {
animate(currentTime, effect) {
effect.localTime = 800;
}
});
</script>
<div id="iframe_target" class="greenbox"></div>
<script>
runInAnimationWorklet(
document.getElementById('iframe_worklet').textContent
).then(_ => {
const target = document.getElementById('iframe_target');
// Only create an animation for iframe_animator.
const effect = new KeyframeEffect(target, [{ opacity: 0 }], { duration: 1000 });
const animation = new WorkletAnimation('iframe_animator', effect);
animation.play();
waitTwoAnimationFrames( _ => {
window.parent.postMessage(getComputedStyle(target).opacity, '*');
});
});
</script>

View file

@ -0,0 +1,175 @@
<!DOCTYPE html>
<title>Tests that ScrollTimeline works properly with writing mode and directionality</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
<script id="worklet_code" type="text/worklet">
registerAnimator("test_animator", class {
animate(currentTime, effect) {
effect.localTime = currentTime;
}
});
</script>
<script>
// Creates a DOM structure like:
// - container
// - box {100x100}
// - scroller {100x100, writing-mode, direction}
// - contents
function createTestDOM(x_scroll_axis, writing_mode, direction) {
const elements = {};
elements.container = document.createElement('div');
elements.box = document.createElement('div');
elements.box.style.height = '100px';
elements.box.style.width = '100px';
elements.scroller = document.createElement('div');
elements.scroller.style.height = '100px';
elements.scroller.style.width = '100px';
if (x_scroll_axis)
elements.scroller.style.overflowX = 'scroll';
else
elements.scroller.style.overflowY = 'scroll';
elements.scroller.style.direction = direction;
elements.scroller.style.writingMode = writing_mode;
// Callers don't need access to this.
const contents = document.createElement('div');
contents.style.height = x_scroll_axis ? '100%' : '1000px';
contents.style.width = x_scroll_axis ? '1000px' : '100%';
elements.scroller.appendChild(contents);
elements.container.appendChild(elements.box);
elements.container.appendChild(elements.scroller);
document.body.appendChild(elements.container);
return elements;
}
function createAndPlayTestAnimation(elements, timeline_orientation) {
const effect = new KeyframeEffect(
elements.box,
[{transform: 'translateY(0)'}, {transform: 'translateY(200px)'}], {
duration: 1000,
});
const timeline = new ScrollTimeline({
scrollSource: elements.scroller,
timeRange: 1000,
orientation: timeline_orientation
});
const animation = new WorkletAnimation('test_animator', effect, timeline);
animation.play();
}
setup(setupAndRegisterTests, {explicit_done: true});
function setupAndRegisterTests() {
const worklet_code = document.getElementById('worklet_code').textContent;
runInAnimationWorklet(worklet_code).then(() => {
// Note that block horizontal-tb is tested implicitly in the basic
// ScrollTimeline tests (as it is the default).
async_test(
block_vertical_lr,
'A block ScrollTimeline should produce the correct current time for vertical-lr');
async_test(
block_vertical_rl,
'A block ScrollTimeline should produce the correct current time for vertical-rl');
// Again, inline for horizontal-tb and direction: ltr is the default
// inline mode and so is tested elsewhere.
async_test(
inline_horizontal_tb_rtl,
'An inline ScrollTimeline should produce the correct current time for horizontal-tb and direction: rtl');
async_test(
inline_vertical_writing_mode_ltr,
'An inline ScrollTimeline should produce the correct current time for vertical writing mode');
async_test(
inline_vertical_writing_mode_rtl,
'An inline ScrollTimeline should produce the correct current time for vertical writing mode and direction: rtl');
done();
});
}
function block_vertical_lr(t) {
const elements = createTestDOM(true, 'vertical-lr', 'ltr');
createAndPlayTestAnimation(elements, 'block');
// Move the scroller to the 25% point.
const maxScroll =
elements.scroller.scrollWidth - elements.scroller.clientWidth;
elements.scroller.scrollLeft = 0.25 * maxScroll;
waitForAnimationFrames(3, t.step_func_done(() => {
assert_equals(
getComputedStyle(elements.box).transform, 'matrix(1, 0, 0, 1, 0, 50)');
}));
}
function block_vertical_rl(t) {
const elements = createTestDOM(true, 'vertical-rl', 'ltr');
createAndPlayTestAnimation(elements, 'block');
// Move the scroller to the 75% point. Since it is vertical-rl, this is
// equivalent to the 25% point for the ScrollTimeline.
const maxScroll =
elements.scroller.scrollWidth - elements.scroller.clientWidth;
elements.scroller.scrollLeft = 0.75 * maxScroll;
waitForAnimationFrames(3, t.step_func_done(() => {
assert_equals(
getComputedStyle(elements.box).transform, 'matrix(1, 0, 0, 1, 0, 50)');
}));
}
function inline_horizontal_tb_rtl(t) {
const elements = createTestDOM(true, 'horizontal-tb', 'rtl');
createAndPlayTestAnimation(elements, 'inline');
// Move the scroller to the 75% point. Since it is direction: rtl, this is
// equivalent to the 25% point for the ScrollTimeline.
const maxScroll =
elements.scroller.scrollWidth - elements.scroller.clientWidth;
elements.scroller.scrollLeft = 0.75 * maxScroll;
waitForAnimationFrames(3, t.step_func_done(() => {
assert_equals(
getComputedStyle(elements.box).transform, 'matrix(1, 0, 0, 1, 0, 50)');
}));
}
function inline_vertical_writing_mode_ltr(t) {
const elements = createTestDOM(false, 'vertical-lr', 'ltr');
createAndPlayTestAnimation(elements, 'inline');
// Move the scroller to the 25% point.
const maxScroll =
elements.scroller.scrollHeight - elements.scroller.clientHeight;
elements.scroller.scrollTop = 0.25 * maxScroll;
waitForAnimationFrames(3, t.step_func_done(() => {
assert_equals(
getComputedStyle(elements.box).transform, 'matrix(1, 0, 0, 1, 0, 50)');
}));
}
function inline_vertical_writing_mode_rtl(t) {
const elements = createTestDOM(false, 'vertical-lr', 'rtl');
createAndPlayTestAnimation(elements, 'inline');
// Move the scroller to the 75% point. Since this is a vertical writing mode
// and direction: rtl, this is 25% of the ScrollTimeline currentTime.
const maxScroll =
elements.scroller.scrollHeight - elements.scroller.clientHeight;
elements.scroller.scrollTop = 0.75 * maxScroll;
waitForAnimationFrames(3, t.step_func_done(() => {
assert_equals(
getComputedStyle(elements.box).transform, 'matrix(1, 0, 0, 1, 0, 50)');
}));
}
</script>

View file

@ -0,0 +1,107 @@
<!DOCTYPE html>
<title>Test that worklet animation works with different fill modes</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
<style>
.target {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<script>
function CreateTest(target, effect, verify, test_name) {
async_test(t => {
runInAnimationWorklet(
document.getElementById('simple_animate').textContent
).then(_ => {
const animation = new WorkletAnimation('test_animator', effect);
animation.play();
waitTwoAnimationFrames(() => {
// waitTwoAnimationFrames guarantees a compositor frame that could update
// the opacity value in the worklet. Meanwhile, getComputedStyle needs an
// extra frame to fetch the updated value.
window.requestAnimationFrame(t.step_func_done(() => {
verify();
animation.cancel();
}));
});
});
}, test_name);
}
</script>
<script id="simple_animate" type="text/worklet">
registerAnimator("test_animator", class {
animate(currentTime, effect) {
effect.localTime = 2000;
}
});
</script>
<div id="target1" class='target'></div>
<div id="target2" class='target'></div>
<div id="target3" class='target'></div>
<div id="target4" class='target'></div>
<div id="target5" class='target'></div>
<div id="target6" class='target'></div>
<script>
const effect_with_fill_forwards = new KeyframeEffect(
target1,
{ opacity: [0.5, 0] },
{ duration: 1000, fill: 'forwards' });
CreateTest(target1,
effect_with_fill_forwards,
function() { assert_equals(getComputedStyle(target1).opacity, '0'); },
"Effect with fill mode forwards in after phase produces output that is equivalent to effect's end value.");
const effect_without_fill_forwards = new KeyframeEffect(
target2,
{ opacity: [0.5, 0] },
{ duration: 1000 });
CreateTest(target2,
effect_without_fill_forwards,
function() { assert_equals(getComputedStyle(target2).opacity, '1'); },
'Effect without fill mode forwards in after phase (local time beyond end) should deactivate the animation.');
const effect_without_fill_forwards_at_end = new KeyframeEffect(
target3,
{ opacity: [0.5, 0] },
{ duration: 2000 });
CreateTest(target3,
effect_without_fill_forwards_at_end,
function() { assert_equals(getComputedStyle(target3).opacity, '1'); },
'Effect without fill mode in after phase (local time at end) should deactivate the animation.');
const effect_with_fill_backwards = new KeyframeEffect(
target4,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2001, fill: 'backwards' });
CreateTest(target4,
effect_with_fill_backwards,
function() { assert_equals(getComputedStyle(target4).opacity, '0.5'); },
"Effect with fill mode backwards in before phase produces output that is equivalent to effect's start value.");
const effect_without_fill_backwards = new KeyframeEffect(
target5,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2001 });
CreateTest(target5,
effect_without_fill_backwards,
function() { assert_equals(getComputedStyle(target5).opacity, '1'); },
'Effect without fill mode backwards in before phase (local time before start) should deactivate the animation.');
const effect_without_fill_backwards_at_start = new KeyframeEffect(
target6,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2000 });
CreateTest(target6,
effect_without_fill_backwards_at_start,
function() { assert_equals(getComputedStyle(target6).opacity, '0.5'); },
'Effect with local time at start point is in active phase.');
</script>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<title>Test that worklet animation with invalid effect cannot be played</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
<style>
#target {
width: 100px;
height: 100px;
}
</style>
<div id="target"></div>
<script>
'use strict';
test(function() {
registerPassthroughAnimator();
let playFunc = function() {
let effect = new KeyframeEffect(
document.getElementById('target'),
[
// No keyframe.
],
{ duration: 1000 }
);
let animation = new WorkletAnimation('passthrough', effect);
animation.play();
}
assert_throws('InvalidStateError', playFunc);
}, 'Trying to play invalid worklet animation should throw an exception.');
</script>

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="form-action 'none'; script-src 'self' 'nonce-noncynonce'; connect-src 'self';">
</head>
<body>
<form action='/content-security-policy/support/postmessage-pass-to-opener.html'
id='form_id'
target="_blank">
<input type="submit" />
</form>
<p>
Test that "form-action 'none'" doesn't create a violation report if the event was prevented.
</p>
</body>
<script nonce='noncynonce'>
async_test(t => {
document.addEventListener('securitypolicyviolation', function(e) {
assert_unreached('Form submission was blocked.');
});
window.addEventListener('message', function(event) {
assert_unreached('Form submission was blocked.');
})
window.addEventListener("load", function() {
let form = document.getElementById("form_id");
form.addEventListener("submit", e => {
e.preventDefault();
setTimeout(() => {
t.done();
}, 0);
});
// clicking the input is used here as form.submit() will submit a form without an event and should also be blocked.
form.querySelector("input").click();
});
}, "The form submission should not be blocked by when javascript prevents the load.");
</script>
</html>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -12,6 +12,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

View file

@ -8,6 +8,7 @@
{
color: green;
font-size: 36px;
line-height: 2;
}
</style>
</head>

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