image/test/mochitest/green-background.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/image/test/mochitest/green-background.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +<title>Background color wrapper for clear image tests</title>
     1.8 +<style>
     1.9 +img {
    1.10 +  background-color: rgb(0, 255, 0);
    1.11 +}
    1.12 +</style>
    1.13 +</head>
    1.14 +<body>
    1.15 +<img id="image1">
    1.16 +<script>
    1.17 +// Loads an externally specified image and displays it
    1.18 +// with a green background. Intended for use with tests
    1.19 +// involving clear images.
    1.20 +
    1.21 +// Use as "green-background.html?image.png".
    1.22 +
    1.23 +// Get the image URL.
    1.24 +var imgURL = document.location.search.substr(1);
    1.25 +
    1.26 +// Load it.
    1.27 +var img = document.images[0];
    1.28 +img.src = imgURL;
    1.29 +</script>
    1.30 +</body>
    1.31 +</html>

mercurial