| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <style type="text/css" media="screen"> |
| 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: -webkit-linear-gradient(left, red, green 33.33%, blue); |
| background-image: -moz-linear-gradient(left, red, green 33.33%, blue); |
| } |
| |
| .linear2 { |
| background-image: -webkit-linear-gradient(left, red, green 100px, blue); |
| background-image: -moz-linear-gradient(left, red, green 100px, blue); |
| } |
| |
| .linear3 { |
| font-size: 12pt; |
| background-image: -webkit-linear-gradient(left, red, green 3em, blue); |
| background-image: -moz-linear-gradient(left, red, green 3em, blue); |
| } |
| |
| .linear4 { |
| font-size: 24pt; |
| background-image: -webkit-linear-gradient(left, red, green 3em, blue); |
| background-image: -moz-linear-gradient(left, red, green 3em, blue); |
| } |
| |
| .linear5 { |
| font-size: 12pt; |
| background-image: -webkit-linear-gradient(left, red, green 6em, yellow 50%, blue); |
| background-image: -moz-linear-gradient(left, red, green 6em, yellow 50%, blue); |
| } |
| |
| .linear6 { |
| font-size: 24pt; |
| background-image: -webkit-linear-gradient(left, red, green 6em, yellow 50%, blue); |
| background-image: -moz-linear-gradient(left, red, green 6em, yellow 50%, blue); |
| } |
| |
| .linear7 { |
| background-image: -webkit-linear-gradient(left, red, green 100px, yellow 50%, blue); |
| background-image: -moz-linear-gradient(left, red, green 100px, yellow 50%, blue); |
| } |
| |
| .linear8 { |
| background-image: -webkit-linear-gradient(left, red, green 100px, yellow 50%, blue); |
| background-image: -moz-linear-gradient(left, 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> |
| |
| <h2>These should look the same</h2> |
| <div class="container"> |
| <div class="linear1 box"></div> |
| <div class="linear2 box"></div> |
| </div> |
| |
| <h2>Green stop should coincide with the end of the black line</h2> |
| <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> |
| |
| <h2>Should see a sharp green/yellow transition on the right, at the end of the line</h2> |
| <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> |
| |
| <h2>Should see a sharp green/yellow transition in the right box</h2> |
| <div class="container"> |
| <div class="linear7 box"></div> |
| <div class="linear8 box" style="width: 200px;"></div> |
| </div> |
| |
| </body> |
| </html> |