mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 886054 - Intermittent test_bookmarks_json.js | Test timed out. r=mak
This commit is contained in:
parent
ed28ea600e
commit
df39948ef0
@ -330,31 +330,21 @@ function checkItem(aExpected, aNode)
|
||||
aExpected.lastModified);
|
||||
break;
|
||||
case "url":
|
||||
yield function() {
|
||||
let deferred = Promise.defer();
|
||||
PlacesUtils.livemarks.getLivemark(
|
||||
{ id: id },
|
||||
function (aStatus, aLivemark) {
|
||||
if (!Components.isSuccessCode(aStatus)) {
|
||||
do_check_eq(aNode.uri, aExpected.url);
|
||||
}
|
||||
deferred.resolve();
|
||||
}
|
||||
);
|
||||
return deferred.promise; }();
|
||||
if (!("feedUrl" in aExpected))
|
||||
do_check_eq(aNode.uri, aExpected.url)
|
||||
break;
|
||||
case "icon":
|
||||
yield function() {
|
||||
let deferred = Promise.defer();
|
||||
let (deferred = Promise.defer(), data) {
|
||||
PlacesUtils.favicons.getFaviconDataForPage(
|
||||
NetUtil.newURI(aExpected.url),
|
||||
function (aURI, aDataLen, aData, aMimeType) {
|
||||
let base64Icon = "data:image/png;base64," +
|
||||
base64EncodeString(String.fromCharCode.apply(String, aData));
|
||||
do_check_true(base64Icon == aExpected.icon);
|
||||
deferred.resolve();
|
||||
});
|
||||
return deferred.promise; }();
|
||||
deferred.resolve(aData);
|
||||
});
|
||||
data = yield deferred.promise;
|
||||
let base64Icon = "data:image/png;base64," +
|
||||
base64EncodeString(String.fromCharCode.apply(String, data));
|
||||
do_check_true(base64Icon == aExpected.icon);
|
||||
}
|
||||
break;
|
||||
case "keyword":
|
||||
break;
|
||||
@ -373,18 +363,13 @@ function checkItem(aExpected, aNode)
|
||||
do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset);
|
||||
break;
|
||||
case "feedUrl":
|
||||
yield function() {
|
||||
let deferred = Promise.defer();
|
||||
PlacesUtils.livemarks.getLivemark(
|
||||
{ id: id },
|
||||
function (aStatus, aLivemark) {
|
||||
do_check_true(Components.isSuccessCode(aStatus));
|
||||
do_check_eq(aLivemark.siteURI.spec, aExpected.url);
|
||||
do_check_eq(aLivemark.feedURI.spec, aExpected.feedUrl);
|
||||
deferred.resolve();
|
||||
}
|
||||
);
|
||||
return deferred.promise; }();
|
||||
yield PlacesUtils.livemarks.getLivemark(
|
||||
{ id: id },
|
||||
(aStatus, aLivemark) => {
|
||||
do_check_true(Components.isSuccessCode(aStatus));
|
||||
do_check_eq(aLivemark.siteURI.spec, aExpected.url);
|
||||
do_check_eq(aLivemark.feedURI.spec, aExpected.feedUrl);
|
||||
});
|
||||
break;
|
||||
case "children":
|
||||
let folder = aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
|
||||
|
@ -161,30 +161,21 @@ function checkItem(aExpected, aNode) {
|
||||
aExpected.lastModified);
|
||||
break;
|
||||
case "url":
|
||||
yield function() {
|
||||
let deferred = Promise.defer();
|
||||
PlacesUtils.livemarks.getLivemark(
|
||||
{ id: id },
|
||||
function (aStatus, aLivemark) {
|
||||
if (!Components.isSuccessCode(aStatus)) {
|
||||
do_check_eq(aNode.uri, aExpected.url);
|
||||
}
|
||||
deferred.resolve();
|
||||
});
|
||||
return deferred.promise; }();
|
||||
if (!("feedUrl" in aExpected))
|
||||
do_check_eq(aNode.uri, aExpected.url);
|
||||
break;
|
||||
case "icon":
|
||||
yield function() {
|
||||
let deferred = Promise.defer();
|
||||
let (deferred = Promise.defer(), data) {
|
||||
PlacesUtils.favicons.getFaviconDataForPage(
|
||||
NetUtil.newURI(aExpected.url),
|
||||
function (aURI, aDataLen, aData, aMimeType) {
|
||||
let base64Icon = "data:image/png;base64," +
|
||||
base64EncodeString(String.fromCharCode.apply(String, aData));
|
||||
do_check_true(base64Icon == aExpected.icon);
|
||||
deferred.resolve();
|
||||
deferred.resolve(aData);
|
||||
});
|
||||
return deferred.promise; }();
|
||||
data = yield deferred.promise;
|
||||
let base64Icon = "data:image/png;base64," +
|
||||
base64EncodeString(String.fromCharCode.apply(String, data));
|
||||
do_check_true(base64Icon == aExpected.icon);
|
||||
}
|
||||
break;
|
||||
case "keyword":
|
||||
break;
|
||||
@ -201,17 +192,13 @@ function checkItem(aExpected, aNode) {
|
||||
do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset);
|
||||
break;
|
||||
case "feedUrl":
|
||||
yield function() {
|
||||
let deferred = Promise.defer();
|
||||
PlacesUtils.livemarks.getLivemark(
|
||||
{ id: id },
|
||||
function (aStatus, aLivemark) {
|
||||
do_check_true(Components.isSuccessCode(aStatus));
|
||||
do_check_eq(aLivemark.siteURI.spec, aExpected.url);
|
||||
do_check_eq(aLivemark.feedURI.spec, aExpected.feedUrl);
|
||||
deferred.resolve();
|
||||
});
|
||||
return deferred.promise; }();
|
||||
yield PlacesUtils.livemarks.getLivemark(
|
||||
{ id: id },
|
||||
(aStatus, aLivemark) => {
|
||||
do_check_true(Components.isSuccessCode(aStatus));
|
||||
do_check_eq(aLivemark.siteURI.spec, aExpected.url);
|
||||
do_check_eq(aLivemark.feedURI.spec, aExpected.feedUrl);
|
||||
});
|
||||
break;
|
||||
case "children":
|
||||
let folder = aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
|
||||
|
Loading…
Reference in New Issue
Block a user