Commit 162244b5 authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

[css-filters] Move multiple-references-id-mutate-crash-2.html to WPT

Migrate this test out of third_party/blink/web_tests/css3/filters
and into a WPT-specific directory for crashtests, adding links to
the relevant specs and a test assertion describing its purpose.

This CL also migrates usage of runAfterLayoutAndPaint(), which is
based on Chromium's testRunner, to WPT's waitForAtLeastOneFrame()
and uses it along with class="test-wait" to make sure we provide
the test with enough time to check for potential crashes.

Bug: 1063749
Change-Id: I2b0c1ee2f7b63c79b02ef320c969d474df37e395
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144157
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#757964}
parent c7af7f28
<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<object id=obj>PASS if no crash</object>
<div id=move>
<span id=target></span>
</div>
<div id=bdo></div>
<style>
#move, #obj, #bdo { filter: url(#target); }
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
runAfterLayoutAndPaint(function() {
bdo.style.zoom = 2;
obj.appendChild(move);
}, true);
</script>
<!DOCTYPE html>
<html class="test-wait">
<title>CSS Filters: multiple references to filter in mutating subtree</title>
<link rel="author" title="Fredrik Söderquist" href="mailto:fs@opera.com">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#FilterProperty">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=439970">
<meta name="assert" content="Check that applying the same filter pointing to several target elements in a mutating subtree does not crash."/>
<script src="/common/rendering-utils.js"></script>
<style>
#move, #obj, #bdo {
filter: url(#target);
}
</style>
<body>
<object id="obj">PASS if no crash</object>
<div id="move">
<span id="target"></span>
</div>
<div id="bdo"></div>
<script>
waitForAtLeastOneFrame().then(function() {
bdo.style.zoom = 2;
obj.appendChild(move);
document.documentElement.classList.remove('test-wait');
});
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment