Commit f27cea5d authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

[css-filters] Migrate adopt-inline-style.html test to WPT

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

Bug: 1063749
Change-Id: I6a3042388d83f90492aa2caba8ba1e2f119990e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132146Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#755370}
parent d716c4f4
<!DOCTYPE html>
<iframe src="resources/div-with-filter.html"></iframe>
<div style="width: 100px; height: 100px; background-color: red; filter: url(resources/hueRotate.svg#MyFilter)"></div>
<script>
onload = () => {
var iframe = document.querySelector('iframe');
var div_from_iframe = iframe.contentDocument.querySelector('div');
iframe.remove();
document.body.appendChild(div_from_iframe);
}
</script>
<!DOCTYPE html> <!DOCTYPE html>
<div style="width: 100px; height: 100px; background-color: red; filter: url(resources/hueRotate.svg#MyFilter)"></div> <div style="width: 100px; height: 100px; background-color: red; filter: url(../support/hueRotate.svg#MyFilter)"></div>
<div style="width: 100px; height: 100px; background-color: red; filter: url(resources/hueRotate.svg#MyFilter)"></div> <div style="width: 100px; height: 100px; background-color: red; filter: url(../support/hueRotate.svg#MyFilter)"></div>
<!DOCTYPE html> <!DOCTYPE html>
<div style="width: 100px; height: 100px; background-color: red; filter: url(resources/hueRotate.svg#MyFilter)"></div> <div style="width: 100px; height: 100px; background-color: red; filter: url(support/hueRotate.svg#MyFilter)"></div>
<svg width="0" height="0" xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="MyFilter">
<feColorMatrix type="hueRotate" values="90"/>
</filter>
</defs>
</svg>
<!DOCTYPE html>
<html>
<title>CSS Filter Effects: SVG-based filters and relative URLs</title>
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#FilterProperty">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#relative-urls">
<link rel="help" href="https://crbug.com/405315"/>
<link rel="match" href="reference/svg-relative-urls-0001-ref.html">
<meta name="assert" content="This test checks that relative SVG filter references in inline styles are correct after an element moves documents.">
<body onload="runTest()">
<iframe src="support/div-with-filter.html"></iframe>
<div style="width: 100px; height: 100px; background-color: red; filter: url(support/hueRotate.svg#MyFilter)"></div>
<script>
function runTest() {
var iframe = document.querySelector('iframe');
var div_from_iframe = iframe.contentDocument.querySelector('div');
iframe.remove();
document.body.appendChild(div_from_iframe);
}
</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