Files
sousa-gecko/testing/web-platform/tests/css/css-pseudo/active-selection-051-ref.html
T
Emilio Cobos Álvarez 0e8d653819 Bug 2044815 - Fix active-selection-051-ref.html work on platforms where the default selection color is currentColor. r=jjaschke
The tests that use this ref use color: transparent, and thus if the
highlight color is currentColor the test will incorrectly cause a
mismatch.

Fix it by setting color: transparent in the ref as well.

Differential Revision: https://phabricator.services.mozilla.com/D304592
2026-06-04 07:37:42 +00:00

34 lines
812 B
HTML

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<style>
div
{
color: transparent;
font-size: 300%;
}
</style>
<script>
function startTest()
{
var targetRange = document.createRange();
/* We first create an empty range */
targetRange.selectNodeContents(document.getElementById("test"));
/* Then we set the range boundaries to the children of div#test */
window.getSelection().addRange(targetRange);
/* Finally, we now select such range of content */
}
</script>
<body onload="startTest();">
<p>Test passes if "Selected Text" appears selected using the OS selection colors.
<div id="test">Selected Text</div>