blob: 3f7e13dceb5d22268ede3f1b9ec4fe9cb3076b30 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
h2 {
font-size: 12pt;
margin: 2px;
}
.box {
display: inline-block;
height: 100px;
width: 300px;
margin: 10px;
border: 1px solid black;
background-repeat: no-repeat;
}
.indicator {
background-color: black;
height: 20px;
width: 3em;
}
.linear1 {
background-image: linear-gradient(to right, red, green 33.33%, blue);
}
.linear2 {
background-image: linear-gradient(to right, red, green 100px, blue);
}
.linear3 {
font-size: 16px;
background-image: linear-gradient(to right, red, green 3em, blue);
}
.linear4 {
font-size: 32px;
background-image: linear-gradient(to right, red, green 3em, blue);
}
.linear5 {
font-size: 16px;
background-image: linear-gradient(to right, red, green 6em, yellow 50%, blue);
}
.linear6 {
font-size: 32px;
background-image: linear-gradient(to right, red, green 6em, yellow 50%, blue);
}
.linear7 {
background-image: linear-gradient(to right, red, green 100px, yellow 50%, blue);
}
.linear8 {
background-image: linear-gradient(to right, red, green 100px, yellow 50%, blue);
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
var dumpPixels = true;
testRunner.dumpAsText(dumpPixels);
}
</script>
</head>
<body>
<!--These should look the same-->
<div class="container">
<div class="linear1 box"></div><br>
<div class="linear2 box"></div>
</div>
<!--Green stop should coincide with the end of the black line-->
<div class="container">
<div class="linear3 box"><div class="indicator" style="width: 3em;"></div></div>
<div class="linear4 box"><div class="indicator" style="width: 3em;"></div></div>
</div>
<!--Should see a sharp green/yellow transition on the right, at the end of the line-->
<div class="container">
<div class="linear5 box"><div class="indicator" style="width: 6em;"></div></div>
<div class="linear6 box"><div class="indicator" style="width: 6em;"></div></div>
</div>
<!--Should see a sharp green/yellow transition in the right box-->
<div class="container">
<div class="linear7 box"></div>
<div class="linear8 box" style="width: 200px;"></div>
</div>
</body>
</html>