mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 916497 - PageThumbs no longer expires thumnails being tested to fix intermittent oranges. r=adw
This commit is contained in:
parent
84e24406dc
commit
526a80a249
@ -9,6 +9,7 @@ function runTests() {
|
||||
bgTestPageURL({ wait: 2002 }),
|
||||
"http://www.example.com/2",
|
||||
];
|
||||
dontExpireThumbnailURLs(urls);
|
||||
urls.forEach(url => {
|
||||
ok(!thumbnailExists(url), "Thumbnail should not exist yet: " + url);
|
||||
let isTimeoutTest = url.indexOf("wait") >= 0;
|
||||
|
@ -3,11 +3,16 @@
|
||||
|
||||
const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
|
||||
"test/background_red_redirect.sjs";
|
||||
// loading URL will redirect us to...
|
||||
const FINAL_URL = "http://mochi.test:8888/browser/toolkit/components/" +
|
||||
"thumbnails/test/background_red.html";
|
||||
|
||||
/**
|
||||
* These tests ensure that we save and provide thumbnails for redirecting sites.
|
||||
*/
|
||||
function runTests() {
|
||||
dontExpireThumbnailURLs([URL, FINAL_URL]);
|
||||
|
||||
// Kick off history by loading a tab first or the test fails in single mode.
|
||||
yield addTab(URL);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
|
@ -18,6 +18,8 @@ XPCOMUtils.defineLazyGetter(this, "Sanitizer", function () {
|
||||
* be removed when the user sanitizes their history.
|
||||
*/
|
||||
function runTests() {
|
||||
dontExpireThumbnailURLs([URL, URL_COPY]);
|
||||
|
||||
yield clearHistory();
|
||||
yield addVisitsAndRepopulateNewTabLinks(URL, next);
|
||||
yield createThumbnail();
|
||||
|
@ -121,6 +121,9 @@ function whenLoaded(aElement, aCallback = next) {
|
||||
*/
|
||||
function captureAndCheckColor(aRed, aGreen, aBlue, aMessage) {
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
// We'll get oranges if the expiration filter removes the file during the
|
||||
// test.
|
||||
dontExpireThumbnailURLs([browser.currentURI.spec]);
|
||||
|
||||
// Capture the screenshot.
|
||||
PageThumbs.captureAndStore(browser, function () {
|
||||
@ -325,6 +328,9 @@ function bgCaptureIfMissing(aURL, aOptions) {
|
||||
}
|
||||
|
||||
function bgCaptureWithMethod(aMethodName, aURL, aOptions = {}) {
|
||||
// We'll get oranges if the expiration filter removes the file during the
|
||||
// test.
|
||||
dontExpireThumbnailURLs([aURL]);
|
||||
if (!aOptions.onDone)
|
||||
aOptions.onDone = next;
|
||||
BackgroundPageThumbs[aMethodName](aURL, aOptions);
|
||||
|
Loading…
Reference in New Issue
Block a user