Commit ed358fdd authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

[css-filters] Migrate feimage-reference-foreign-object-crash.html to WPT

This test moves feimage-reference-foreign-object-crash.html to wpt/.

It also migrates the test into a regular crash test that waits long
enough to check that the crash does not really happen using
class="test-wait" (hence dropping the use of testharness.js
and testharnessreport.js).

Differently from [1], circular reference isn't used.

[1] https://crrev.com/c/2144511

R=fs@opera.com, smcgruer@chromium.org

Bug: 1063749
Change-Id: I936649812fb546265f9e278a8b42ed60a1fe5363
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144512
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Auto-Submit: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#757953}
parent b34f41ee
<!DOCTYPE html>
<html class="test-wait">
<title>CSS Filters: filter reference a SVG foreign object.</title>
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#FilterProperty">
<link rel="bookmark" href="https://crrev.com/c/1080147">
<meta name="assert" content="Test ensures that updating a filter which references a SVG foreign object through feImage does not crash."/>
<script src="/common/rendering-utils.js"></script>
<script>
waitForAtLeastOneFrame().then(function() {
feImage.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', '#svg');
document.documentElement.classList.remove('test-wait');
});
</script>
<svg>
<filter id="filter">
<feImage id="feImage"></feImage>
</filter>
</svg>
<div style="filter: url(#filter)"></div>
<svg id="svg">
<foreignObject id="foreignObject">FO</foreignObject>
</svg>
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
async_test(t => {
runAfterLayoutAndPaint(t.step_func_done(() => {
feImage.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', '#svg');
}));
});
</script>
<svg>
<filter id="filter">
<feImage id="feImage"></feImage>
</filter>
</svg>
<div style="filter: url(#filter)"></div>
<svg id="svg">
<foreignObject id="foreignObject">FO</foreignObject>
</svg>
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