michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" + michael@0: "test/background_red_scroll.html"; michael@0: michael@0: // Test for black borders caused by scrollbars. michael@0: function runTests() { michael@0: // Create a tab with a page with a red background and scrollbars. michael@0: yield addTab(URL); michael@0: yield captureAndCheckColor(255, 0, 0, "we have a red thumbnail"); michael@0: michael@0: // Check the thumbnail color of the bottom right pixel. michael@0: yield whenFileExists(URL); michael@0: yield retrieveImageDataForURL(URL, function (aData) { michael@0: let [r, g, b] = [].slice.call(aData, -4); michael@0: is("" + [r,g,b], "255,0,0", "we have a red thumbnail"); michael@0: next(); michael@0: }); michael@0: }