[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 4 selection tests on text-shadow with 3 references #18218

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added 4 selection tests on text-shadow with 3 references
  • Loading branch information
TalbotG committed Jul 31, 2019
commit cd8f6a9767bf3589aa51190c1e7243126793a562
20 changes: 20 additions & 0 deletions css/css-pseudo/selection-text-shadow-011-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!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: green;
font-size: 300%;
}

</style>

<p>Test passes if each glyph of "Text sample" is green and not red.

<div>Text sample</div>
44 changes: 44 additions & 0 deletions css/css-pseudo/selection-text-shadow-011.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>

<meta charset="UTF-8">

<title>CSS Pseudo-Elements Test: selection and text-shadow</title>

<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-styling">
<link rel="match" href="selection-text-shadow-011-ref.html">

<meta content="" name="flags">

<style>
div
{
color: blue;
font-size: 300%;
text-shadow: red 7em 0em 0em; /* horizontal offset to the right-hand side */
}

div::selection
{
color: green;
text-shadow: none;
}
</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 >

<p>Test passes if each glyph of "Text sample" is green and not red.

<div id="test">Text sample</div>
44 changes: 44 additions & 0 deletions css/css-pseudo/selection-text-shadow-012.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>

<meta charset="UTF-8">

<title>CSS Pseudo-Elements Test: selection and text-shadow</title>

<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-styling">
<link rel="match" href="selection-text-shadow-011-ref.html">

<meta content="" name="flags">

<style>
div
{
color: blue;
font-size: 300%;
text-shadow: red 0em 1.2em 0em; /* vertical offset to the bottom side */
}

div::selection
{
color: green;
text-shadow: none;
}
</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 >

<p>Test passes if each glyph of "Text sample" is green and not red.

<div id="test">Text sample</div>
26 changes: 26 additions & 0 deletions css/css-pseudo/selection-text-shadow-013-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!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: green;
font-size: 300%;
left: 7.16667em;
position: absolute;
/*
We want to avoid generating unneedlessly an horizontal scrollbar,
therefore the recourse of position: absolute
*/
}

</style>

<p>Test passes if each glyph of "Text sample" is green and not red.

<div>Text sample</div>
51 changes: 51 additions & 0 deletions css/css-pseudo/selection-text-shadow-013.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>

<meta charset="UTF-8">

<title>CSS Pseudo-Elements Test: selection and text-shadow</title>

<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-styling">
<link rel="match" href="selection-text-shadow-013-ref.html">

<meta content="" name="flags">

<style>
div
{
color: blue;
font-size: 300%;
left: 7.16667em;
/* <body>'s margin-left 8px represents 0.16667em */
position: absolute;
/*
We want to avoid generating unneedlessly an horizontal scrollbar,
therefore the recourse of position: absolute
*/
text-shadow: red -7em 0em 0em; /* horizontal offset to the left-hand side */
}

div::selection
{
color: green;
text-shadow: none;
}
</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 >

<p>Test passes if each glyph of "Text sample" is green and not red.

<div id="test">Text sample</div>
22 changes: 22 additions & 0 deletions css/css-pseudo/selection-text-shadow-014-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!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: green;
font-size: 300%;
position: relative;
top: 1.2em;
}

</style>

<p>Test passes if each glyph of "Text sample" is green and not red.

<div>Text sample</div>
50 changes: 50 additions & 0 deletions css/css-pseudo/selection-text-shadow-014.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>

<meta charset="UTF-8">

<title>CSS Pseudo-Elements Test: selection and text-shadow</title>

<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-styling">
<link rel="match" href="selection-text-shadow-014-ref.html">

<meta content="" name="flags">

<style>
div
{
color: blue;
font-size: 300%;
position: relative;
top: 1.2em;
text-shadow: red 0em -1.2em 0em; /* vertical offset to the top side */
/*
We want the text selection not to "hit" the "p"'s descender of the
text-shadow; therefore an addition of 0.2em.
*/
}

div::selection
{
color: green;
text-shadow: none;
}
</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 >

<p>Test passes if each glyph of "Text sample" is green and not red.

<div id="test">Text sample</div>