Bug 526920: minor test tweaks

--HG--
extra : rebase_source : 895f32d6db722606fb9327f9478c6857fb0d1e70
This commit is contained in:
Gavin Sharp 2009-11-09 10:12:10 -05:00
parent 858ddbf525
commit d18cfbef98
2 changed files with 13 additions and 7 deletions

View File

@ -107,12 +107,18 @@ function readFileData(aFile) {
* Compares two arrays, and returns true if they are equal.
*/
function compareArrays(aArray1, aArray2) {
if (aArray1.length != aArray2.length)
if (aArray1.length != aArray2.length) {
print("compareArrays: array lengths differ\n");
return false;
}
for (var i = 0; i < aArray1.length; i++)
if (aArray1[i] != aArray2[i])
for (var i = 0; i < aArray1.length; i++) {
if (aArray1[i] != aArray2[i]) {
print("compareArrays: arrays differ at index " + i + ": " +
"(" + aArray1[i] + ") != (" + aArray2[i] +")\n");
return false;
}
}
return true;
}

View File

@ -8,10 +8,10 @@ var iconsvc = Cc["@mozilla.org/browser/favicon-service;1"].
function addBookmark(aURI) {
var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService);
var bmId = bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder,
aURI,
bmsvc.DEFAULT_INDEX,
aURI.spec);
return bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder,
aURI,
bmsvc.DEFAULT_INDEX,
aURI.spec);
}
function checkAddSucceeded(pageURI, mimetype, data) {