toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
     1.8 +            "test/background_red_scroll.html";
     1.9 +
    1.10 +// Test for black borders caused by scrollbars.
    1.11 +function runTests() {
    1.12 +  // Create a tab with a page with a red background and scrollbars.
    1.13 +  yield addTab(URL);
    1.14 +  yield captureAndCheckColor(255, 0, 0, "we have a red thumbnail");
    1.15 +
    1.16 +  // Check the thumbnail color of the bottom right pixel.
    1.17 +  yield whenFileExists(URL);
    1.18 +  yield retrieveImageDataForURL(URL, function (aData) {
    1.19 +    let [r, g, b] = [].slice.call(aData, -4);
    1.20 +    is("" + [r,g,b], "255,0,0", "we have a red thumbnail");
    1.21 +    next();
    1.22 +  });
    1.23 +}

mercurial