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
88852bec9b
commit
f8bf8d156c
@ -9,6 +9,7 @@ function runTests() {
|
|||||||
bgTestPageURL({ wait: 2002 }),
|
bgTestPageURL({ wait: 2002 }),
|
||||||
"http://www.example.com/2",
|
"http://www.example.com/2",
|
||||||
];
|
];
|
||||||
|
dontExpireThumbnailURLs(urls);
|
||||||
urls.forEach(url => {
|
urls.forEach(url => {
|
||||||
ok(!thumbnailExists(url), "Thumbnail should not exist yet: " + url);
|
ok(!thumbnailExists(url), "Thumbnail should not exist yet: " + url);
|
||||||
let isTimeoutTest = url.indexOf("wait") >= 0;
|
let isTimeoutTest = url.indexOf("wait") >= 0;
|
||||||
|
@ -3,11 +3,16 @@
|
|||||||
|
|
||||||
const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
|
const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
|
||||||
"test/background_red_redirect.sjs";
|
"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.
|
* These tests ensure that we save and provide thumbnails for redirecting sites.
|
||||||
*/
|
*/
|
||||||
function runTests() {
|
function runTests() {
|
||||||
|
dontExpireThumbnailURLs([URL, FINAL_URL]);
|
||||||
|
|
||||||
// Kick off history by loading a tab first or the test fails in single mode.
|
// Kick off history by loading a tab first or the test fails in single mode.
|
||||||
yield addTab(URL);
|
yield addTab(URL);
|
||||||
gBrowser.removeTab(gBrowser.selectedTab);
|
gBrowser.removeTab(gBrowser.selectedTab);
|
||||||
|
@ -18,6 +18,8 @@ XPCOMUtils.defineLazyGetter(this, "Sanitizer", function () {
|
|||||||
* be removed when the user sanitizes their history.
|
* be removed when the user sanitizes their history.
|
||||||
*/
|
*/
|
||||||
function runTests() {
|
function runTests() {
|
||||||
|
dontExpireThumbnailURLs([URL, URL_COPY]);
|
||||||
|
|
||||||
yield clearHistory();
|
yield clearHistory();
|
||||||
yield addVisitsAndRepopulateNewTabLinks(URL, next);
|
yield addVisitsAndRepopulateNewTabLinks(URL, next);
|
||||||
yield createThumbnail();
|
yield createThumbnail();
|
||||||
|
@ -121,6 +121,9 @@ function whenLoaded(aElement, aCallback = next) {
|
|||||||
*/
|
*/
|
||||||
function captureAndCheckColor(aRed, aGreen, aBlue, aMessage) {
|
function captureAndCheckColor(aRed, aGreen, aBlue, aMessage) {
|
||||||
let browser = gBrowser.selectedBrowser;
|
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.
|
// Capture the screenshot.
|
||||||
PageThumbs.captureAndStore(browser, function () {
|
PageThumbs.captureAndStore(browser, function () {
|
||||||
@ -325,6 +328,9 @@ function bgCaptureIfMissing(aURL, aOptions) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function bgCaptureWithMethod(aMethodName, 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)
|
if (!aOptions.onDone)
|
||||||
aOptions.onDone = next;
|
aOptions.onDone = next;
|
||||||
BackgroundPageThumbs[aMethodName](aURL, aOptions);
|
BackgroundPageThumbs[aMethodName](aURL, aOptions);
|
||||||
|
Loading…
Reference in New Issue
Block a user