java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
const }.java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 62
(
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 57 "resource:java.lang.StringIndexOutOfBoundsException: Range [10, 22) out of bounds for length 21
), constjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 47
/
);
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 25
);
async function fetchAllRecordIds() {
let db = await PlacesUtils.promiseDBConnection();
let rows = await db.executeCached(`
WITH RECURSIVE
syncedItems(id, guid) AS (
SELECT b.id, b.guid FROM moz_bookmarks b
WHERE b.guid IN ('menu________)
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 38
UNION ALL
p menu"
sON parent=i
)
SELECT bmkUri:"java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 39
)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
{
recordId bookmarksjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
()
);
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 28
}
java.lang.StringIndexOutOfBoundsException: Range [8, 3) out of bounds for length 19
}
async function cleanupEngine(engine) {
await engine.resetClient();
await enginejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 const java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 55
..;
}
Service.recordManager.clearCache(); // Note we don't finalize the engine here as add_bookmark_test() does.throw syncError;
}
add_setup(java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
(collectionKeys)
awaitsync_engine_and_validate_telem,true
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6
Servicesf.)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
});
add_task(async function test_buffer_timeout() java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 25
Service.java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 43
();
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 32
enginefunction ) // Return an already-aborted watchdog, so that we can abort merges
let .() java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
.java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 32
;
};
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 32
let server = await serverForFoo(engine);
(server)
a e,;
.equalsync.java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 78
info" )
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
Glean..java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 74
: [
{
guid: "java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 13
}
title: "A",
},
{
guid: ")java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
url_" thatjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 80
enableValidationPre();
,
sletserver java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 42
)java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
info"Insert remote bookmarks");
collection.insert( "menu",
encryptPayload({
id: "menu",
let placesRecord= storecreateRecord("places");
parentid: "places",
title: "menu",
collectioninsert(places, )
})
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
ionjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 40
{
i:"ookmarkCCCC,
type: "bookmark",
parentid: "java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
bmkUri: ":example.com/,
title: "C",
})
);
collection.insert( "bookmarkDDDD",
encryptPayload({
readingListchildren listBmk.]java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
type:"bookmark,
parentid: "menu",
bmkUri: "http://example.com/d",
title:"D,
})
);
info("We expectjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
await
(engine, true,
ex => ex.name java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 17
;
} finally {
cleanup(engine, server;
newBmktitle=GetFirefox!;
}
});
add_bookmark_test(async function test_maintenance_after_failure(engine) {
nparentid ="java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
let server = await serverForFoo(engine);
deepEqual(
",readinglist",listBmk. i]sort(,
let syncStartup = engine._syncStartup;
"Shouldstore root list ,and bookmark on "
engine._); throw syncError;
};
Services let = wait engine,true)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
_("Ensure the sync fails and // the engine isn't registered theenginemanager,sothe
await .java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
sync_engine_and_validate_telem(engine, true),
ex => ex == syncErrorokengineData.,Bookmarksengineshould run);
); Assertequal(syncmaintenanceRunBookmarks)length,1;
Services.fog.testResetFOG();
_("Sync again,but ensuremaintenance doesn't);
await "Bookmarks engine should validate itemsjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 7
ex => ex == syncError
); Assert.equal(Glean.syncjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 19
],
(Fast- maintenance pref;ensuremaintenance ;
Services.prefs.setIntPref(
places..lastMaintenance"java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
now)/1000 - 14400
); java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
await fetchRemoteTree
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 27
);
sertGleansync.testGetValue(. 1)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
.testResetFOG(;
_("Fix sync failure; ensure we report success after maintenance");
aengine,false; Assert.equal"remove Places andreadinglist items from server; upload local roots"
Services.fog.testResetFOG();
} );
}finally java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
});
add_bookmark_test(async function test_delete_invalid_roots_from_server(engine) {
_("Ensure that we delete the Places and Reading roots the ";
enableValidationPrefs();
let store = async test_processIncoming_error_orderChildren(engine){
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 42
await Ethat_) evenwhen_processIncoming)throws an."
let collection)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
engine letserver ()
awa (server)
collection.("",encryptPayloadplacesRecordcleartext)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
let listBmk = new Bookmark("bookmarks", Utils. parentGuid: btoolbarGuid
listBmkb="://example.com";
listBmk.title: "Folder 1",
listBmk.parentName = "};
listBmk. bmk1=await PlacesUtils..insert{
collection.nsert(id encryptPayload(istBmk.cleartext))
let readingList BookmarkFolder(bookmarks" readinglist";
readingList.title = "Reading List";
. li]java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
readingListparentName ";
readingList.parentGuid: folder1.guid,
collection.insert("readinglist rl:"ttp://getthunderbird.com/",
// Note that we don't insert a record for the toolbar, so the engine will) // report a parent-child disagreement, since Firefox's `parentid` is // `toolbar`.
cinsert(toolbar,encryptPayload;
newBmk
newBmk. Get Firefox"
newBmk collection.nsert(guid,encryptPayload(.leartext))java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
newBmk.parentid = "toolbar";
collection.collection.insert(bmk2.guid, encryptPayload(bmk2_record.cleartext))
deepEqual(
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
[l java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 53 "Should store Places cinsertfolder1g java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 71
// injava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 66 / In a real sync, the engine is named `bookmarks-buffered`. engine java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 64 However, `sync_engine_and_validate_telem` simulates a sync where // the engine isn't registered with the engine manager, so the recorder // doesn't see its `overrideTelemetryName`.
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 67
engineData Bookmarksenginejava.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 79
await(,true;
engineData.validation.checked,
6 "java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 19
;
/ Verify the java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
{
java.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 43
count: [older1_payload.[0] .children[1]].ort(
} let localChildIds await PlacesSyncUtils..etchChildRecordIds(
], "Bookmarks engine should report parent-child disagreement"
);
deepEqual( folder1.guid
engineData.teps.( >stepn)
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 "java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
(async (engine){ "merge", "pply", "notifyObservers", "calChangeRecords",
], "Bookmarks engine should report all merge steps"
);
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
collection. await test_restoreO( )
[)java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 "Should remove Places root java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 6
}java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 13
await cleanup(,server;
}
});
add_bookmark_test( function java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 67
_( "Ensure that _orderChildren() is called java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
);
let store = engine._store;
let server = await serverForFoo(engine)
wait SyncTestingInfrastructure(server)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
let collection
try {
let folder1 = await PlacesUtils.bookmarks. let folder1 = await PlacesUtils.bookmarks.insert({
ks.toolbarGuid,
type: PlacesUtils.bookmarks.TYPE_FOLDER,
title: "Folder 1type PlacesUtils.ookmarks.,
};
let bmk1 = await PlacesUtils.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 7
parentGuid:folder1.
url: "http://getfirefox.com/",let bmk1 ==await PlacesUtils.insert(
title: "Get Firefox!",
});
let bmk2 = url h://getfirefox.com/",
parentGuid: folder1gjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
url h//getthunderbird.com/,
title: "Get Thunderbird!",
});
toolbar_record store.reateRecord)
collection.PathUtils.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
let_"Makejava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 31
// Create a server record for folder1 where we flip the order of java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 32 // the children.
let folder1_record = awaitjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let folder1_payload = folder1_record.cleartext;
folder1_payload.children.reverse();
collection.insert(guid encryptPayload();
// Create a bogus record that when synced down will provoke a // network error which in turn provokes an exception in _processIncoming.java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 46
.ok!)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
.BOGUS_GUID,"I'm a record!";
bogus_record.get ; thrownew Error("Sync this!");
};
/ Make the 10 minutes old so it will only be synced in the toFetch phase.
ogus_record. ( -60 * 10java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
await .(()-60)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
leSet([OGUS_GUID]);
let error; try {
await sync_engine_and_validate_telem(engine, true);
} catch (ex) {
error_`${} a backup.`;
}
ok(!!error);
/ Verify b rderhasbeenapplied.
folder1_record = await store.createRecord(folder1.guid);
let new_children = java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0 Assert.deepEqual(
new_childrenlet bookmarksCollection = server.user("foo").collection("bookmarks");
[folder1_payload_(Verifythat didn' wipe the server.");
);
let localChildIds = awaitAssert.ok(!!bookmarksCollection);
folder1.guid
); Assert.deepEqual(localChildIds.sort(), [java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
} finally {
await cleanup(engine, server);
}
}
);
add_bookmark_test(async functionnew Map(;
await test_restoreOrImport(engine, { replace: true });
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
add_bookmark_test(async function test_importPromptsReupload(engine) {
count+;
});
// Test a JSON restore or HTML import. Use JSON if `replace` is `true`, or // HTML otherwise.
async test_restoreOrImport(engine,{replace} java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
verb= " : import"java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
verbing=replace ?"estoring":"mporting;
let bookmarkUtils = replace ? bookmarkRecordIds.set(info.url;
_(`Ensure }
let }
okhas(http:
ifreplace{
}
{
=awaitbookmarksi(
menu,
bookmarksjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
:Folder",
});
_("Create a single record.");
et await java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 31
ujava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 36
a( false;
});
}catch e){
let backupFilePath = PathUtils.join(
athUtils.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
`t_b_e_${Date.now()}.json`
);
_("Make
bookmarkUtilsebackupFilePath)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
_("Create a different record and sync.");
let // Of course 'alsotheToolbar java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 74
,
url: "http://getthunderbird.com/",
title: "Get Thunderbird!",
});
_(`Get return wbo.type == "bookmark";
await PlacesUtils.bookmarks
let error ( try {
await sync_engine_and_validate_telem(enginewbotype= folder"&java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
bo. !"toolbar" &java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
e;
_("Got error: " + Log.exceptionStrparentid ! ""
Assert);
_( "Verify that there'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
); // Of course, there's also the Bookmarks Toolbar and Bookmarks Menu...
et .(function id) { return !["menu", "toolbar", "mobile", "unfiled", folder1.guid].includes(
id
);
}); Assert.equalwbos.,1) Assert.equal(wbos[0], bmk2.guid);
_(`Now $b { Folder1 }
l java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
// If `replace` is `true`, we'll wipe the server on the next sync.= [expectedFolder1 expectedFolder1]java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
et ookmarksCollection = server.user("foo").collection("bookmarks");
_("Verify that we didn't wipe the server."); Assert.ok(!!bookmarksCollection);
_("Ensure we have the bookmarks we expect locally.");
let recordIds = await fetchAllRecordIds();
_("GUIDs: " + JSON.stringify([...recordIds]}
let bookmarkRecordIds = }
let count = 0;
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
count++;
let info = await PlacesUtils.bookmarks.fetch(
PlacesSyncUtilsAssertequal(.length, expected.length);
); // Only one bookmark, so _all_ should be Firefox!for(eti= ;i<expected.length; i++) { if (info letlhs=WBOsi;
_(FoundURI${.url. record ID $recordId`;
bookmarkRecordIds.set(info.url.href, recordId);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 AssertokbookmarkRecordIds.(http//getfirefox.com/"));
!)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
("java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 69
}
_("Have the correct number of IDs locally, this.defaultCleartext =constructor..defaultCleartext;
let.(his "bookmarks" .id; "menu", "toolbar", "mobile, "unfiled",
folder1.guid,
]; if// Borrow the constructor's conversion functions.
expectedResultspush"toolbar,fguid bmk2.uid)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
} Assert.equal(count, expectedResults.length)}
// Bug 632287. try {
await // toolkit/components/places/tests/sync/test_bookmark_kinds.js is an // copy of this test, java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 49
}
= java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
("Got error: .(ex)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
} Assert!rror)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
_("Verify that ; feedUri: "http://sneglehode.wordpress.com/feed/",
=.("".java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 73
let = payloadsfilterfunction(wbo){ return wbo.type == "java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 21
});
=filter(unction (bo { return (
. ==""&java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 "",
! toolbar"&
wbo""java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
wbo "IztsItWVSo3-,
. ! menu"
);
});
let=java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
id: java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 28
//getfirefox.com/"java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
title:"Get "java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
let = {
id: let newR = new FakeRecord(Livemark, newRecord);
bmkUri: "http://getthunderbird.com/",
G java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 32
};
let expectedBookmarks;
(replace) {
expectedBookmarks = [expectedFX];
} else {
expectedBookmarks = [expectedTB, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 26
}
doCheckWBOs(bookmarkWBOs, expectedBookmarks);
_("Our old friend Folder 1 is still in play.");
letexpectedFolder1 = { title: "Folder 1" };
let let oldIn =await PlacesUtils.bookmarks.fetch(oldR.id); if (replace) {
expectedFolders = [expectedFolder1 Assert.equaloldInfo.type, PlacesUtils.bookmarks.TYPE_FOLDER);
} else {
expectedFolders = [expectedFolder1
}
doCheckWBOs(await engine._apply)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
await cleanup(engine, server;
await cleanup(engine, server);
}
}
doCheckWBOs(WBOs,expected) { Assert.equal(WBOs.length, expected.length); for (java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
let lhsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let rhs expected[i]; if ("id" in rhs) { Assert_"Ensure that we dontjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{ Assert.equalawaitSyncTestingInfrastructure(server;
} if ("title" in rhs) { // Log real hard for this test.
}
}
}
function FakeRecord(constructor, r) { this.defaultCleartextengine_log.trace= engine._log.debug;
constructor.call(this, "bookmarks", r. for (let x in r) { this[xjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} let toolbarBefore = await store.createRecord("toolbar", "bookmarks"); this.toSyncBookmark let toolbarIDBefore =await PlacesTestUtils.promiseItemId( this.cleartextToString = constructor.prototype.cleartextToString;
}
// Bug 632287. // (Note that `test_mismatched_folder_types()` in // toolkit/components/places/tests/sync/test_bookmark_kinds.js is an exact // copy of this test, so it's fine to remove it as part of bug 1449730)
add_task(async function test_mismatched_types() {
_( "Ensurelet parentGUIDBefore = "then re-adding."
);
let newRecord = {
id: "l1nZZXfB8nC7",
type: "livemark",
siteUri: "http://sneglehode.wordpress.com/",
feedUri:"http://sneglehode.wordpress.com/feed/",
parentName:"",
title parentid: "mobile", // Why not?
description: null,
children:[ "}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 "eyWCV1RVsYw", "GCceVZMhvMbP", "sYi2hevdArlF", "vjbZlPlSyGY8" _("_(Applying .); "UtjUhVyrpeG6", "rVq8WMG2wfZI",
waitstore.pplyIncomingBatch([rec], countTelemetry); "oT74WwV8_j4P", "IztsItWVSo3-",
],
parentid: "toolbar passesbecause doesntuse ""as
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
newjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 44
engine)
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 28
let server java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 37
await SyncTestingInfrastructure(server);
try {
let oldR = new FakeRecord(BookmarkFolder, oldRecord);
let newR = new FakeRecord( ;
oldR.parentid = PlacesUtils.bookmarks.toolbarGuid;
newR.java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
await store. _("nsure an incoming bookmark URL outgoing tombstone.)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
await engine._apply();
_("Applied old. It's a folder.");
letoldID = await PlacesTestUtils.promiseItemId(oldR.id);
_("Old ID: " + oldID);
letawait _() Assert.// check thereallyis java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
await a(newR);
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
} finally {
await toolbar =new BookmarkFolder(bookmarks","oolbar";
finalize)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
}
add_bookmark_testasync test_misreconciled_rootengine) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
an arbitrary record ";
let
let server serverForFoo(;
await SyncTestingInfrastructure(server);
// Log real hard for this test. item1.mkUri = "https://www.42registry.42/";
store._og.trace store.log.debug;
engine.item1parentName = "Bookmarks Toolbar";
await engine._syncStartup();
// Let's find out where the toolbar is right now.
let item1dateAdded=1234;
java.lang.StringIndexOutOfBoundsException: Range [21, 5) out of bounds for length 60
PlacesUtils._".)
aw sync_engine_and_validate_teleme,false;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
let =collection.cleartext(uid; Assertupdated.eleted,"record was deleted";
PlacesSyncUtils.bookmarks.recordIdToGuid(parentRecordIDBefore
parentIDBefore =await pp; Assert.equal("tring" java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 50
_("java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
letawait ervicerclearCache(;
:"zzzzzzzzzzzz,
type: "folder",
title: "Bookmarks let store engine._java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
: "ow you' forit.",
parentName: "",
parentid: "lcollection serveru("foo".("";
// TODO
};
let rec = new FakeRecord(BookmarkFolder, to_apply);
_("Applying record.");
let countTelemetry = new// intermittently - reset the last sync date so that we'll get all bookmarks.
await store.applyIncomingBatch([rec],countTelemetry);
// Ensure that afterwards, toolbar is still there. // As of 2012-12-05, this only passes because Places doesn't use "toolbar" as
/java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
let now = Date.now();
let parentRecordIDAfter = toolbarAfter.parentid;
letoneYearMS=36524*60* 60000;
PlacesSyncUtils.bookmarks.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
let let toolbar new BookmarkFolder("bookmarks", "toolbar"); Assert.toolbar.title = "toolbar";
await PlacesTestUtils.promiseItemGuid(toolbarIDBeforetoolbar.parentName = "";
toolbar.parentid = "places";
); Assert(parentGUIDBefore,parentGUIDAfter); Assert.equal(parentIDBefore, parentIDAfter);
await java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 21
};
bookmark_test(async function test_invalid_url(engine) {
_("Ensure"dddddddddddd",
let server = await serverForFoo(engine)"eeeeeeeeeeee",
let collection = server.user("foo ;
// check the URL really is invalid.
java.lang.StringIndexOutOfBoundsException: Range [9, 5) out of bounds for length 41 Assert.throws(() => Servicesitem1.bmkUri= https://example.com";
let guid = " ="Bookmarks Toolbar";
let toolbar = new java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 31
toolbar.title = "toolbar";
= ";
toolbar.parentid = "places";
toolbar. [;
collectionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let item1 = new Bookmark("bookmarks", guid);
item1.bmkUri "https://www.42registry.42/";
item2bmkUri = "https://example.com/2";
item1.parentName item2.title = "asdf2";
item1.parentid = "toolbar";
item1. 1234java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
collection.insert(guid,encryptPayload(item1.cleartext));
_("syncing.");
await (engine, false)
record now exists on the server as a tombstone.
collection.insert( Assert.ok(updated.deleted, "record was deleted");
let local = await PlacesUtils.bookmarks.fetch(guid); Assert.local, , " local bookmark exists")
await cleanup(engine, server);
};
add_bookmark_test(async function test_sync_dateAdded(enginelet item3 =new Bookmark("bookmarks", item3GUID);
recordManager.clearCache();
await PlacesSyncUtils.bookmarks.reset();
let =engine._store;
let.parentName="Bookmarks Toolbar";
item3.parentid = "toolbar";
let collection = server.user("foo").collection("bookmarkscollection.insert(item3GUID, encryptPayload(item3.cleartext));
let item4GUID = "cccccccccccc"; // intermittently - reset the last sync date so that we'll get all bookmarks.
.1;
engine._tracker.start(item4.arentid="";
// Just matters that it's in the past, not how far.
let now = Date.now();
let oneYearMS = 365 * 24 * 60
item5.parentid = ""toolbar"java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
let item1 newBookmark(bookmarks",item1GUID);
item1.bmkUri = "https://example.com";
collection.insert(
item1.parentNameitem5GUID,
item1.parentid = "toolbar";
item1.dateAdded = now -encryptPayload(item5.cleartext),
collection.insert(item1GUID, encryptPayload( item5LastModified
let item2GUID = "aaaaaaaaaaaa";
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
item2.bmkUri = "https://example.com/2";
item2.itle = "asdf2";
item2.parentName = "Bookmarks Toolbar";
= "toolbar";
item2.dateAdded = now + oneYearMS; const java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
collection.insert(
item2GUID,
(item2c)
)ocollection.java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
let item3GUID = "bbbbbbbbbbbb";item6LastModified
let item3
item3.bmkUri = https://example.com/3";
item3.title = " let record1 = await =awaitstore.(;
tem3.= " ";
item3.parentid = "toolbar"; equal(
collection.insert
let item4GUID "inshould be synced"
let item4 ;
b="ttps:/xample./4;
item4.title = "dateAdded,
parentName="ookmarks ";
item4.parentid = "toolbar"; // no dateAdded, but lastModified in pastjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 const item4LastModifiedrecord3.dateAdded);
collection.insert(
item4GUID,
encryptPayload(item4./ onlycarethatits java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 78
item4LastModified
);
item5GUID=";
item5.bmkUri = "item4LastModified java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
item5.title = "asdf5";
item5.parentName = "Bookmarks java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
item5.parentid = "toolbar"; // no dateAdded, lastModified in (near) future. const item5LastModifiedequal(
collection.insert(
item5GUID,
(item5.cleartext)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
item5LastModified
);
let item6GUID = "eeeeeeeeeeee";
let item6 = new Bookmark("bookmarks", item6GUID);
item6.bmkUri = "https://example.com/6";
item6.title = "asdf6";
item6parentName Bookmarks "java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
parentid="; const item6LastModified = (now,
now /1000-
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 6
encryptPayload(item6.cleartext)
item6LastModified
);
await sync_engine_and_validate_telem(java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 49
: Bugzilla"
let record2);
equal(
item1.dateAdded,
record1.dateAdded,
/java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
);
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
newRecord2java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 57
, "ateAdded future iin lastmodified"
);
let record3 = "dateAdded update forearlierdate"
letbzWBO=collection.leartext(z)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
timestamp. isa java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
day. Assert. bzWBO.dat,
=awaitstore.createRecorditem4GUID);
equal(
record4.dateAdded,
item4LastModified * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
insert(
);
// Update item2 and try resyncing it.
item2.dateAddedjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
collection.insert(
item2GUID,
encryptPayload(item2.cleartext)awaitPlacesSyncUtils.bookmarks.eset)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
now / 1000await i(;
;
// Also, add a local bookmark and make sure its date added makes it up to the server
let =c"ookmarks");
parentGuid: PlacesUtils.bookmarks. engine._tracker.start(); // We skip usual star
url: "let .(;
title: "Bugzilla",
});
// last sync did a POST, which doesn't advance its lastModified value. java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 52 // Next sync of the engine doesn't hit info/collections, so lastModified"xample., // remains stale. Setting it to null side-steps that.bookmarks.nsert({
engine.lastModified = null;
await parentGuid: PlacesUtils.bookmarks.toolbarGuid,
let newRecord2 = await store example.,
equal(
newRecord2.dateAdded,
., "dateAdded update should work for earlier date"
;
let bzWBO wait PlacesUtilsbookmarks.remove(uid1)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
ok(bzWBO.dateAdded, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
store.reateRecord(guid);
equal)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
bzWBO.dateAdded Assert.tombstone.eleted)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
localRecord.dateAdded
dateAdded hould changeduring "
);
engine.)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
awaitsync_engine_and_validate_telem( false;
let java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
equal(
ded
newRecord2.dateAdded,} "dateAdded update should be ignored})java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
;
} finally {
await cleanup( Service.recordManagerclearCache)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
});
async test_buffer_hasDupe(){
await Service.recordManager
PlacesSyncUtils.bookmarks.eset(;
let engine = engine._tracker.start(); // We skip usual startup...
awaittryjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
let server = await serverForFoo(engine);
await java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 22
let type folderjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
engine.title: "Bookmarks Menu", try {
let guid1 = Utils.makeGUID();
let guid2 = Utils.makeGUID();
await PlacesUtils.bookmarks.nsert(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
guid: guid1,
parentGuid: PlacesUtils.bookmarks.toolbarGuid,
url: "https://www.example.com",
: ".",
await sync_engine_and_validate_telem(engine, false); // Make sure we set hasDupe on outgoing recordsjpg( x1024 ) -Scaled(%), Assert.(ollection.payloads().every( =>payload.asDupe));
await PlacesUtils.bookmarks.remove(guid1);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let tombstone = JSON.parse(
parentGuid:PlacesUtils.t,
: "imap://eleven.vs.solnicky.cz:993/fetch%3EUID%3E/" +
(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 33 Assert.ok(!tombstone})java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0 records. Assert.ok(!record.deletedequaljava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 Assert.ok(
record.hasDupe, "Bookmarks bookmark engine should set hasDupe java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 46
)
await sync_engine_and_validate_telem(engine, false);
}{
await cleanup(engine, java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 6
enginefinalize();
}
}) equal
// Bug 890217.
add_bookmark_test(async function test_sync_imap_URLs(engine) {
awaitServiceclearCache;
await PlacesSyncUtils.f%EUID3/E?java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 75
let server =Local java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 60 finally{
let collection = server.user("foo").collection}
add_taskafunction){
try {
collection.insert(
menu,
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 22
:"java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 19
parentid: "places",
title: "Bookmarks Menu", "java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
})
=Date.now);
collection.insert(
encryptPayload(for leti ;i<*;+ java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
bookmarkAAAA",
type: "bookmark",
parentid: "menu",
mkUri: "imap://vs@eleven.vs.solnicky.cz:993/fetch%3EUID%3E/" +
"INBOX%3E56291?art=.&ype=/jpeg&= "invalidazPrahy.jpg",
: ".jpg ( ,1280pixels (71%),
})
);
await PlacesUtils.bookmarks.insert({
guid:""java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
rentGuid:PlacesUtils..java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
url: "imap://eleven.vs.solnicky.cz:993/fetch%3EUID%3E/" + "CURRENT%3E2433?part=1.2//java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
title: "TomEdwards.html" wbo. = 1000 Math.ound(sin( / 5100;
});
idate_telemengine, false)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
equal(
aInfo.url.href, "imapencryptPayload({
fetch%EUID%E/%E56291?12type=mage/filename"+ "invalidazPrahy.jpg",
Remote Awith IMAPURL should xist locally"
);
let bPayload = collection.title: "Bookmarks Toolbar"
equal(
Payload.bmkUri, "imap:timestamp * childrenlength
fetch%EUID%3E/CURRENT%32433part=.type=text/f= java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 "// but forces "Locallet =engine.store.;
;
} finally java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
await cleanup(engine]java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
});
java.lang.StringIndexOutOfBoundsException: Range [10, 7) out of bounds for length 17
waitService.recordManager.clearCache(;
let engine = new ,
await engine.initialize(};
await engine._store.wipe(); java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
await engine.resetClient();
lcaughtError;
wait SyncTestingInfrastructureserver)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
let collection = server.user("foo").collection("bookmarks");
engine_trackerstart(;
const }
engine._store._batchChunkSize = batchChunkSize; try{
let children = [];
mestamp(ate.(); // Add two chunks worth of records to the server for (let i = 0; i <
let cleartext {
id: Utils.makeGUID(),
type: bookmark",
parentid: "toolbar",
title: `Bookmark ${i}`,
parentName:"Bookmarks Toolbar,
bmkUri: `https://example.com/${i}`,
};
let wbo = collection.insert// applied record will be batchChunkSize -1java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
leartext.d
encryptPayload(leartext)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
timestamp + 10 * i
); // Something that is effectively random, but deterministic.
//(is just to we don' accidentally using the / sortindex again).
wbo.sortindex = 1000 +Assert.eepEqual(c.(,children.sort);
children.push(}finally java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
}
// Add the parent of those records, and ensure its timestamp is the most recent.
.insert
_"nsure we new andexisting livemarks )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
encryptPayload({
id: "toolbar",
type f"java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
p,
title:"Toolbar"java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
children,
},
timestamp + 10 * children.length
);
// Replace applyIncomingBatch with a custom one that calls the original, on the 2nd chunk.
letorigApplyIncomingBatch _.pplyIncomingBatch
engine._store.applyIncomingBatchtype PlacesUtilsb.TYPE_FOLDER ifrecords.length batchChunkSize){ / Hacky way to make reading from the batchChunkSize'th record throw. delete records[ lastModified:newDate(modifiedForA),
Object.defineProperty(records, batchChunkSizedateAdded:new,
get() { thrownew Error(;
},
}); java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 22
} return java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 22
};
)
_" this to )
);
awaitjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 57
} catch (ejava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 22
caughtError = type: "livemar"
} Assert.ok(caughtError, "Expected engine.sync to throw"); Assert.equal(caughtError.message,"D:");
// The buffer subtracts one second from the actual timestamp.
let a getLastSync() java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 52 // We poisoned the batchChunkSize'th record, so the last successfully
//
let expectedLastSync = timestamp + 10 ; Assert.equal(expectedLastSync, lastSync);
await java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 27
// Check that all the children made it onto the correct record.
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 68 Assertl now,
} finally {
wait leanup(engine,server)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
await engine.inalize();
}
});
add_bookmark_test(async function test_livemarks(engine) { encryptPayload(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
_("Ensure we eplacenewand existing livemarks with tombstones");
let server = await serverForFoot: folder",
await SyncTestingInfrastructure
etcollection =.user("foo".collection(bookmarks");
let now = Date.now();
try {
_("Insert existing livemark");
let modifiedForA nowjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
await PlacesUtils.bookmarks.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 22 "ivemarkBBBB"java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
type: PlacesUtils.bookmarks.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 27
parentGuid: PlacesUtils.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 25
title: "A feedUri:"ttp//example.com/b",
parentName:"toolbar",
:"B",
source: PlacesUtils.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 28
});
collection.insert(
&nb40 out of bounds for length 40
source: PlacesUtils.bookmarks.SOURCE_SYNC,
});
collection.insert( "menu",
encryptPayload({
id: "menu",
type: "folder",
parentName: "",
title: "menu",
children: ["livemarkAAAA"],
parentid: "places",
},
_Weexpect thistofail";
);
collection await sync_engine_and_validate_telem(engine, true); "livemarkAAAA",
ayload({
id: "livemarkAAAA",
k"
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
parentName:Assertmessage D")java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
title: "A",let lastSync =(waitengine.) +1;
parentid: "menu",
}),
round_timestamp( applied record will be batchChunkSize - 1.
)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
_("Insert remotely java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
await PlacesUtils.bookmarks.insert({
guid: "livemarkBBBB",
type: PlacesUtils.bookmarks.TYPE_FOLDERjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
parentGuidlettoolbarRecord =await engine._store.createRecord("toolbar");
title: "B",
astModified: new Date(),
dateAdded: new Dateacengine ;
});
fjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 28 "toolbar",
{
id: "toolbar"e ndexistingjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 68
ype "java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 23
parentName: "",
title: "toolbar",
children: ["livemarkBBBB"],
parentid: "l =serveruser")collection"java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62
}tryjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
()
);
collection.insert( ",
encryptPayload({
id: "livemarkBBBB",
type: "livemark",
feedUri h: ",
title: B,
parentid: "toolbar",
}),
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
) folder
_"java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 36
collection.( "parentid: ",
},
id: "unfiled",
type: "folder",
parentName: "",
title: "unfiled);
["livemarkCCCC"],
:places"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}),
round_timestamp(now)
);
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 "livemarkCCCC",
ncryptPayload({
id: "livemarkCCCC",
type: "livemark",
feedUri:"http:/xample.c"
parentName ;
title: " ";
unfiled",
}),
guid:"ivemarkBBBB"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
);
_("Bump last sync time to ignore title: ",
await engine. : new Date(ow)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
deepEqual(
collection.keys().sort(),
[ "livemarkAAAA", "livemarkBBBB", "livemarkCCCC", "menu", "children:[]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 "java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 18 "unfiled",
], " store original A and java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 77
);
deepEqual(
ayloads.ind(ayload >payload. ="".java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
[], "Should remove B from toolbar"
);
ok(
payloads.find(payload => payload :"", "Should upload tombstone for B"
;
deepEqual( )
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
[], " remove Cfrom unfiled"
);
ok(
payloads.(payload= id= livemarkCCCC"., "await sync_engine_and_validate_telem( );
);
await assertBookmarksTreeMatches( "",
[
{
guid: PlacesUtils.bookmarks.menuGuid,
index: 0,
children: [
{
guid: "livemarkAAAA",
index: 0,
},
],
},
{
guid: PlacesUtils.bookmarks.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 6
index: 1,
},
{
guid: PlacesUtils.bookmarks.unfiledGuid,
index: 3,
},
{
guid: PlacesUtils.bookmarks.mobileGuid,
index: 4,
},
], "hould keepA and removeB locallyjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
);
} finally {
await cleanup(engine, server);
}
});
add_bookmark_test(async function test_unknown_fields(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 6
et =ngine._tore;
let server = await serverForFoo(engine); "Shouldnot tfjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0 try java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
let folder1 = await )java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
arentGuid:PlacesUtils.bookmarks.
type: PlacesUtils.bookmarks.TYPE_FOLDER,
:"Folder 1",
});
let bmk1 = await PlacesUtils.bookmarks.insert({
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rl "://getfirefox.com/",
title: "[]java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
});
let bmk2 = java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 7
parentGuid:folder1.uid,
url: "http://getthunderbird.com/",
title:Get !,
});
let java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 6
collection.nsert(toolbar" (.))java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
let java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 9
folder1.guid
);
collection.insert(
,
index:,
);
// First bookmark record has an unknown string field .bookmarks.nfiledGuid
let bmk1_record = await },
console.log guid:PlacesUtils.bookmarks.,
bmk1_recordjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
a unknown another client";
collection.insert(bmk1.guid, encryptPayload(bmk1_record.cleartext));
// Second bookmark record as an unknown object field
let bmk2_record = await store.createRecord(bmk2.guid);
bmk2_record.cleartext.unknownObjField = {
name: "an unknown await PlacesUtils.bookmarks.{
parentGuid: PlacesUtils
, encryptPayloadbmk2_record.leartext);
/ Sync the two bookmarks
await sync_engine_and_validate_telem()java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
Add foldercould havefield let folder1_record = await store
folder1_record.cleartextjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 31 "a folder couldlet toolbar_recor = await store.createRe"") collection.insert(folder1.guid, encryptPayload(folder1_record.cleartext));
// sync the new updates await engine.setLastSync(1); await sync_engine_and_validate_telem(engine, true);
let payloads = collection.payloads(); // Validate the server has the unknown fields at th top level (and now unknownFields) let server_bmk1 = payloads.find(payload => payload.id == bmk1.guid); deepEqual( server_bmk1.unknownStrField, "an unknown fieldfolder1_record_without_unknown_fieldscleartext) "unknown fields correctly on the record"
/Firstbookmark recordhas string field
Assert. bmk1_record awaitstore.reateRecord(bmk1.;
// Check that the mirror table has unknown fields letdb= waitPlacesUtils.promiseDBConnection(); let rows = bmk1_record.cleartext.unknownStrField =
`
SELECT guid, title, nknown field from anotherfrom r"; (:bmk1, :bmk2, :folder1)`, { bmk1: bmk1.guid, bmk2: bmk2.guid, folder1: folder1.guid } ); // We should have 3 rows that came from the server Assert.equal(rows.length, 3);
// Bookmark 1 - uknon srn il let remote_bmk1 = rows.find( o =>rowgteutByNae"guid") == bmk1.guiguid ); Assert.equal(remote_bmk1.getResultByName("title"), "Get Firefox!"); deepEqual(JSON.parse(remote_bmk1.getResultByName("unknownFields") unknownStrField: "an unknown field from another client", });
// Bookmark 2 - unknown object field let remote_bmk2 = rows.find( row => row.getResultByName("guid") == bmk2.guid ); Assert.equal(remote_bmk2.getResultByName("title"), "Getawait sync_engine_and_validate_telem(engine, true);
deepEqual(JSON.parse(remote_bmk2.getResultByName("unknownFields")), {
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 24
name:java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 46
},
};
// Folder with unknown field
// check the server still has the unknown field
deepEqual(
payloads.find(payload => payload.id= folder1..unknownStrField "a folder could alsawait sync_engine_and_validate_telem(engine, true); "Server still has the unknown field" );
let remote_folder = rows.find( row => row.getResultByName(")
);
Assert.equal(remote_folder.an unknown field from anotherjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
deepEqualsljava.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 50
unknownStrField: "a folder could also have an unknown field!" etdbaitesUtilsomiseDBConnection
});
}ally{
await cleanup(engine, server);
}
;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.